• 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 points multiplied by attribute modifier

bodrin

Well-known member
The title says it all, I'm attempting to add hit points to a hero using a script the calculation is

Add hit points equal to Hit Dice multiplied by the attribute modifier.

I can't find the correct identifier for Hit Dice, I've tried rHitDice, tHitDice and numerous other combinations but I keep getting non existent thing errors.
Please help someone I'm losing the rest of my hair!
 
I've managed to get the script working.

Code:
~ Add our Charisma modifier times our Hit Dice to our Hit Point total.

container.child[Totals].field[tHP].value = container.child[Totals].field[tHitDice].value * hero.child[aCHA].field[aModBonus].value + container.child[Totals].field[tHP].value

I'm quite pleased with this as I'm currently at work without Internet access only on an iPhone and can't do major searches of the code base.
 
Back
Top