• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

adding hit dice using eval script

pippin_nl

Well-known member
Hi,

Is there a way to increase Hit Dice based on the current hit dice. I am currently trying the following in a template:

var v_hero2 as number
v_hero2 = 1/herofield[tHitDice].value
v_hero2 *= 50
v_hero2 = int(v_hero2)
herofield[tHitDice].value += v_hero2

tried timing 499 and 10001
 
You said you tried timing 499 and 10001, but you didn't specify what phases. My guess is that you're running in a phase before tHitDice is calculated.

As far as I remember, bonus HD from template has it's own field (don't manipulate the hero field) which must be calculated and added pretty early in first. tHitDice isn't calculated until way too late, so I'd say try counting the Classes tags on the hero to calculate the HD within the script, modify that however, and add it to the tmHitDice field.
 
Back
Top