So lets step this one step at a time.
Lets start with looking what is already in HL. We find a "Hit Point" adjustment that seems to work. Only issue is its running too soon and its not affecting tBonusHP where the Con bonus gets applied. So we set it to Post-Attributes/1 so it runs REALLY early and change to tBonusHP and see if it works:
Code:
~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)
~ Add to our HP
herofield[tBonusHP].value += field[pAdjust].value
So we test the above and it works. It will easily adjust the value up or down at Post-Attributes/1. So far so good.
But we want to remove the "Con" bonus now and see if we can get the tBonusHP value to be zero. So we add logic that takes the character level times the Con
Modifier, as we have to take into account negative values, and subtracts it out of the bonus. So we get the following script:
Code:
~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)
~ Add to our HP
herofield[tBonusHP].value += field[pAdjust].value
~ Remove Con Bonus from Bonus HP
herofield[tBonusHP].value -= #totallevelcount[] * #attrmod[aCON]
Now we test to make sure that a 12,14 and even 8 Con score gives us a bonus of "zero" extra Hit Points. But we can get bonus HP from FC so make sure you have a class and pick a +1 Hit Point FC. Does the bonus from it still apply? Yes so we are good. Now we should test with Toughness Feat and make sure its working. Perfect the extra HP from Toughness is still adding in.
Now we have to add in a bonus from Wis based on the modifier times the level.
Code:
~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)
~ Add to our HP
herofield[tBonusHP].value += field[pAdjust].value
~ Remove Con Bonus from Bonus HP
herofield[tBonusHP].value -= #totallevelcount[] * #attrmod[aCON]
~ Add Wis Bonus to Bonus HP
herofield[tBonusHP].value += #totallevelcount[] * #attrmod[aWIS]
We test it out and boom we get the Wis modifier to HP. We use a 12, 14 and 8 ability score to make sure its calculating it all correctly.
Now that we know it works all you want is the following running at "
Post-Attributes/1" timing:
Code:
[B][COLOR="Green"]~ Remove Con Modifier from Bonus HP[/COLOR][/B]
herofield[tBonusHP].value -= #totallevelcount[] * #attrmod[aCON]
[B][COLOR="Green"]~ Add Wis Modifier to Bonus HP[/COLOR][/B]
herofield[tBonusHP].value += #totallevelcount[] * #attrmod[aWIS]