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

Rollable table to light/dowse torches

I would like to have a rollable table so that when I use Torch script to light/snuff torches, the torch tokens that I light/snuff will change their token to match.  So I have all these unlit tokens in my dungeon and I hit my Torch macro to light 2 or three of them.  When I click on them I would want them to then change the icon to be the lit torch that is in the table. If I then run my Snuff macro and click on them, I would want the token to switch back to the unlit torch. Is this possible?   Easy?  I have already made a rollable table with the two torch versions.  Just not sure what else I need to do to get them to switch back and forth.
well you can set the image for the token for each state then used the token mod API i believe to handle the lite vs snuff image you will have to ask The AAron or other Script ninja how to do it thou
1511311719
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Since you are a pro user, you can use the same  method I use for handling spell effects . A combination of Token-Mod and ChangeTokenImg should do what you need. Here's a thread where I demonstrate the method (including a short video). It should be easily adaptable to torches. Make an API button for lighting, and one for snuffing and wrap them in a roll template.
1511315827
GiGs
Pro
Sheet Author
API Scripter
Thats really clever, keith. Do you have shareable copies of the images you used for the effect tokens?
1511320557
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Unfortunately, no. :(  I'm planning on collecting them into a Marketplace offering once I have enough. Although the spell effects in the Pro collection are not technically in your library, you should be able to download them (press Z on the keyboard while they are selected on your map, then right-click and save) and re-upload them to your own library. They should then work with the appropriate API scripts.
Okay, so far I can pull a torch out and I hit the button for Lighting options and can turn it on and off, and then I hit the carry token menu and assign it to somebody.  It works really cool.  Not sure how to get the image to switch yet, but I may figure it out eventually.  Gotta love API.  (sucks when playing in someone else's campaign though and I'm used to all my cool things that I don't get to play with as a player.)
Did you get any further?
no.  I don't generally figure anything out, I just beg help and wait for people to give me answers.  Now I have a druid and so I need my rollable tables t o work.  I will be figuring it out in the next few weeks probably.