Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
lazarus
Junior Member
 
Join Date: Dec 2007
Posts: 22

Old December 6th, 2007, 04:34 PM
(for the record, I have the Race/Class ability thing all figured out, except for how I'm going to do Clerics)

I have a question: Deverenians get +2 skill points every odd level. I've figured out at least that I can give ".5" as a value for initial skill points, but I'd like to do it in a script. I've got it all done up to assigning that ... what field where do I add that to? I assume it's something like hero.child[aSkills].field[??].value += 2.

(oh, and is there a spot to put in feature requests? I'd love to see syntax highlighting on the script editor windows )

Laz

Beware the JabberOrk
lazarus is offline   #11 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old December 6th, 2007, 06:42 PM
Actually, it looks like the information on how to add skill points is not in the documentation yet. I do know where to find it though - open the file srd_adjustments.dat in the c:HeroLab/data/d20/source folder - that shows you how all the items on the adjustments tab are scripted, and is a great place to look for a timing that works. In there, I find that Skill points must either be assigned to a specific class, or added to every level.

Does this race assign the 2 skill points to whichever class you take at that level?

If so, you'll need to wait until Colen and Rob get back from their business trip (next week) to get someone to tell you how to make that work.

Since I had already started thinking about it, here's how I'd go about calculating the number of skill points added as a function of level (untested script):

var bonus as number
bonus = #totallevelcount[]
bonus = round(bonus/2,0,1)*2


To find the syntax for the round function, use your start menu to go to the same folder HL launches from, then select "Hero Lab Authoring Kit.htm", then select "Scripting Basics".

What I'm doing is using the #totallevel[] macro to get the hero's character level. Next I divide bonus by 2, round it up (level 1 = 1, level 2 = 1, level 3 = 2, etc.), then multiply by two (so, level 1 = 2, level 2 = 2, level 3 = 4)
Mathias is online now   #12 Reply With Quote
lazarus
Junior Member
 
Join Date: Dec 2007
Posts: 22

Old December 6th, 2007, 06:50 PM
Getting whether to add the bonus is pretty easy:

var level as number
level = #totallevelcount[] ~total levels
if ((level - 1) % 2 == 0) then ~ we're good. Note: I haven't actually tested if == is the boolean equal, and I can't see it in the docs
~ add bonus, somehow. This is likely a "find the skill point total for the new class, and add 2 to it"
endif

Thanks for reminding me that I'm going to have to figure out which class was added, and add to that, as the program (correctly, of course) divides skill points per class.

Laz

Beware the JabberOrk
lazarus is offline   #13 Reply With Quote
lazarus
Junior Member
 
Join Date: Dec 2007
Posts: 22

Old December 8th, 2007, 12:28 PM
Whee! Now's where I hit another hard part: the Halfbreeds. Like HARP, Warlords of the Accordlands allows you to mate any two races to come out with a halfbreed. What this means is that I have to figure out a mechanism to do that in Hero Lab. Preferably, I would do it like the "Custom Abilities" picks in classes, but I don't think that's really doable for a race. So, I have two options:
  1. Create a Race for each halfbreed combination (including, say, Dwarf/Elf and Elf/Dwarf, as that would be easier to find)
  2. Use the Feat mechanism and some validation rules to pick up two Racial Abilities, and no more, and each different.
  3. Figure out how to write GUI elements for picking them up - I'd love to be able to pop up a dialog box for getting the user options, but I doubt there's support for that yet.

#1 is probably easier, but clutters up the datafiles with duplicate entries. #2 is not very intuitive, but will likely allow me to get to know the Feat validation stuff so that when I get to the Birthright Feats and stuff, they should be easy to code #3 is what's preferable for me ... but likely requires coding on LoneWolf's end (even if it's just put a hook into the scripting language)

Laz

Beware the JabberOrk
lazarus is offline   #14 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old December 13th, 2007, 01:52 PM
lazarus wrote:
>
>
> I'm doing some testing, to see how things are going to work. By that, I
> mean I'm implementing a skeleton for the Nothrog race and the Assassin
> class in the Warlords game. I have three issues:
>
> 1) I can't figure out how to change a class's hit die type - what I mean
> by this, is that the Nothrog Assassin has a d8 hit die rather than the
> d6 of everyone else. I don't want to clone classes, as there's only 3
> abilities that are different for each. If this capability doesn't exist
> in the default d20 dataset, how would I go about making it go?


Do you mean that a Nothrog assassin has a d8 hit die, but all other
assassins of other races have a d6 hit dice?

I think the easiest way to handle this would be to create a new "Class
Level" entry for the Nothrog assassin. Create the assassin as normal,
with a d6 hit dice, then go to the "Class Level" tab in the editor and
select the "Assassin" class. Then use the "Duplicate" button to make a
duplicate copy of it, and change the hit dice to 8 instead of 6.

You should probably name the duplicated class "Assassin (Nothrog)" or
something similar to distinguish it, and you can then add pre-requisites
to make sure a Nothrog doesn't take the normal assassin class.


> 2) the quoted above (hero.tagis[Race.Elf]) doesn't seem to work. At
> least, I'm not sure how to make it work. What I mean is this: I don't
> know how to add in Nothrog (the id I'm using is rNoth for that) to the
> Race. context. Also, when my PC is an Elf, the ability is disabled, and
> when the PC is not an elf, the ability is still disabled. Of course, I'm
> not sure how to set up a script - I don't recall seeing a tutorial on that.


You should be able to add a Race tag by doing the following:

1) Select the Nothrog race in the editor.
2) Scroll down the list to "Counts As Races..." in the "Important Race
Details" section.
3) Click the edit button, then click "Human" (I assume they're human?)
and "New Tag" in the list that pops up. Give the new tag an id of "Nothrog".

The "Race.Nothrog" tag should then be added to the hero whenever you're
a Nothrog.


> 3) In the Class Abilities tab, there is a selection for Source.
> Unfortunately, this is by name and not by id, so I can't pick out which
> of the three (?!) "Assassin" entries is mine.


