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

Modifying attributes outside of bar1/2/3

Help me API forum, you're my only hope! In a campaign I'm about to start up, all the players are going to get a special ability, usable a certain number of times per day. However, at least two of the players already have enough per day abilities that I can't tie this to bar1/2/3 and their character sheet. The ability does exist in their character sheet. What'd I'd like to do is build a macro that subtracts one from the current and another macro that resets current back to maximum. I have somewhere between zero and zilch experience with javascript, however, and would not be sure where to start on this. Internet cookies for anyone who can help me with this!
can't do it with macros, but you CAN set up an API script that will check to see if they have an available ability to use for the day, and then deduct one from it. Hope you find someone with some spare time on their hands to write this for ya (it'll be reasonably short too, but I have work, so in a few days if no-one has done anything I might look at it.)
So I picked apart the heal chat command script and this one enough that I was able to blow up the API until it did what I wanted to. Mainly by guessing through the pieces and referencing the API guide for a lot of specifics of everything. I couldn't write it from scratch though and it's probably no where near optimized. But hey, it does what it should.
1382657982
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Brandon, check out my WoD Damage Tracker script. It lets you use an API command to set an attribute and then reflects that attribute on the player's token with status icons. In this case it's damage, but you could tweak it to be anything.
Yeah, I actually stole chunks of another one of your posts and got through it.