I'm trying to code a few different sizes of barrel (based on real-world cooperage) that will adjust their weight based on how many 4 oz. "servings" are contained within them. (My initial intention is to use them to keep track of how many doses of "Tears to Wine" I have, since a single creature drinking the entire output of a first level druid's casting of the spell at 3.74 gallons (0.5'^3) would be enough to induce water poisoning and kill most people.)
I have the barrels set up so that they appear in Tracked Resources with an appropriate number of "charges", and I can currently change the weight from empty to full based on a checkbox under Activated Abilities using an Eval Script.
Is there an existing item I could scavenge code from that programmatically checks the Tracked Resources/remaining charges value and does something based on that?
Is it possible to programmatically change the number of "charges" used so that I could use the activation checkbox to 'refill' a barrel? Similarly, could I clear the checkbox from my script if the number of charges drops below a certain point?
Is there some way to put a button rather than a checkbox in the activation area as more appropriate than a button for refilling?
In looking at the Leadership feat, I can see how it adds the tracker for modifiers to the leadership score, but I haven't been able to find in the editor where this is handled programmatically; I can see where it bootstraps 'LeaderHelp', but I can't find that thing in the editor.
Finally, is what I'm proposing currently within the known capabilities of Hero Lab?
I have the barrels set up so that they appear in Tracked Resources with an appropriate number of "charges", and I can currently change the weight from empty to full based on a checkbox under Activated Abilities using an Eval Script.
Is there an existing item I could scavenge code from that programmatically checks the Tracked Resources/remaining charges value and does something based on that?
Is it possible to programmatically change the number of "charges" used so that I could use the activation checkbox to 'refill' a barrel? Similarly, could I clear the checkbox from my script if the number of charges drops below a certain point?
Is there some way to put a button rather than a checkbox in the activation area as more appropriate than a button for refilling?
In looking at the Leadership feat, I can see how it adds the tracker for modifiers to the leadership score, but I haven't been able to find in the editor where this is handled programmatically; I can see where it bootstraps 'LeaderHelp', but I can't find that thing in the editor.
Finally, is what I'm proposing currently within the known capabilities of Hero Lab?