Ah, that's a good point. I'll change it so that the id is shown as well
as the name.


> Also, I'm not sure where to look to see the Barbarian "Fast Movement"
> ability.


Go to the "Class Special" tab and hit the "New (Copy)" button, then
scroll down the list until you see "Fast Movement". Once you copy the
Fast Movement ability, you can look at all the scripts it has, then
delete it when you're done.


Hope this helps,

--
Colen McAlister, colen@wolflair.com
Chief Engineer, Lone Wolf Development
Colen is offline   #15 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old December 13th, 2007, 02:11 PM
lazarus wrote:
>
>
> (for the record, I have the Race/Class ability thing all figured out,
> except for how I'm going to do Clerics)
>
> I have a question: Deverenians get +2 skill points every odd level. I've
> figured out at least that I can give ".5" as a value for initial skill
> points, but I'd like to do it in a script. I've got it all done up to
> assigning that ... what field where do I add that to? I assume it's
> something like hero.child[aSkills].field[??].value += 2.


Wow... 2 skill points every other level? What's wrong with 1 skill point
every level?

OK, that's going to be... interesting. We're going to need to iterate
through all the class levels you have, then add 1 skill point to every
odd-numbered one (or even-numbered, if that's how it works).

So, I think this is what we need to do, as an eval script on the
Devernian race (First / 10000 will do). It's kinda complex, but it works.

~ Set up some variables we'll need later
var index as number
var points as number
var classindex as number

~ Iterate through all class levels
foreach pick in hero where "component.BaseClass"

~ Get the index of this level within the list of class levels.
index = each.field[cIndex].value

~ If the index is odd, we want to add 2 skill points.
~ Otherwise, 0.
if (index % 2 = 1) then
points = 2
else
points = 0
endif

~ Get the index of this class's skill point totals
~ in the list of classes.
classindex = each.linkage[helper].field[cClsIndex].value

~ Add the skill points to the class total.
hero.child[Totals].field[tSkTotals].arrayvalue[classindex] += points
nexteach


You'll notice at the end we're doing something funky - the total count
of skill points for each class is maintained in an array in the Totals
pick. We have to find the right place in that array and add the right
number of points to it.


> (oh, and is there a spot to put in feature requests? I'd love to see
> syntax highlighting on the script editor windows )


I'd love it too, but unfortunately I think it will be very hard. I've
added it to the list, but don't hold your breath for it.


--
Colen McAlister, colen@wolflair.com
Chief Engineer, Lone Wolf Development
Colen is offline   #16 Reply With Quote
lazarus
Junior Member
 
Join Date: Dec 2007
Posts: 22

Old December 13th, 2007, 02:11 PM
Quote:
Originally Posted by Colen
Do you mean that a Nothrog assassin has a d8 hit die, but all other assassins of other races have a d6 hit dice?
Indeed.

Quote:
I think the easiest way to handle this would be to create a new "Class
Level" entry for the Nothrog assassin. Create the assassin as normal,
with a d6 hit dice, then go to the "Class Level" tab in the editor and
select the "Assassin" class. Then use the "Duplicate" button to make a
duplicate copy of it, and change the hit dice to 8 instead of 6.

You should probably name the duplicated class "Assassin (Nothrog)" or
something similar to distinguish it, and you can then add pre-requisites
to make sure a Nothrog doesn't take the normal assassin class.
I know I could do it that way ... is there a way to alter the class list depending on character race? 'cause, really, I would prefer to have things autoselect. Is it possible to have the Class bootstrap the appropriate Class Level in a script, or is that something that's not doable at the moment? Can it be added in easily if it's not there already?


Quote:
You should be able to add a Race tag by doing the following:
Found.

Quote:
> 3) In the Class Abilities tab, there is a selection for Source.
> Unfortunately, this is by name and not by id, so I can't pick out which
> of the three (?!) "Assassin" entries is mine.


Ah, that's a good point. I'll change it so that the id is shown as well
as the name.
thanks, that'll make life easier


Quote:
> Also, I'm not sure where to look to see the Barbarian "Fast Movement"
> ability.


Go to the "Class Special" tab and hit the "New (Copy)" button, then
scroll down the list until you see "Fast Movement". Once you copy the
Fast Movement ability, you can look at all the scripts it has, then
delete it when you're done.
Cool. Hadn't thought of doing that. I just found it in the xml and looked at that


Quote:
Hope this helps
Thanks. Have anything on my further problems? (specifically, the Halfbreed thing, and the Deverenian Skill Point deal)

Quote:
Colen McAlister, colen@wolflair.com
Chief Engineer, Lone Wolf Development
Laz

Beware the JabberOrk
lazarus is offline   #17 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old December 13th, 2007, 02:13 PM
lazarus wrote:
>
>
> Whee! Now's where I hit another hard part: the Halfbreeds. Like HARP,
> Warlords of the Accordlands allows you to mate any two races to come out
> with a halfbreed. What this means is that I have to figure out a
> mechanism to do that in Hero Lab. Preferably, I would do it like the
> "Custom Abilities" picks in classes, but I don't think that's really
> doable for a race. So, I have two options:
>
>
> 1. Create a Race for each halfbreed combination (including, say,
> Dwarf/Elf and Elf/Dwarf, as that would be easier to find)
> 2. Use the Feat mechanism and some validation rules to pick up two
> Racial Abilities, and no more, and each different.
> 3. Figure out how to write GUI elements for picking them up - I'd
> love to be able to pop up a dialog box for getting the user
> options, but I doubt there's support for that yet.
>
>
>
> #1 is probably easier, but clutters up the datafiles with duplicate
> entries. #2 is not very intuitive, but will likely allow me to get to
> know the Feat validation stuff so that when I get to the Birthright
> Feats and stuff, they should be easy to code #3 is what's preferable
> for me ... but likely requires coding on LoneWolf's end (even if it's
> just put a hook into the scripting language)


