Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Script:Temp HP and Status - with a ward!?

Hey. A question for you code gurus! I am using the 'Script:Temp HP and Status' api and its great for my players who ALL regularly have temp hp. However we have a wizard in the party who also uses a 'ward' which works just like a buffer shield. I think it means that when damaged, the first damage will go against the ward... then once drained, it will remove temp HP and THEN it will start on their normal hp. Is there a way i can include this ward into the api somehow? Maybe using 'bar 3' or even just an custom 'attribute' ? Thanks
1553138925
The Aaron
Roll20 Production Team
API Scripter
Well, it certainly could  be done, just a question of what way makes the most sense. What’s the max possible value of the ward?
That will change as the player levels up. I think it's double character level, plus INT modifier. Based on this, the absolutel max would be about 50.
Is it an abjuration wizard in 5e? In which case the ward can be used to protect others (from level 6), and in addition the wizard does not have to remove from the ward when taking damage (they can keep it to ward the tank for example, rather than protecting their own hp). I would suggest using a class resource to manage this. Which can then be managed by using ChatSetAttr Add two abilities to the character sheet for the wizard: Reset Ward: !setattr --charid @{character_id} --class_resource|[[@{level}*2+@{Intelligence_Mod}]]|[[@{level}*2+@{Intelligence_Mod}]] Adjust Ward: !setattr --charid @{character_id} --mod --class_resource|-?{Ward Damage:}
Hi Geoff. Yes that's exactly 100% correct. However with so many ways to mitigate damage (temp HP, Ward etc) I was hoping to find the automated solution without needing to hide it away on his character sheet. The current solution is to use Bar1 for  HP , bar2 for ' Ward ' and Bar3 for  Temp_hp. However, I was thinking that if he was to 'donate' some of his Ward to an ally (which to be honest is extremely rare), he could always just manually reduce his own  Bar 2 accordingly whilst asking the player to simply reduce their damage taken by X amount.
Fair enough, our wizard used his ward on others way more than himself which is why I suggested this way. You can of course link bar2 to class resource, but that still doesn't solve the automation request which i'll have to leave to others.