Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
frumple
Senior Member
 
Join Date: Nov 2011
Location: South Riding, VA
Posts: 841

Old April 17th, 2016, 08:23 PM
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.
frumple is offline   #1 Reply With Quote
TobyFox2002
Senior Member
 
Join Date: Nov 2013
Location: Andover, Ma
Posts: 632

Old April 17th, 2016, 09:03 PM
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.
TobyFox2002 is offline   #2 Reply With Quote
TheIronGolem
Senior Member
 
Join Date: Feb 2015
Posts: 676

Old April 17th, 2016, 09:07 PM
Quote:
Originally Posted by TobyFox2002 View Post
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.
TheIronGolem is offline   #3 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old April 17th, 2016, 09:34 PM
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.
Aaron is offline   #4 Reply With Quote
frumple
Senior Member
 
Join Date: Nov 2011
Location: South Riding, VA
Posts: 841

Old April 17th, 2016, 10:41 PM
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 by frumple; April 17th, 2016 at 10:47 PM.
frumple is offline   #5 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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