I have been having some difficulty with getting one of my Eval Scripts to output what I am requesting of it. The primary thing that isn't happening, is the picking of which Attribute Modifier is highest and pulling that number into the variable.
The specific code that doesn't seem to be working is:
Post-attributes; 10000
The full code for those curious is:
Post-attributes; 10000
I am not the best at coding but I somehow manage to find and understand it usually but I've tried for a while to make this work and searched the forums, reading countless posts trying to figure out a solution on my own without any luck. So I am asking for any assistance available from the community.
Thank you.
The specific code that doesn't seem to be working is:
Post-attributes; 10000
Code:
~Pick the highest bonus between our Con and Cha
var highmod as number
highmod += maximum(hero.child[aCHA].field[aModBonus].value, hero.child[aCON].field[aModBonus].value)
The full code for those curious is:
Post-attributes; 10000
Code:
~If we're not shown, not the first copy, or disabled, get out now
doneif (tagis[Helper.ShowSpec] = 0)
doneif (tagis[Helper.FirstCopy] = 0)
doneif (tagis[Helper.SpcDisable] <> 0)
~Pick the highest bonus between our Con and Cha
var highmod as number
highmod += maximum(hero.child[aCHA].field[aModBonus].value, hero.child[aCON].field[aModBonus].value)
~Set the value of half our levels
var halflvl as number
halflvl += round(#totallevelcount[] / 2, 0, -1)
~Calculate our DC
field[abValue].value += 10 + halflvl + highmod
~Display DC
field[livename].text = field[thingname].text & " (DC " & field[abValue].value & ")"
I am not the best at coding but I somehow manage to find and understand it usually but I've tried for a while to make this work and searched the forums, reading countless posts trying to figure out a solution on my own without any luck. So I am asking for any assistance available from the community.
Thank you.