• 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

Assign Bonus HP at 1st level

insaneurge

Well-known member
How would i go about a set bonus number of hit points granted at 1st level? I haven't had any luck without either stacking when I multiclass or the bonus hp going away when i level or multiclass.
 
The lazy way (i.e. how I'd probably do it) would be to use the Bonus Hit Point Adjustment under Other Adjustments.
 
The lazy way (i.e. how I'd probably do it) would be to use the Bonus Hit Point Adjustment under Other Adjustments.

That is what i did for myself when i started working on building this data file, however I had such a large number of adjustments added it got kind of confusing. For my players I am trying to have as much as possible done before I give them this user data file.
 
Take a look at the Toughness feat, copy that eval script to a mechanism and modify it as appropriate.
 
Context?

Is this a feat? An ability on a class? Something else? The answer will be different in each of those circumstances.

It is a class ability. I am trying to add bonus hit points at first character level. If the first character level uses a d10, he gains +20, d8 gains 16, d6 gains +12.
 
At this point it would probably be helpful if you could show us your code, including the timing information and how you're bootstrapping the ability to characters.
 
Currently i have created three separate custom abilities, one for each set of bonus hit points. For classes receiving d6 hit points, here is my script.

Code:
pre-levels 10000/1

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

      container.child[Totals].field[tHP].value = container.child[Totals].field[tHP].value + 12

This ability is then bootstrapped to the class itself, in this case the Noble class. Where I have it set under the condition

Code:
count:Classes.? = 1
 
Last edited:
Okay. What that adds up to is "If we have exactly one level in this class, bootstrap this ability that adds the bonus HP". That's why the bonus is going away when you level up the class (because you no longer have exactly one level in that class) or stacking when you multiclass (because then both classes meet the criteria).

Rather than implement this once for each class, what I would do here is make ONE script that all characters automatically get, which looks at the class the character took at first level and adds [2x the class HD size] HP to the hero.

I wouldn't normally provide a complete solution this soon, but eh, 'tis the season and all. So let's go through it step by step.

First, you'll want to use a Mechanic, not class abilities. You're not going to be bootstrapping anything, because Mechanics are auto-added to all characters (provided the Mechanic's source is active). The Mechanic will have one script, which you'll run at Post-Levels/1000. We can actually do this in one line, which goes like this:
Code:
hero.child[Totals].field[tHP].value += hero.findchild[BaseClLev,"Helper.FirstLevel"].field[cHP].value * 2

The first part (before the +=) is substantially similar to what you've already been trying.

The += is just a shortcut; it means instead of "X = X + Y" you can say "X += Y", which is faster to type and easier to read.

The last part is more complicated, and more likely to be confusing if you're new to HL scripting. Basically, "hero.findchild" means "get me the first pick on this character that matches the criteria I'm about to give you".

In the brackets, we pass "BaseClLev" as the first argument, because what we're looking for is an object that represents a class level (not the class itself, just the thing that tells HL what basic stuff you get from a single level in this class).

We pass "Helper.FirstLevel" as the second argument; this is a tag expression that means the class level in question must have this particular tag. As you might have guessed, Helper.FirstLevel is a tag that is applied to a class level to let HL know that this is the very first class level that was applied to the character.

Now that HL has found the class level, we need to get the number of hit points this class gives us. That comes from a field on the class-level object called "cHP". Now, technically this just means the number of hit points you got from this particular level in the class (the number you rolled or whatever during level-up and subsequently entered into the text field), which isn't necessarily the same as the HD size. So other circumstances, we'd have to transition from the class level to the actual class so we can look up its HD size. However, in this particular case we have the benefit of knowing for sure that we're looking at the first class level, and thanks to the "everyone gets max HP at first level" rule we can safely assume that "HP you got from this class level" is the same as "HD size of this class".

So anyway, we transition from the class level to the cHP field and get its value, which we then multiply by 2. That is the final number added to the hero's HP total.
 
Last edited:
That looks a lot more complex than what I'd write - I'd just remove the bootstrap condition, and give the script a Helper.FirstCopy test.
 
Back
Top