If you wanted to base Combat Expertise off of the hero's Hit Dice rather than BAB, how would you change the coding.
This what I got so far, but I can't figure out how to tell Hero Lab to look up the number of Hit Dice.
But that doesn't work, because hero.HitDice is not how you look up the hero's hit dice.
This what I got so far, but I can't figure out how to tell Hero Lab to look up the number of Hit Dice.
var bonus as number
bonus = hero.HitDice.value / 4
field[abValue].value += round(bonus,0,-1) + 1
field[livename].text = "Combat Expertise +/-" & field[abValue].value
if (field[abilActive].value <> 0) then
hero.child[ArmorClass].field[tACDodge].value += field[abValue].value
hero.child[Attack].field[tAtkMelee].value -= field[abValue].value
endif
But that doesn't work, because hero.HitDice is not how you look up the hero's hit dice.