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 script guidance

Hi, i am a little lost with the !Torch API. i came a cross it trying to find ways i can make lighting on the light layer flicker for a horror game i am going to run. ive imported the script, and set up a testing page with dynamic lighting all set up walls etc.) and put on a "wall of light token"...what do i do now?
1761220220
timmaugh
Forum Champion
API Scripter
Hey, Chris... an open-ended question like this leaves us a little back-footed as far as helping you. Have you used scripts before? If so it could be that we have to help with basic understanding of how to implement a script via a command line. Have you found the script and hope it can accomplish your need, but you can't find supporting documentation to help you bridge the gap? If so, you could start with this post (which shows both some examples and links back to the original thread for the Torch script). Have you tried a particular command but received unexpected results? If so, you should post what you tried so we can try to spot the issue.
1761228902
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
To add to timmaugh's answer, note that even if you have done everything correctly, the flicker effect if Torch only worked with the old, defunct lighting system.
I miss the old flickering effect though it had slipped my mind last time the Torch script came up. Went ahead and added a suggestion to see if Roll20 could bring it back located here: <a href="https://app.roll20.net/forum/post/12544691/flickering-light-sources" rel="nofollow">https://app.roll20.net/forum/post/12544691/flickering-light-sources</a>
I have been SUPER vague here i can appreciate...it was late and my brain was fried. So i have "used" API scripts before...in that i can load them, and they "do the thing" generally, but I wouldn't be able to tell you really 'how they work' and what bit i am doing wrong. Its worth noting i am broadly new at making dynamic lighting work, i have tried MANY times - but end up canning it as i cant get it to operate comfortably. I am hoping this time to be different, as its difficult to 'jump-scare' players in a horror game at the best of times when they can see everything you 'reveal' on a visual map at the best of times. A player only seeing what the character can see, turning a corner and having a zombie in their face is far more impactful. I have since picked up that my new game i am currently designing is using Jumpgate, and what i interoperate is the 'new' DL...so the original "TORCH" script i came across in the forums via a google search wouldn't work any way. For my education...as far as i had understood it: With the script installed, any light source with the name "TORCH" would flicker upon the command "!LIGHTFX ON"...i couldnt figure out "where" i type this though...as i did so in the chat box, and it didnt work. Although i appreciate i now know this is for the most part due to the DL upgrade. Based on this knowledge i dont think its something i can utilise...having a hall light flickering for ambient effect etc. for example. There is an animation i picked up from a creator, but doesnt have quite the effect i thought it was going to.
1761422505
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Chris! You have summed this up correctly.
keithcurtis said: Hi Chris! You have summed this up correctly. Any suggestions...or do you think i just have to rely on Dynamic Lighting?
1761528434
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
No, I don;t think there is currently a way to get the Torch flicker effect.
1761570980
timmaugh
Forum Champion
API Scripter
It might be a little too resource intensive, but the method in this video still works (though it does require the ZeroFrame patch that is coming in this week's merge -- likely happening tomorrow). It requires the Metascript Toolbox, TokenMod, and ChatSettAttr (which means no Beacon sheet; i.e., no 2024 DnD sheet). The requisite ability/command lines are in the first comment on the video, but I'll reproduce them, here. On a character named "Control Dashboard" I created 3 abilities. LightBlinkInterval Explanation : Allows you to set the interval at which the lights will blink/flicker; must be run at least once to create the BlinkInterval attribute. Command :&nbsp; !setattr --charid @{Control Dashboard|character_id} --BlinkInterval|?{New blink interaval|1|2|3|4|5|6|7|8|9} --silent LightSwitch_Dungeon Explanation: Runs the lights on the map for the dungeon; allows you to select whether to turn the lights on, off, flicker, blink, or hold. Command: !{{ &nbsp; !setattr --charid @{Control Dashboard|character_id} --MainHallFlames|?{Turn Lights|on|off|flicker|blink|hold} --silent &nbsp; (^)!%^(Control Dashboard.LightSystem_Dungeon){^&amp;delay .2} }} LightSystem_Dungeon Explanation : The core engine running the lights; it calls itself on a delay based on reading the state of the light switch attribute and the delay established. Command : !{{(~) &nbsp; {&amp;if @(Control Dashboard.MainHallFlames) = flicker} &nbsp; &nbsp; !forselected(^) token-mod --set emits_bright_light|on emits_low_light|on bright_distance|{^&amp;math randib(0,3)} low_distance|{^&amp;math randib(2,12)} dim_light_opacity|0.75{~&amp;select brazier*} &nbsp; &nbsp; !forselected(^) token-mod --set emits_bright_light|on emits_low_light|on bright_distance|{^&amp;math randib(0,2)} low_distance|{^&amp;math randib(2,8)} dim_light_opacity|0.75{~&amp;select torch*} &nbsp; &nbsp; !%~(Control Dashboard|LightSystem_Dungeon){~&amp;delay {&amp;math randib(1,4)} } &nbsp; {&amp;elseif @(Control Dashboard.MainHallFlames) = blink || @(Control Dashboard.MainHallFlames) = blinkoff} &nbsp; &nbsp; !setattr --charid @{Control Dashboard|character_id} --MainHallFlames|blinkon --silent &nbsp; &nbsp; !forselected(^) token-mod --set emits_bright_light|on emits_low_light|on bright_distance|2 low_distance|6 dim_light_opacity|0.75{~&amp;select brazier*} &nbsp; &nbsp; !forselected(^) token-mod --set emits_bright_light|on emits_low_light|on bright_distance|1 low_distance|2 dim_light_opacity|0.75{~&amp;select torch*} &nbsp; &nbsp; !%~(Control Dashboard|LightSystem_Dungeon){~&amp;delay @{Control Dashboard|BlinkInterval} } &nbsp; {&amp;elseif @(Control Dashboard.MainHallFlames) = blinkon} &nbsp; &nbsp; !setattr --charid @{Control Dashboard|character_id} --MainHallFlames|blinkoff --silent &nbsp; &nbsp; !token-mod --set emits_bright_light|off emits_low_light|off emits_low_light|off bright_distance|0 low_distance|0 {~&amp;select brazier*, torch*} &nbsp; &nbsp; !%~(Control Dashboard|LightSystem_Dungeon){~&amp;delay @{Control Dashboard|BlinkInterval} } &nbsp; {&amp;elseif @(Control Dashboard.MainHallFlames) = on} &nbsp; &nbsp; !token-mod --set emits_bright_light|on emits_low_light|on bright_distance|1 low_distance|10 dim_light_opacity|0.75 {~&amp;select brazier*} &nbsp; &nbsp; !token-mod --set emits_bright_light|on emits_low_light|on bright_distance|0 low_distance|5 dim_light_opacity|0.75 {~&amp;select torch*} &nbsp; {&amp;elseif @(Control Dashboard.MainHallFlames) = off} &nbsp; &nbsp; !token-mod --set emits_bright_light|off emits_low_light|off emits_low_light|off bright_distance|0 low_distance|0 {~&amp;select brazier*, torch*} &nbsp; {&amp;end} }}