I'm not sure how to handle this because I'm not exactly sure how
Halfbreeds work. If I pick a halfbreed elf/dwarf, what does that mean?
Do I get all the elf and dwarf special abilities, or do I have to pick a
certain number from a specific list?


--
Colen McAlister, colen@wolflair.com
Chief Engineer, Lone Wolf Development
Colen is offline   #18 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old December 13th, 2007, 02:34 PM
lazarus wrote:
> I think the easiest way to handle this would be to create a new "Class
> Level" entry for the Nothrog assassin. Create the assassin as normal,
> with a d6 hit dice, then go to the "Class Level" tab in the editor and
> select the "Assassin" class. Then use the "Duplicate" button to make a
> duplicate copy of it, and change the hit dice to 8 instead of 6.
>
> You should probably name the duplicated class "Assassin (Nothrog)" or
> something similar to distinguish it, and you can then add pre-requisites
> to make sure a Nothrog doesn't take the normal assassin class.

> I know I could do it that way ... is there a way to alter the class list
> depending on character race? 'cause, really, I would prefer to have
> things autoselect. Is it possible to have the Class bootstrap the
> appropriate Class Level in a script, or is that something that's not
> doable at the moment? Can it be added in easily if it's not there already?


Class levels bootstrap classes, so doing it the other way around
wouldn't work. Ah, actually, you should be able to do it like this:

if (hero.tagis[Race.Nothrog] <> 0) then
field[cHitDice].value = 8
endif

At that as an eval script on the class level, and everything should work
nicely.


> Thanks. Have anything on my further problems? (specifically, the
> Halfbreed thing, and the Deverenian Skill Point deal)

Those replies should be posting very soon, if they aren't there already.



--
Colen McAlister, colen@wolflair.com
Chief Engineer, Lone Wolf Development
Colen is offline   #19 Reply With Quote
lazarus
Junior Member
 
Join Date: Dec 2007
Posts: 22

Old December 13th, 2007, 03:44 PM
The way Halfbreeds work is this: basically, you choose your two parent races, and you get a specific ratial ability for each (that is, there is an Elf Halfbreed ability and a Dwarf Halfbreed ability, and your Elf/Dwarf would have those, and none of the others)

Laz

Beware the JabberOrk
lazarus is offline   #20 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:52 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.