View Single Post
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245

Old June 25th, 2011, 06:01 PM
2) I don't know how to add a deflection AC bonus = to Charisma bonus

The script you wrote should work. I think you must be running it too early, before the Charisma score is set. Above the eval script window there is a section for Phase and Priority. Try setting them to Post Attributes and 10000 respectively.

3) DA are supposed to get an HP increase of 1 per hit dice it possess at levels 2,4,6,8,10 & 12.... No idea how to do that

Same with this, you are probably running the script before the Hit Dice have been calculated. Try Post Levels 10000. You will also need to define some conditions as to under what circumstances the bonus HP will be added (i.e. don't add this until we hit level 2, 4, 6, whatever). Try and use the information below to make that.

4) At lvl 4 damage reduction is supposed to made such that it can only be overcome by epic weapons (+6 or higher) and lvl8 it increases by a factor of 5) (ie. 15/epic --> 20/epic), don't know how to do any of that

The program only recognizes certain words, and Final is not among them. This is why #2 starts out with "var bonus as number", we are telling HL we are making a new variable named bonus, and it will be a number. Then in the next line we define what that number is. The "Final 10000" included in that script is meant to tell you what phase and priority to run it at. Delete it from the script and set the correct timing above, then your error should go away.

Also wouldn't the lines

if (field[xTotalLev].value >= 8) then
bonus += 5

result in a character getting the +5 if they have a character level equal or higher than 8? Because I want that to happen at the 8th class level not character level.

Level is tracked in several different places in HL.

On each hero there is a "Totals" thing that keeps track of the characters total Hit dice (the field "tHitDice") and the total number of class levels (not counting racial HD, the "tLevel" field).

On each class helper the field "cTotalLev" counts the number of levels taken in this class and passes that on to all class abilities attached to it.

And on each class ability the field "xTotalLev" counts the number of levels that have been applied to this class ability. This is important because some abilities can be inherited from multiple classes which stack levels, like Trap sense from both the rogue and barbarian class. Also, certain items like the monk's robe give bonuses to certain class abilities but not others, so they can't add to the cTotalLev on the Monk class helper. That would pass down to all associated monk abilities. Instead they add to the xTotalLev field of each class ability they modify.

A note on paths. Each script starts on it's current home thing, unless you tell it otherwise. The script I gave you was meant to be placed on the class special, so "field[xTotalLev].value >= 8" needs no earlier part.

If you were to put the same on the Class Helper for example, you'd get an error because that does not have an xTotalLev field. Instead, when referring to something outside your current thing, you have to draw a path. Look at the line for your Deflection bonus to AC script.


Each dot is like an arrow to the next thing. The above means "Start at the hero, then go to the hero's child thing ArmorClass, then go to the field named tACDeflect, and get the value"

If the script were actually on the ArmorClass thing, you would only need "field[tACDeflect].value"

So in short, "xTotalLev" refers only to levels applied to this class special, not total number of class levels (that would be "hero.child[Totals].field[tLevel].value") taken.

Tell me if you have more questions.
Lawful_g is offline   #7 Reply With Quote