Rolling hitpoints in the character sheet

After looking at the two page character sheet that comes with the character sheet designer and the code that powers it My question is this
is there any way to change the following code and change from having ten form entries to only having one entry point where you can set the level manually and it would then roll the appropriate number of dice for the class and level.


function RandomHP( fHd, fHp)
{
s = fHd.Text;
var n = fHd.Text.length;
if (n > 0)
{
fHp.Text = EvalDice( fHd.Text);
}
}

function HPLevelTot( fHp)
{
r = '';
if (fHp.Text.length > 0 )
{
r = fHp.Value + ConMod.Value;
}
return r;
}

Leave a Comment