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

Decrement Value of an attribute via Ability

Hi,

I'd like to make a macro that my players can click to decrement the number of spell slots that they have left. 

Before someone responds with "That's an API only feature/Pro only" I have the subscription, but I'm trying to figure out how I would even link a script to an ability, or if the API can be used in macros. So far the API guide has not been helpful. 

Thanks!


July 11 (5 years ago)
Kraynic
Pro
Sheet Author

You might check out the Ammo script.  It is in the drop down list on the API settings page.  Decreasing or increasing ammo/charge values is exactly what it is for.  Install it in a test game (or import it).  You can look at the instructions for it and see if it will work for you, or poke around in the code to see how it was done for that script to make something of your own.

July 11 (5 years ago)
David M.
Pro
API Scripter

What system (& character sheet) are you using? Can't access my games right now, but if by chance it is the D&D 5th Edition by Roll20 sheet, I'm pretty sure just setting "Ammo tracking" to ON in the character sheet configuration page (the gear icon on the sheet) will track spell slots automatically when spells are cast from the sheet. Kraynic's advice is sound, regardless.