Senior Member
Join Date: Aug 2008
Location: Miamisburg, OH
Posts: 1,322
|
well the title about says it. How can I set the charges to something other then a number, like the character level? Thanks.
|
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
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 |
#2 |
Junior Member
Join Date: Feb 2010
Posts: 23
|
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 |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
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. |
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
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.
|
#5 |
Junior Member
Join Date: Feb 2010
Posts: 23
|
Thanks, I'll see if I can puzzle it out. I'm not the programmer I used to be!
-TG |
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
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.
|
#7 |
Junior Member
Join Date: Feb 2010
Posts: 23
|
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 |
#8 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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 |
#9 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
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. |
#10 |
|
|