At 12:05 PM 7/13/2007, you wrote:
I am trying to work out an Eval script which will add "n" extra times per day, to the class abilites Rage and Smite.
I've looked at the Extra Turning feat script and I can figure out what it does,
hero.child[xTurning].field[hTotal].value += 4 (add 4 to Turning)
but how and where do I find the Syntax / Naming convention for the Rage and Smite abilities.
I've tried this
hero.child[xRage].field[hTotal].value += 2 Doesn't work!
hero.child[cBbnRage].field[hTotal].value += 2 Still doesn't work!!
Colen is out of town for a little bit of R&R right now, and this is his area of expertise. I'll see what help I can provide, but I'm not sure if I'll be able to provide complete and accurate answers, so this may have to wait until Tuesday (when Colen returns). With that disclaimer established, here's my (potentially flawed) analysis....
Looking at the issue with Smite, there are multiple different "Smite" abilities in the data files. There is the "Smite Evil" of the Celestial template (and "half" flavor), the "Smite Good" of the Fiendish template (and "half" flavor), the "Smite Evil" of the Blackguard prestige class, and the "Smite Good" of the Paladin class. Each of these is currently distinct from one another, although, as I look at this in detail, it might be worthwhile to collapse the good/evil flavors of each type into one instance that is configured for good or evil. Is the "Smite" adjustment you want to perform applicable to all four of these flavors of Smite? Or just two of them?
If the feat can apply to the Celestial/Fiendish flavors, then you simply need to increment the counts for those two abilities. This would be done via the following lines of script:
hero.child[xFieSmite].field[hTotal].value += 2
hero.child[xCelSmite].field[hTotal].value += 2
For the Paladin and Blackguard abilities, there appears to be a niggly problem in the way the data files are setup. The count is initialized properly and the display text is setup in the same script. This means that any changes you make will not be shown properly in the text, but will in the tracking counter. The code you need for these two adjustments is:
hero.child[cPalSmite1].field[hTotal].value += 2
hero.child[cBlkSmite1].field[hTotal].value += 2
Making these changes, however, will display something along the lines of what's shown below.
Smite Good (1/day) < 0/3 >
The value shown in the text is not modified correctly, but the usage tracker does show the correct value. We'll have to get this fixed.
The exact same bug in the data files exists for the Barbarian Rage ability. The displayed text is setup at the time the value is initialized, so any subsequent changes to the value won't be included. However, the usage tracker will show the proper total value. The line you list above for modifying the Rage count is correct, so it should look like the following:
hero.child[cBbnRage].field[hTotal].value += 2
We'll need to tweak the data files so that the displayed text is setup separately, allowing modifications from other feats to be applied before the text is generated. In the meantime, the above changes should get the appropriate behaviors implemented. You'll just need to ignore the text description and focus on the value shown in the usage tracker (e.g. "0/3") until we fix this in the next update.
Hope this helps,
Rob