Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
So I managed to work out a work around that lets the user specify what level they took Nymph's kiss. What I am trying to do is use a foreach find every class thing with an index equal or higher, then transition from there to the class helper and add 1 skill point. How can I do this?
|
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
I believe this problem is one that's more my department, rather than making you figure it out.
Unfortunately, if you simply modify the cSkills field on the class, that will change the skill points of all the class levels, not just the levels at or above the point you want. Code:
~search through all the class levels foreach pick in hero from BaseClass ~for each class level that's at or above the level we've chosen if (field[cLvlIndex].value >= field[hUsed].value) then ~retrieve the cClsIndex from the class helper, and use that to figure ~out which arrayvalue of the skill totals array to add a bonus to ~we'll add +1, since this will repeat once for every class level herofield[tSkTotals].arrayvalue[eachpick.linkage[helper].field[cClsIndex].value] += 1 ~if the feat was taken at level 1, and we're modifying the class level ~at level 1, add another 3 skill points, so that we've added +4 total ~for this level if (field[hUsed].value= 1) then if (field[cLvlIndex].value = 1) then herofield[tSkTotals].arrayvalue[eachpick.linkage[helper].field[cClsIndex].value] += 3 endif endif endif nexteach Alright, now to try to explain that. herofield[tSkTotals] is the array that stores the total skill points available you see at the top of each column on the skills tab. field[cClsIndex].value is the left-right position of each class helper in that array. So, Code:
eachpick.linkage[helper].field[cClsIndex].value Code:
herofield[tSkTotals].arrayvalue[] |
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
Thanks, that fixed it after a little tweak (had to put "each." in front of "field[cLvlIndex].value")
If you are curious, the way I checked for level was to create 20 invisible specials with a user tag (PickLevel) and each with a tag specific to them (Level1, Level2, etc). On the feat I have the selection limited to things with the User.Picklevel tag, and an eval script that forwards the Level? tag for the selected invisible special to the hero. A second eval script says "if this tag, then this level" which is used in subsequent calculations... I actually did this first for the exalted bonus feats for Vow of Poverty, but thought it would work well for Nymph's kiss as well. And now that it is done, I have Book of Exalted Deeds feats finished. |
#3 |
|
|