• 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 total HD very, very early

frumple

Well-known member
I am in need to getting a hero's total HD very early. Like before First/100 early. So before when most tags are added. I have it mostly working with the term

Code:
totalHD = hero.findchild[BaseRace].field[rHitDice].value 
             + hero.childfound[cmhHelper].field[cmhHD].value
             + hero.childcount[cBonusHD]

Which counts the race's intrinsic HD, HD due to customization, and bonus HD added on the Classes tab. However, there is an issue with counting classes HD.

I cannot count class levels that have been bootstrapped. I have tried adding
Code:
hero.haschild[BaseClLev]

but that always returns just 1 if I have a class, not the total number of children from that component.

Ideas? Again this needs to run very early (around First/75).
 
What actually needs that early a count? #totallevelcount[] is available after First/180, so I'd re-examine why your script absolutely needs to come in that early.
 
It is needed to determine MythicTier.MythicRanks based on a creature's HD. I need to set rMythRanks on the BaseRace before First/100 where the MythicTier tags are forwarded to the hero. Since many templates and other things that modify HD do their thing around First/580 I can't simply just look at Hero.HitDice or the like. I also wanted to try to avoid using foreach when I can since I know it can be expensive (this is why I wanted to use haschild). Finally, I also want to set this early enough so that I can use the newly set MythicTier.MythicRank tags for bootstrap conditions.

Unless... is there any reason I couldn't set rMythRanks and manually set the MythicTier.MythicRank tags at a timing soon after First/180?
 
Last edited:
I also just checked running #totallevelcount[] on an Ogre at First/185. It doesn't work, it returns 0.

In fact I am finding #totallevelcount[] will not return a correct value until after Levels/5000
 
Back
Top