• 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

Vitality

Frodie

Well-known member
Try to add wounds and Vitality to a house game. I got the wounds to work, but not Vitality.
Vitality is just a copy of Hit Points. I am trying a tracker with no luck:

field[trkMax].value += hero.child
PHP:
 
What phase and priority are you running the script at? And what is the problem you are encountering?

If the problem is that the trkMax field = 0 then you probably need to move your script to later.
 
child[X] isn't enough - there has to be a reference to a specific thing on that child.

Also, be careful what you think is Hit Points. The "p" prefix means "in-Play" - the +/- HP adjustment. For something that affects the entire character, you're looking for the prefix "t" for "Totals"
 
field[trkMax].value = hero.child[tHP]

I am getting:

Syntax error in 'eval' script for Thing 'trkVitalit' (Eval Script '#1') on line 1
-> Non-existent thing 'tHP' used by script

I have it a the final phase at a 10500, but I did move it around, but same error
 
Looking at the debug windows, 'tHP' is listed under the Hero Field, so I think you may need:

field[trkMax].value = hero.field[tHP].value
 
Also tried
herofield[tHP].value = field[trkMax].value
and I don't get an error, but it doesn't seem to work either
 
Got it, (may not be perfect, but works)

var ap as number
ap = 0 + (herofield[tHP].value)
ap = round(ap, 0, -1)

~ Add to our total charges.
field[trkMax].value += ap
 
BTW - This is what I used for Wounds, seems to work ok.

var sp as number
sp = hero.child[aCON].field[aFinalVal].value * 1
sp = round(sp, 0, -1)

~ Add to our total charges.
field[trkMax].value += sp
 
BTW - This is what I used for Wounds, seems to work ok.

var sp as number
sp = hero.child[aCON].field[aFinalVal].value * 1
sp = round(sp, 0, -1)

~ Add to our total charges.
field[trkMax].value += sp
Just as an FYI the above could be turned into the following:
Code:
~ Add to our total charges.
field[trkMax].value += round(hero.child[aCON].field[aFinalVal].value,0,-1)

As unless I am missing something that is exactly the same logic in one line as your 3 lines.
 
Both are on the Tracker secton pg 2 if printed.

BTW - I attached the file with the new script :-) and I did try to use the replaceID with tHP, but no luck. IDK if you can do that or not, but they do show up in the Trackers.
 

Attachments

Last edited:
meanwhile i added my wounds as ability, using a gamemechanic that bootstraps the "wounds" ability. All fine not, except that the current value is set to 1 not to the maximum value (that is calculated fine). Hmm...minor issue.
I dont use a tracker currently, only a mechanic and the ability.
 
Back
Top