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

Resource Tracking API and Macros

I'm new to using macros and still learning javascript. My DM is pro and has enabled ammo tracking in our game (5e dnd) and I'm trying to get as much use out of it as I can. My character is a drunk, with a constant supply of alcohol and constantly using it up. I've created a macro that allows me to make a Con save and display an emote every time I drink. I'm trying to set it up so that it subtracts 1 resource (Liquor) from my inventory as well, but cannot find any examples so far where someone has done something similar. is it possible? what am I doing wrong? much thanks.
1500293604
The Aaron
Pro
API Scripter
It would be possible, but would require the use of a particular API script which your GM may not have installed. Do you know which 5e Character Sheet your DM has specifically?
He's using the 5th edition OGL. I'm really new to this with no background in any programming languages and the same can be said of my DM. Roll20 has kinda been my inspiration to learn, so any advice is appreciated.
1500299646
The Aaron
Pro
API Scripter
Well, for what you need, Jakob's&nbsp; CharSetAttr should do what you need. As for learning Javascript, there are some good resources mentioned here: •&nbsp; <a href="https://app.roll20.net/forum/permalink/5283017/" rel="nofollow">https://app.roll20.net/forum/permalink/5283017/</a> And for the API, this is my suggested Beginner's Challengers: • <a href="https://app.roll20.net/forum/permalink/5061414/" rel="nofollow">https://app.roll20.net/forum/permalink/5061414/</a>
I'll give this a try, thanks a lot! And thanks for the resources!