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

API or Macro? reducing the "Hit Dice" on the 5e sheet

I don't know if this is actually an API question or if it is something I can make a macro to do, so here goes.  I recently found that anything in the resources section can be used as ammunition for anything in the attacks section of the sheet.  So, since I use healer's kit dependency in my game, I thought that I could make an attack on the sheet that is called Hit Dice and do one of that characters dice + con in healing.  Then make a macro called HD that processes that attack and reduces by one the HD on their character sheet.  I'm just not a programmer so I can't get my head around how to make it happen.  Any help would be appreciated.  BTW, this really does work great, with ammo tracking on, when they use that button it takes one off of the healing kit resource and sends to chat how many they have left.  It works wonderful for things like bardic inspiration, second wind and other similar abilities.
1548852628
The Aaron
Roll20 Production Team
API Scripter
I didn’t respond to your other post because I was unclear whether you had a question or were just discussing what you had been setting up. I think you would get more responses if you could clarify what you actually need help with, or what you are trying to inform others about if that’s your intent. 
1548853661
Loren the GM
Pro
Marketplace Creator
Also not quite sure of the question, but I’ll point you to a script here on the forums that handles some basic guy dice functionality. Basically it allows your players to click on hit dice text on their sheet and automatically handles healing and reduces hit dice on their sheet by 1. Maybe it will help with what you are looking for. <a href="https://app.roll20.net/forum/post/5581501/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/5581501/slug%7D</a>
The normal way to roll hit dice with the 5e sheet is to click on the words 'Hit Dice' right underneath where your hit dice are displayed on the sheet. &nbsp;This will ask you which of your classes' dice you want to roll and then do the 1dx+CON roll. &nbsp;It does not currently then decrease the Hit Dice number shown; you have to manually hit the down arrow to decrease the value. Yes, we could solve this problem with an API plugin (and according to Loren, someone has,) but just in my opinion, this is a bug you should file against the 5e OGL sheet. &nbsp;They should just put a hook in there to decrement the counter when you click "Hit Dice." &nbsp; I think the normal case is that people use Hit Dice and don't immediately get them back, so it really should decrement by default.
1548867202
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
My understanding is that for it to change in value, it would require the accompanying script.
I’m not near a computer, but I’ll certainly give that API a try later on. &nbsp;It sounds like it is exactly what I was looking for. &nbsp;Thanks for the help.