• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Charges set to character level

chiefweasel

Well-known member
well the title about says it. How can I set the charges to something other then a number, like the character level? Thanks.
 
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
 
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 :cool:
 
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.
 
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.
 
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.
 
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 :cool:
 
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
 
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.
 
I know this is a little old, but when I try to follow this I get an error. "Invalid use of a reserved word"

My code, shortened:
Code:
field[hTotal].Value += craftpts
Note: craftpts is a number.

This is a class special in d20.
 
Back
Top