I'm trying to create a favored class option for a new race/cleric. This option grants a particular domain ability if the character does not already have it, or adds to the number of uses per day if it does.
This code works if I set it to run at Validation/1. Anything before that seems to fail, giving me only the expected uses without this FCO. The only thing I can figure is that the #hasability macro isn't set until just before the validation--am I correct there, or am I overlooking something?
For the adding the ability if it isn't already on the character, this script just seems to have no effect. I assumed that I needed to bootstrap the relevant ability to the FCO, but when I do so and test, I get the error
but only after 'delete and re-add'; compilation seems to work just fine.
Any assistance from anyone would be appreciated.
Code:
field[abValue].value += round(field[fcCount].value/2,0,-1)
if (#hasability[dPlaFist] >=1) then
#trkmax[dPlaFist] += field[abValue].value
else
perform hero.assign[HasAbility.dPlaFist]
endif
This code works if I set it to run at Validation/1. Anything before that seems to fail, giving me only the expected uses without this FCO. The only thing I can figure is that the #hasability macro isn't set until just before the validation--am I correct there, or am I overlooking something?
For the adding the ability if it isn't already on the character, this script just seems to have no effect. I assumed that I needed to bootstrap the relevant ability to the FCO, but when I do so and test, I get the error
Code:
Attempt to access field 'cTotalLev' that does not exist for thing 'fcSC'
Location: 'field calculate' script for Field 'xTotalLev' near line 28
Any assistance from anyone would be appreciated.