So try as I might, I can't get this script to function the way I want it to.
It is supposed to work in conjunction between two class abilities. One being "Infernal Constitution" for which I have created a custom tag called "Custom.InfernlCon".
The other ability is "Reservoir" which the class gains every level. There are 20 unique id's for this ability. It's done this way, because I am using the custom array-based menu as a way to activate the ability. If it's set to usrIndex 1, it grants access to the classes special, and adds the user tag "Custom.InfernlCon"
The scripts I used are as follows:
For Reservoir:
Script 1 Phase: Pre-levels Priority: 10000
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
if (hero.child[cvktReserv].field[usrIndex].value <> 0) then
hero.childfound[cHelpVKT].field[cGiveSpec].value += 1
endif
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
if (hero.child[cvktReserv].field[usrIndex].value <> 0) then
perform assign[Custom.InfernlCon]
else
perform delete[Custom.InfernlCon]
endif
---- This is the same script for every copy of this ability. ----
For Infernal Constitution:
Script 1
Phase: Attributes Priority 100
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
~ We will grant the hero a constitution of +1 for every three ~ tags "Custom.InfernalCon" found for a max of +7.
if (hero.tagcount[Custom.InfernlCon] <= 21) then
hero.child[aCON].field[Bonus].value += 7
elseif (hero.tagcount[Custom.InfernlCon] <= 18) then
hero.child[aCON].field[Bonus].value += 6
elseif (hero.tagcount[Custom.InfernlCon] <= 15) then
hero.child[aCON].field[Bonus].value += 5
elseif (hero.tagcount[Custom.InfernlCon] <= 12) then
hero.child[aCON].field[Bonus].value += 4
elseif (hero.tagcount[Custom.InfernlCon] <= 9) then
hero.child[aCON].field[Bonus].value += 3
elseif (hero.tagcount[Custom.InfernlCon] <= 6) then
hero.child[aCON].field[Bonus].value += 2
elseif (hero.tagcount[Custom.InfernlCon] <= 3) then
hero.child[aCON].field[Bonus].value += 1
else
hero.child[aCON].field[Bonus].value += 0
endif
-------------------------
Using the Debug Mode I have found that the tag does propagate and is removed when I switch Reservoir on and off.
However, the bonus +7 appears on the constitution ability score regardless of the tag's presence or not. Would someone be able to point out a flaw if they see it, or have encountered this issue before?
It is supposed to work in conjunction between two class abilities. One being "Infernal Constitution" for which I have created a custom tag called "Custom.InfernlCon".
The other ability is "Reservoir" which the class gains every level. There are 20 unique id's for this ability. It's done this way, because I am using the custom array-based menu as a way to activate the ability. If it's set to usrIndex 1, it grants access to the classes special, and adds the user tag "Custom.InfernlCon"
The scripts I used are as follows:
For Reservoir:
Script 1 Phase: Pre-levels Priority: 10000
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
if (hero.child[cvktReserv].field[usrIndex].value <> 0) then
hero.childfound[cHelpVKT].field[cGiveSpec].value += 1
endif
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
if (hero.child[cvktReserv].field[usrIndex].value <> 0) then
perform assign[Custom.InfernlCon]
else
perform delete[Custom.InfernlCon]
endif
---- This is the same script for every copy of this ability. ----
For Infernal Constitution:
Script 1
Phase: Attributes Priority 100
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
~ We will grant the hero a constitution of +1 for every three ~ tags "Custom.InfernalCon" found for a max of +7.
if (hero.tagcount[Custom.InfernlCon] <= 21) then
hero.child[aCON].field[Bonus].value += 7
elseif (hero.tagcount[Custom.InfernlCon] <= 18) then
hero.child[aCON].field[Bonus].value += 6
elseif (hero.tagcount[Custom.InfernlCon] <= 15) then
hero.child[aCON].field[Bonus].value += 5
elseif (hero.tagcount[Custom.InfernlCon] <= 12) then
hero.child[aCON].field[Bonus].value += 4
elseif (hero.tagcount[Custom.InfernlCon] <= 9) then
hero.child[aCON].field[Bonus].value += 3
elseif (hero.tagcount[Custom.InfernlCon] <= 6) then
hero.child[aCON].field[Bonus].value += 2
elseif (hero.tagcount[Custom.InfernlCon] <= 3) then
hero.child[aCON].field[Bonus].value += 1
else
hero.child[aCON].field[Bonus].value += 0
endif
-------------------------
Using the Debug Mode I have found that the tag does propagate and is removed when I switch Reservoir on and off.
However, the bonus +7 appears on the constitution ability score regardless of the tag's presence or not. Would someone be able to point out a flaw if they see it, or have encountered this issue before?