Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Does anyone know the formula to add bonus HP per hit die/level? (http://forums.wolflair.com/showthread.php?t=65127)

Senko November 21st, 2020 02:18 PM

Does anyone know the formula to add bonus HP per hit die/level?
 
I'm trying to create the mighty template and it adds

A mighty creature gains +10 bonus hit points per Hit Die (minimum +50)

Amongst other things. I've tried hunting for something that adds HP per hit die to adapt but I haven't found any so I'm wondering does anyone know the fomula to do this off the top of their head please? Otherwise I'll just keep hunting, thanks in advance for any help.

Lord Magus November 21st, 2020 03:20 PM

Off the top of my head, I'd have a look at scripts on the Toughness feat (which adds 1 hp/lvl, min 3). Not near HL to see whether it's indeed helpful.

Senko November 22nd, 2020 07:21 PM

Stupid password difficulties.

Good idea thanks, I hadn't thought of that.

The scripts there do nothing in the template but I'll play around and see if I can figure out why.


~ If we are using the wounds and vigor variant we need to adjust for that
if (hero.tagis[source.UCWound] <> 0) then
~ our bonus is our hit dice
field[abValue].value += herofield[tHitDice].value
else
~ our bonus is our hit dice or 3, whichever is higher
field[abValue].value += maximum(herofield[tHitDice].value, 3)
endif


and


~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

~ If we are using the wounds and vigor variant we need to adjust for that
if (hero.tagis[source.UCWound] <> 0) then
~ add that bonus to our wounds total
container.child[Wounds].field[wndFeat].value += field[abValue].value
else
~ add that bonus to our hit points
container.child[Totals].field[tBonusHP].value += field[abValue].value
endif

Ualaa November 23rd, 2020 04:58 AM

There's an adjustment, it's either part of hero lab entirely or part of the Community Package.
You can add X hit points per level with it.

That does exactly what you're looking for, so I'd look at that.

RavenX November 23rd, 2020 01:15 PM

Quote:

Originally Posted by Senko (Post 292027)
Stupid password difficulties.

Good idea thanks, I hadn't thought of that.

The scripts there do nothing in the template but I'll play around and see if I can figure out why.


~ If we are using the wounds and vigor variant we need to adjust for that
if (hero.tagis[source.UCWound] <> 0) then
~ our bonus is our hit dice
field[abValue].value += herofield[tHitDice].value
else
~ our bonus is our hit dice or 3, whichever is higher
field[abValue].value += maximum(herofield[tHitDice].value, 3)
endif


and


~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

~ If we are using the wounds and vigor variant we need to adjust for that
if (hero.tagis[source.UCWound] <> 0) then
~ add that bonus to our wounds total
container.child[Wounds].field[wndFeat].value += field[abValue].value
else
~ add that bonus to our hit points
container.child[Totals].field[tBonusHP].value += field[abValue].value
endif

You should be looking at Priority and Timing as well, not just the script. Everything in Hero Lab has a Phase and Priority, if you don't time the script right it won't do anything. Also, the else part of that first if then is not needed if you just want to add a number of hit points equal to HD.

Senko November 23rd, 2020 02:32 PM

Quote:

Originally Posted by Ualaa (Post 292030)
There's an adjustment, it's either part of hero lab entirely or part of the Community Package.
You can add X hit points per level with it.

That does exactly what you're looking for, so I'd look at that.

I actually tried that first if your talking about what I think you are. I can use that in permanent adjustment on the character sheeet and just give a character bonus HP but I need to change it each level manually for each character. I don't know where to find that in the editor to make it part of a template. I've a community tab but nothing there really makes sense to me.

Quote:

Originally Posted by RavenX (Post 292042)
You should be looking at Priority and Timing as well, not just the script. Everything in Hero Lab has a Phase and Priority, if you don't time the script right it won't do anything. Also, the else part of that first if then is not needed if you just want to add a number of hit points equal to HD.

I didn't include the timing and priority information before because I figured that could just be migrated across since they're both post levels at 5,000 and 15,000 priority with no timing information specified and be fine. I was actually digging through the tutorials on the theory its the hero child or the like that is not mapping correctly.

Good to get confirmation on the or else part I thought I could just cut the first half of that but until I got it adding the hp that was just being left alone to keep it as close to the toughness feat.

RavenX November 24th, 2020 05:46 PM

Phase and Priority are essential, they determine the timing on when the script runs. Keep in mind this script is adding the bonus directly to the class levels not the overall hp.

Senko November 25th, 2020 10:17 PM

Quote:

Originally Posted by RavenX (Post 292067)
Phase and Priority are essential, they determine the timing on when the script runs. Keep in mind this script is adding the bonus directly to the class levels not the overall hp.

Interesting though I don't see how it would affect anything here. A direct copy script, phase, priority. Add template, add levels no HP, add template, add levels, add toughness feat, get bonus hp.

Mathias November 26th, 2020 08:18 AM

Senko, that code from post #2 in this thread is what you put in an eval script on the template itself? Or was this on an ability bootstrapped from the template? Because that shouldn't have even compiled if it was on the template - the abValue field does not exist on the "Template" compset, the way it does on the "Feat" compset.

You'll need to use a variable instead - replace all references to abValue with the variable.
Code:

var hitpointstoadd as number

hitpointstoadd += herofield[tHitDice].value

Oh, and in the Develop menu, make sure you have "Enable Data File Debugging" turned on. That would have given you extra error messages that might have flagged this.

Also, in the second section of that template, Helper.FtDisable is a test that is only relevant to feats.

Senko November 27th, 2020 01:00 AM

Ok in order . . .

1) It was in the eval script on the template itself. It not compiling would explain why it didn't add hp I thought I had an invalid identifier in there good to know I was on the right track even if it would probably have taken me a lot longer to track it down.

2) Thanks for the correct variable I'll play around with it when I have some more time. I'm obviously still entering it wrong as its not changing anything.

3) I'll enable that debugger.

4) So I take it . . .

~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

~ If we are using the wounds and vigor variant we need to adjust for that
if (hero.tagis[source.UCWound] <> 0) then
~ add that bonus to our wounds total
container.child[Wounds].field[wndFeat].value += field[abValue].value
else
~ add that bonus to our hit points
container.child[Totals].field[tBonusHP].value += field[abValue].value
endif

can be deleted in its entirety?

Thanks for the help.


All times are GMT -8. The time now is 03:20 AM.

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