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
chiefweasel
Senior Member
 
Join Date: Aug 2008
Location: Miamisburg, OH
Posts: 1,322

Old September 15th, 2009, 05:32 PM
well the title about says it. How can I set the charges to something other then a number, like the character level? Thanks.
chiefweasel is offline   #1 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old September 15th, 2009, 06:29 PM
If you are doing it to the level in a certain class

var level as number
var bonus as number
level = hero.child[cHelpXXX].field[cTotalLev].value

~ Then make a script that sets the bonus based on level
if (level >= 8) then
bonus = 2
elseif (level >= 3) then
bonus = 1
else
bonus = 0
endif

~ Then set the charges for this thing = to bonus, which we set above
field[hTotal].value = bonus
Lawful_g is offline   #2 Reply With Quote
thegneech
Junior Member
 
Join Date: Feb 2010
Posts: 23

Old February 19th, 2010, 11:22 AM
Yikes! How do you get all of that into the "maximum charges" field? 0.o

I know, that probably sounds incredibly fatuous. But I'm still very new to this and feeling my way around in the dark. Trying to give a custom class "[class level] / day" uses of one of their special abilities.

-The Gneech
thegneech is offline   #3 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old February 19th, 2010, 11:53 AM
It would not go there, it would be put into an Eval Script. There are a series of buttons to the right side of the editor (Below "Summary Text"), the first one is Eval scripts. Click on that one and it will open up a window, then click on "add an eval script" to open up a field for you to type your script in.

Since this script relies on finding out what level your hero is, you will need to set the phase of the script to "Post-Levels (Users)", which is a drop down you should see in your upper left. By default it will be in "First" phase.

Also, if the number of charges is just equal to the number of class levels, a simpler script would be.

field[hTotal].value = hero.child[cHelpXXX].field[cTotalLev].value

Where XXX is the 3 letter code for the class.
Lawful_g is offline   #4 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old February 19th, 2010, 11:54 AM
Hopefully that will help you, feel free to ask any other questions on these boards. I'll answer them if I can, and if I can't figure it out Mathias can.
Lawful_g is offline   #5 Reply With Quote
thegneech
Junior Member
 
Join Date: Feb 2010
Posts: 23

Old February 19th, 2010, 01:03 PM
Thanks, I'll see if I can puzzle it out. I'm not the programmer I used to be!

-TG
thegneech is offline   #6 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old February 19th, 2010, 01:06 PM
If I can figure it out, I am sure you can as well. Admittedly, I had pointers from folks around here as well, so I've got to help out the next generation.
Lawful_g is offline   #7 Reply With Quote
thegneech
Junior Member
 
Join Date: Feb 2010
Posts: 23

Old February 19th, 2010, 01:15 PM
Hrm ... I put "field[hTotal].value = hero.child[cHelpWpM].field[cTotalLev].value" into an Eval script as described, and got the error:

Syntax error in 'eval' script for Thing 'cKiDam' (Eval Script '#1') on line 1
--> Non-existent field 'hTotal' used by script

Could it be a Pathfinder vs. 3.5 issue, changed fieldnames and whatnot?

-TG
thegneech is offline   #8 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old February 19th, 2010, 01:30 PM
In d20, hTotal is used for most uses/period, with a few exceptions. In Pathfinder, it's always trkMax that serves that purpose.

If you're checking this from a class special, you can check the xTotalLev field on the special, rather than finding the class it's attached to and checking cTotalLev. xTotalLev has already been set equal to cTotalLev for you. (If you're checking from a feat you need to find a specific class, but the class specials on a class calculate it for you). In Pathfinder, there's an additional field, xAllLev, which is equal to the combined levels off all the classes that offer that special - useful when a prestige class offers the same ability as a class, and you want them to stack.

in d20:
field[hTotal].value += field[xTotalLev].value

in Pathfinder:
field[trkMax].value += field[xAllLev].value
Mathias is offline   #9 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old February 19th, 2010, 01:38 PM
Yes it could be. I am afraid I don't know much about Pathfinder. I downloaded the demo though, and it looks like the charges field has been changed to be called "trkMax", so try

field[trkMax].value = hero.child[cHelpWpM].field[cTotalLev].value

Also, if you are asking about Pathfinder stuff, there is a seperate forum for that, and they may prove more able to assist than I.
Lawful_g is offline   #10 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 12:11 AM.


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