Here you are (since I wrote this for something else).
Timing: UserPreAt, 100
Code:
~Count the number of hit dice
var HD as number
HD = hero.tagcount[Hero.HitDice]
~ Add to our HP
hero.child[Totals].field[tHP].value += HD
So, to add in the extra 3 at 1st level, add those HP in on line 3:
Code:
~Count the number of hit dice
var HD as number
HD = hero.tagcount[Hero.HitDice] + 3
~ Add to our HP
hero.child[Totals].field[tHP].value += HD