Senior Member
Join Date: Nov 2011
Location: South Riding, VA
Posts: 841
|
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.
|
#1 |
Senior Member
Join Date: Nov 2013
Location: Andover, Ma
Posts: 632
|
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. |
#2 |
Senior Member
Join Date: Feb 2015
Posts: 676
|
Quote:
|
|
#3 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
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. |
#4 |
Senior Member
Join Date: Nov 2011
Location: South Riding, VA
Posts: 841
|
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. |
#5 |
|
|