Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - d20 System (http://forums.wolflair.com/forumdisplay.php?f=46)
-   -   Adding hit points multiplied by attribute modifier (http://forums.wolflair.com/showthread.php?t=13395)

bodrin July 2nd, 2011 10:08 PM

Adding hit points multiplied by attribute modifier
 
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!

Kendall-DM July 2nd, 2011 11:48 PM

What you might do is do a tagcount of Hero.HitDice. This will give you the number of hit dice the character has.

bodrin July 2nd, 2011 11:58 PM

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.


All times are GMT -8. The time now is 06:03 PM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.