View Single Post
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old January 31st, 2020, 04:59 AM
I played with this once. The fields on the hit die are tricky and timing has to be done after final/10000 but before render steps. Some of the fields can't be manipulated at all.

Each of the hit die types are stored on the hero in containers named hd4, hd6, hd8, hd10, hd12 and hd20.

You can see the fields on these objects if you have debugging enabled and right-click on the hit die on the In-Play tab.

You can do something like the following:

Check to see if a hero has a d8 hit die.

if (hero.childfound[hd8].field[trkMax].value <> 0) then
... code based on fact you found that you had at least 1d8 to play with

Remove one of the hit die left in the d8 pool.

hero.childfound[hd8].field[trkLeft].value -= 1

The problem in your scenario is that I don't think you can add a button to press that just removes 1 hit die per click. You could probably create an adjustment that you could use pAdjust values on the slider but you would need to create a way to limit it to the proper hd pool and set a maximum to the slider.

Return on investment effort might make this one a tough one to justify.
dungeonguru is offline   #3 Reply With Quote