• 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

Getting current HP before Final/9000

frumple

Well-known member
Is there anyway to get a hero's current hp total before Final/9000 when tCurrentHP is calculated? I want to be able to implement a modification to a hero's attributes based on their current HP.
 
Have you looked at ultimate combat, sounds like something that would be done for wounds threshold stuff. Otherwise, I would think you would just have to calculate things out by hand.

hp from class levels + hp from con + hp from favored class bonuses + hp from any items = total hp.
 
Have you looked at ultimate combat, sounds like something that would be done for wounds threshold stuff. Otherwise, I would think you would just have to calculate things out by hand.

hp from class levels + hp from con + hp from favored class bonuses + hp from any items = total hp.

This is surprisingly hard to do. I tried this route when I was attempting to make Deathful Magic work automatically. The details escape me now, but it ended up proving too unreliable.
 
How many states have to be represented? If it's just on-off you could have an activation for "Below half Hp" for example. If its a bunch you'd probably want to combine a selector with an activation.

I don't think trying to calculate it earlier yourself will be fruitful.
 
Basically I want to be able to activate a feat/ability etc. on the in-play tab and have that auto activate a series of conditions and other effects depending on the hero's current hp. The number of states varies, and can get quite complex very quickly due to some dependencies between these feats and abilities.

For example, standard Diehard, if activated would remove the dying condition and activate the stable and disabled conditions. Now for mythic Diehard, you have the same state as above up to a certain -ve hp value then it turns off disabled and turns on unconscious (which should in turn turns on helpless).

I have actually gotten this working 90%, the problem is modding the hero's Dex. Normally, if the user activated unconscious or helpless Dex is modded to 0 during Attributes. However, I cannot do that since tCurrentHp is not determined until Final/9000. Even if I could calculate tCurrentHP earlier, like in early Post-Attributes I could make it work. I need a way to mod Dex late and have that modification affect anything else that is dependent on Dex. I can make Dex display correctly, by setting aFinalVal and aModBonus, but these values will not be used throughout the rest of HL because they are done after Final/9000.

FYI, here is some sample of the code I got mostly working.

Here abValue is the value at which we fall unconscious. This needs to run after Final/9000 since we need tCurrentHP.
Code:
Final/15000
   
    if (herofield[tCurrentHP].value < field[abValue].value) then
        ~ just in case we haven't taken any class levels yet
    
        if (herofield[tHP].value <> 0) then
           ~ 
           ~ CODE TO TRIGGER Uunconscious state goes here            
           ~

           ~ trigger Helpless
           if (hero.child[pcnHelpls].field[pIsOn].value + hero.tagis[Condition.pcnHelpls] = 0) then
              ~
              ~ CODE TO TRIGGER Helpless state goes here       
              ~

             endif
           endif
        endif
 
Last edited:
Back
Top