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

Torch light problems

Hi there,  I am not any good at coding or anything like this and have been trying to achieve a 'Switch' macro that is a Token Action (so it comes up on the screen at the top left when a token is selected).  I wish to have one that turns the tokens light setting to Bright 20 and DIm a further 20 (Then another that turns this off).  I am using Updated Dynamic Lighting on a purchased copy of Tomb of Anihilation. So the game settings should be fine to be used with any code. I have looked at the various suggested scripts on forum posts but they don't have any effect at all. I mean using the script literally does nothing anywhere on the screen.  I am a little confused and want to ask what I am doing wrong.  Thanks in advance Ian
Which script(s) are you using? The two that come to mind are 'TokenMod' and 'Torch'.  FYI, the Torch script does not work with UDL. Here's a very basic macro for TokenMod that will turn a 'torch' light on/off: !token-mod {{ ?{Torch|On,--on emits_bright_light emits_low_light --set bright_light_distance#20 low_light_distance|20|Off,--off emits_bright_light emits_low_light --set bright_light_distance#0 low_light_distance|0} }}
Hi there,  The script above also doesn't do anything at all.  I have tried this  !token-mod {{  --on  emits_bright_light emits_low_light --set bright_light_distance|20 low_light_distance|20 }} and this ?{ Light/Vision options: |Normal vision, !token-mod --on has_bright_light_vision emits_bright_light emits_low_light --set bright_light_distance#0 low_light_distance#0 |Candle (br5/dim10), !token-mod --set bright_light_distance#5 low_light_distance#5 |Lamp (br15/dim45), !token-mod --set bright_light_distance#15 low_light_distance#30 |Torch/Light Cantrip (br20/dim40), !token-mod --set bright_light_distance#20 low_light_distance#20 |Hooded Lantern (br30/dim60), !token-mod --set bright_light_distance#30 low_light_distance#30 |Darkvision on (br0/dim60), !token-mod --set night_vision_distance#60 |Darkvision off (br0/dim60), !token-mod --set night_vision_distance#0 } along with variations from other Forum posts too.  The thing that confuses me is that literally nothing I try has any visual effect on the battlefield or the token settings.  I have looked at game settings and can't find an 'API' option, I assume this was Legacy anyway (which I never used)  I have used other Macro's, so I know that they do work.  I have also physically changed the token settings myself and it also does change then. 
1638608349

Edited 1638610224
Is there something I need to add to the Token Ability Macro so that it specifically effects the token selected when I click it? even this  ! token - mod - - on showname doesn't effect the selected token. So there must be a setting somewhere that I've not got correct I am playing with the @selected{|} script but still with no success
I have just noticed the difference in Plus and Pro account levels.  Am I right that none of this will work at Plus level?
Tokenmod is an API script which is only available at the Pro subscription level.