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

Is there any macro or script for magic item?

1554418552

Edited 1554420991
I use the OGL Sheet and would like to know if you have any charge count macro or script for magic items (D&D5e). Examples: Magic Missile Wand - 7 charges, increasing one charge per slot; Wand of Fireballs - 7 loads, increasing one load per slot; Wand of Winter - Ray of Frost (no charge), Ray of Frost 5th (1 charges); sleet storm (3 charges); sleet storm (5 charges) Staff of Fire - Burning Hands (1 charge); fireball (3 charges); Wall of fire (4 charges)
1554427253
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
In order to increment or decrement a value on your character sheet, you need to use an API script. There are various versions of these, such as The Aaron's Ammo script, or the Companion script to some sheets. Without the API, there is no way to write to a character.
keithcurtis said: In order to increment or decrement a value on your character sheet, you need to use an API script. There are various versions of these, such as The Aaron's Ammo script, or the Companion script to some sheets. Without the API, there is no way to write to a character. I split the account with a friend. He has access to the plus and creates the room for me. Can you recommend which API I can use to do this?
1554429608
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Either the Ammo script (available on the drop down), or the specific companion script for your sheet (if it allows it), many of these are on the drop down as well. Unfortunately, the API is a Pro level benefit, not Plus.
keithcurtis said: Either the Ammo script (available on the drop down), or the specific companion script for your sheet (if it allows it), many of these are on the drop down as well. Unfortunately, the API is a Pro level benefit, not Plus. He's a pro. I confused, sorry. I use on my desk "5th edition OGL by Roll20 Companion" and "TokenLock". The script version for my plug allows me to make the ammo count yes, but for magic it counts spell slot instead of ammo. Do you know how I can change this?
1554430536
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I'm not familiar enough with the Roll20 script. Is "Ammo" not in the dropdown? It is possible to write macros to do this using ChatSetAttr, but that's a bit more involved.
1554431468

Edited 1554431484
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
OK, I've done some testing. Here is an example: Drag Wand of Fireballs to your sheet. Click the gear icon for it. Choose Use as Resource, and Has an Attack. In the resulting attack macro, edit it to use "Wand of Fireballs" as the resource. Make sure ammo tracking is clicked on your sheet options. When you click the Wand of Fireballs attack, it should count down your Wand of Fireballs resource.