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

I need help with !torch. When I use it as is, nothing happens. I tried setting it up this way !torch [<20> [<10> [<on> [<@{selected|token_id}>|<--360> ... ]]]] and get this error. Any ideas whats happening? SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "o" found. For a little more info I am running FFG Star Wars using the character sheet, dice roller and destiny tracker. I have other mods on there too such as token mod and torch. My goal is to give the player a macro to turn on/off their glow rods. The bright light should be 20ft and the dim 10 feet. Thanks in advance!
I believe torch only works with Legacy Dynamic Lighting.  Also, you need to remove all of the brackets from your command:  !torch 20 10 on @{selected|token_id}
I think you're right, I feel like I may have read that somewhere about the legacy lighting. Do you know how I could accomplish the same thing via token mod?
1663164110
The Aaron
Roll20 Production Team
API Scripter
Something like: !token-mod {{ --on emits_low_light emits_bright_light has_bright_light_vision --set bright_light_distance|10 low_light_distance|10 }} Here's a post will all the UDL properties for TokenMod:&nbsp;<a href="https://app.roll20.net/forum/permalink/9064542/" rel="nofollow">https://app.roll20.net/forum/permalink/9064542/</a>
Yes, that works perfectly! Thank you! Mind if I ask you one more question? If I wanted to set this into an on off query, how would I do it? Everything I tried is not functioning. !token-mod --set&nbsp; emits_bright_light|0 emits_low_light|0 That functions by itself just fine. Thanks, Mike
1663178414

Edited 1663202389
Two options -&nbsp; Query method (edited to fix letter case): !token-mod {{ &nbsp; --?{On or Off?|On,on|Off,off} &nbsp; &nbsp; emits_low_light &nbsp; &nbsp; emits_bright_light &nbsp; &nbsp; has_bright_light_vision &nbsp; --set &nbsp; &nbsp; bright_light_distance|10 &nbsp; &nbsp; low_light_distance|10 &nbsp; }} 'Flip' option will toggle between on and off: !token-mod {{ &nbsp; --flip &nbsp; &nbsp; emits_low_light &nbsp; &nbsp; emits_bright_light &nbsp; &nbsp; has_bright_light_vision &nbsp; --set &nbsp; &nbsp; bright_light_distance|10 &nbsp; &nbsp; low_light_distance|10 &nbsp; }}
Awesome, thank you. The flips works great for me, the query doesn't seem to do anything.
1663181005

Edited 1663202322
Sabrin Palandar said: Awesome, thank you. The flips works great for me, the query doesn't seem to do anything. Hmm I’m air-coding so TokenMod may not take uppercase arguments. Try this: !token-mod {{ &nbsp; --?{On or Off?|On,on|Off,off} &nbsp; &nbsp; emits_low_light &nbsp; &nbsp; emits_bright_light &nbsp; &nbsp; has_bright_light_vision &nbsp; --set &nbsp; &nbsp; bright_light_distance|10 &nbsp; &nbsp; low_light_distance|10 &nbsp; }}
1663183593

Edited 1663183655
The Aaron
Roll20 Production Team
API Scripter
Yeah, definitely lower case (I should probably make it accept any case...). Many people will create a chat menu with buttons for various settings, or create a button with a dropdown query for various things.&nbsp; Here's an example of such a macro (I haven't tested this, just grabbed it off a thread somewhere): ?{Light |Human,!token-mod --set has_night_vision#1 --set night_vision_distance#15 --set emits_bright_light#0 --set emits_low_light#0 ; |Half Darkvision,!token-mod --set has_night_vision#1 --set night_vision_distance#60 --set emits_bright_light#0 --set emits_low_light#0 ; |Full Darkvision,!token-mod --set has_night_vision#1 --set night_vision_distance#120 --set emits_bright_light#0 --set emits_low_light#0 ; |Torch,!token-mod --set has_night_vision#0 --set emits_bright_light#1 --set emits_low_light#1 --set bright_light_distance#20 --set low_light_distance#20 ; |Hooded Lantern Open,!token-mod --set has_night_vision#0 --set emits_bright_light#1 --set emits_low_light#1 --set bright_light_distance#30 --set low_light_distance#30 ; |Hooded Lantern Closed,!token-mod --set has_night_vision#0 --set emits_bright_light#1 --set emits_low_light#1 --set bright_light_distance#0 --set low_light_distance#15 ; |Candle,!token-mod !token-mod --set has_night_vision#0 --set emits_bright_light#1 --set emits_low_light#1 --set bright_light_distance#5 --set low_light_distance#15 ; |Camp,!token-mod --set has_night_vision#0 --set emits_bright_light#1 --set emits_low_light#1 --set bright_light_distance#35 --set low_light_distance#35 ; |Cantrip,!token-mod --set has_night_vision#0 --set emits_bright_light#1 --set emits_low_light#1 --set bright_light_distance#20 --set low_light_distance#20 ; |Daylight Cantrip,!token-mod --set has_night_vision#0 --set emits_bright_light#1 --set emits_low_light#1 --set bright_light_distance#60 --set low_light_distance#60 ; |Produce Flame,!token-mod --set has_night_vision#0 --set emits_bright_light#1 --set emits_low_light#1 --set bright_light_distance#10 --set low_light_distance#10 ; |Flametongue,!token-mod --set has_night_vision#0 --set emits_bright_light#1 --set emits_low_light#1 --set bright_light_distance#40 --set low_light_distance#40 ; |Holy Symbol of Ravenkind,!token-mod --set has_night_vision#0 --set emits_bright_light#1 --set emits_low_light#1 --set bright_light_distance#30 --set low_light_distance#30 ; |Bullseye Lantern Test,!token-mod --set has_directional_bright_light#1 --set has_night_vision#0 --set emits_bright_light#1 --set emits_low_light#1 --set bright_light_distance#60 --set low_light_distance#60 --set directional_bright_light_total#60 --set directional_bright_light_center#0} Also check out: Macro Character Sheet:&nbsp; <a href="https://app.roll20.net/forum/permalink/5924364/" rel="nofollow">https://app.roll20.net/forum/permalink/5924364/</a> Chat menus:&nbsp; <a href="https://wiki.roll20.net/Chat_Menus" rel="nofollow">https://wiki.roll20.net/Chat_Menus</a> Particularly:&nbsp; <a href="https://wiki.roll20.net/Chat_Menus#Dynamic_Lighting_Token_Menu" rel="nofollow">https://wiki.roll20.net/Chat_Menus#Dynamic_Lighting_Token_Menu</a>
You guys are amazing! Thank you so much! Going to test it out more in the morning.