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

Trying to make a random treasure chest (With minor change to image)

Hi everyone,  I'm attempting to do two things: 1) Use a rollable table to randomly generate treasure from a chest. 2) Let the players use a macro to 'open' a chest, switching the picture from a closed treasure chest to open treasure chest. I feel like this should be something that I should just be able to do- but I'm imaging I'm going to need API script for this (The wonders of Roll20 am-i-rite?) Any advice is crazy helpful, thanks! 
1598548268
The Aaron
Roll20 Production Team
API Scripter
You can switch the image on a token using TokenMod .  RecursiveTable would be useful for doing treasure rolls.
Idk how to install the token mod
1598559501
The Aaron
Roll20 Production Team
API Scripter
Both are in the 1-click API Scripts dropdown.  You can go to the API Scripts page in your Game, then select and install them.
1598559587
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Here's a short, helpful video: How to Install Roll20 API Scripts
Oh. I thought one was only on git or whatever that program site is. 
1598560395
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You can get the code from git (or the forums, or anywhere, really) if you prefer, but using One Click ensures that you automatically receive updates to installed scripts. Manually entered scripts must be updated manually.