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

Turn the lights on quickly (without any API script if possible)

Hi, I'm trying to find the best solution to turn the wall torches on for my dungeons when players decide to light them. An abandoned dungeon could have some old torches attached to the walls, but surely these torches are unlit because nobody lives inside. So, by default, I'm going to use a token of an unlit torch and then, if the players decide to use it, I'll change it with a burning torch (with the emits light parameters set up). To do so I got the Idea to create a character sheet for the torch, use a token of a lit torch with the emits light options already set up as default sheet token, create a rollable table with an unlit version and chose the side of the token according to what I need. So, when i pull the torch from the character sheet it is already lit and it emits light, but if I try to change his shape using the chose side option I can select the unlit torch token but it still emits light. Mine was a weird and silly idea, but I can't think about a solution to do what I need. Any suggestion? :D PS I've read about the possibility to select all torches at once and put them on GM layer, but that would make disappear all the tokens, that is not what I want. (Maybe I should be less obsessed by this hyper realism inside my games :D)
The only way is API as far as I know.
My problem with API is that I've never used it. I think is the moment to face it. Is it difficult to deal with it? 
There's a bit of a learning curve, but there are good people here that will help you.  It sounds like you need the script Torch, which (I believe) is available as a 1-click install.  TokenMod could do the same thing (and more), but would take a little more setup.  Maybe try Pro for a month, check out the script, and see if you like it.  If you have any trouble after looking at the documentation, you can always post in the Forums, and someone will be happy to help. Happy Gaming!
1492058254

Edited 1492058357
Tetsuo
Forum Champion
You could set up a separate sheet for unlit and lit tokens, then simply drop it in as needed
Ooh, I just thought of something - you could have unlit torch tokens on the map layer, then a lit token on top of it.  When you want to douse the lights, move the lit tokens to the GM layer, and the unlit tokens would remain (you'd have to be careful about selecting the right tokens).  Then when you want to light the torches again, select them on the GM layer and move them to the map layer.  It's a little more trouble that an API approach, but it's free.  :)
I would do it kind of like Gozer the Gozerian suggests expect have the lit torches on the GM layer and drag select them to then move them all at once to the objects layer. I try to not mess around with the map layer too much, because it's easy to mistakely select your background map and ruin everything.
1492090843
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You could also group all the torches for easy selection and moving.
You could go with something like this. You will need token-mod API and Powercard API  or without Powercard API but will still need token-mod API  You will need to add & # 1 3 ; between the ! and the # without the spaces to the macro below. I cannot post it here as the HTML will remove it. Goolge search Roll20 nested macros and play the video Roll20 Master Series - How to Stack Macros (Nesting Macros) and this will explain what I am talking about. /w GM &{template:npcaction} {{rname=Light Sources}} {{name=Select On or Off?}} {{description=[Torch ON](! #TorchOn) [Torch Off](! #TorchOff) • Light 40 radius with 20 dim light. [Bullseye ON](! #BullseyeOn) [Bullseye Off](! #BulleyeOff) • Light 120 radius with 60 dim light angle 45. [Lantern On](! #LanternOn) [Lantern Off](! #LanternOff) • Light 60 radius with 30 dim light angle 360.  [Darkvision](! #Darkvision)[Blindsight](! #BlindSight)  }} These both call macros I have setup and you could just use the macros below. Macro TorchOn !token-mod {{--set     light_radius#40     light_dimradius#20     light_otherplayers#on     light_losangle#|270 light_angle#360}} TorchOff !token-mod --set light_radius| light_dimradius| light_otherplayers|off light_losangle|270 BullseyeOn !token-mod {{  --set     light_radius#120     light_dimradius#60     light_otherplayers#on     light_losangle#270     light_angle#45 }} BullseyeOff !token-mod {{  --set     light_radius#     light_dimradius#     light_otherplayers#off     light_losangle#270     light_angle#360 }} Need anymore help let us know
Ed S. said: I try to not mess around with the map layer too much, because it's easy to mistakely select your background map and ruin everything. That's what "undo" is for.  :)  I've accidentally deleted the map on occasion, but thankfully cmd-z works (at least on a Mac on Firefox).
Gozer the Gozerian said: Ed S. said: I try to not mess around with the map layer too much, because it's easy to mistakely select your background map and ruin everything. That's what "undo" is for.  :)  I've accidentally deleted the map on occasion, but thankfully cmd-z works (at least on a Mac on Firefox). It only works once , so if you accidentally move something else afterwards you are screwed! lol
Thanks, I'm going to try the pro subscription for next month and test that script and other scripts :D
Thanks Craven, I tried the Dynamic Lights script (without Power Cards for now) and it works well. 
1492905455
The Aaron
Pro
API Scripter
This is the multi-light macro I use: !token-mod --set ?{Vision|Torch, light_radius#40 light_dimradius#20 light_hassight#yes light_angle#360 light_otherplayers#yes|Hooded Lantern, light_radius#60 light_dimradius#30 light_hassight#yes light_angle#360 light_otherplayers#yes|Bullseye Lantern, light_radius#120 light_dimradius#60 light_angle#60 light_hassight#yes light_otherplayers#yes|Lamp, light_radius#30 light_dimradius#15 light_hassight#yes light_angle#360 light_otherplayers#yes|Candle, light_radius#5 light_dimradius#=0 light_hassight#yes light_angle#360 light_otherplayers#yes|Darkvision, light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Darkvision (90'), light_radius#90 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Warlock Devil's Sight, light_radius#120 light_dimradius#=120 light_hassight#yes light_angle#360 light_otherplayers#no|No light source(Dusk), light_radius#120 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Fog, light_radius#200 light_dimradius#=5 light_hassight#yes light_angle#360 light_otherplayers#no|No light source, light_radius#5 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Blinded, light_hassight#no light_angle#360 light_otherplayers#no}
The Aaron said: This is the multi-light macro I use: !token-mod --set ?{Vision|Torch, light_radius#40 light_dimradius#20 light_hassight#yes light_angle#360 light_otherplayers#yes|Hooded Lantern, light_radius#60 light_dimradius#30 light_hassight#yes light_angle#360 light_otherplayers#yes|Bullseye Lantern, light_radius#120 light_dimradius#60 light_angle#60 light_hassight#yes light_otherplayers#yes|Lamp, light_radius#30 light_dimradius#15 light_hassight#yes light_angle#360 light_otherplayers#yes|Candle, light_radius#5 light_dimradius#=0 light_hassight#yes light_angle#360 light_otherplayers#yes|Darkvision, light_radius#60 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Darkvision (90'), light_radius#90 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Warlock Devil's Sight, light_radius#120 light_dimradius#=120 light_hassight#yes light_angle#360 light_otherplayers#no|No light source(Dusk), light_radius#120 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Fog, light_radius#200 light_dimradius#=5 light_hassight#yes light_angle#360 light_otherplayers#no|No light source, light_radius#5 light_dimradius#=-5 light_hassight#yes light_angle#360 light_otherplayers#no|Blinded, light_hassight#no light_angle#360 light_otherplayers#no} That's fantastic! Thanks!