I have given the Rogue a choice in its Special Abilities to choose an Extra Skill Point, but the Extra Skill Point works like Intelligence in that it applies to the current level and every level thereafter. So, for example, a Halfling Rogue with a 10 Int gets 8 skill points per level, but at 10th level he takes this ability and gets 9 skill points per level for each level from 10th to 20th. So I've tried two approaches, one is to just add the extra 1 into herofield[tSkTotals].arrayvalue[index] where the index is for Rogue, but that only adds to the current level, or I can add 1 to hero.child[cHelpRog].field[cSkills].value, but it changes ALL the levels of Rogue. So I've determined that I can just subtract out the previous levels extra points, with the cSkills to the new points per level already set for each level afterwards. Unfortunately, every level wants to run the recalculation of the previous levels, and I want it to no longer run that script. Once the points are subtracted out the first time, and the cSkills set to add an extra point, I no longer need the script to run.
~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)
~ Add an additional skill point per rogue level hereafter.
hero.child[cHelpRog].field[cSkills].value += 1
~ Remove skill points from previous levels in Rogue.
var index as number
var prev as number
index = hero.child[cHelpRog].field[cClsIndex].value
prev = #levelcount[Rogue] + 2
herofield[tSkTotals].arrayvalue[index] -= prev
So, obviously, once this script runs the first time, it continues to run each level to subtract out the previous levels, and I would like it to no longer run the script. I've tried some control statements to ignore the critical section here, but since I don't have a static variable I can set to make sure it paths correctly, it continues to run the script.