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 macro with new Dynamic Lighting

February 14 (4 years ago)
Taz
Pro

Hi all - I'm just about to try my first game with the latest dynamic lighting system... However, the Torch macro doesn't seem to work. This is, by far, the most heavily used of all the macros and is (IMHO at least) essential. Is there a version out there that is compatible?

Thanks!

February 14 (4 years ago)
David M.
Pro
API Scripter

I don't believe the torch script ever got UDL support. Token-mod did, though, so you should be able to do something like this (untested, I don't use UDL)

!token-mod {{ --on emits_bright_light emits_low_light --set bright_light_distance|20 low_light_distance|20 }}
February 14 (4 years ago)
Taz
Pro


David M. said:

I don't believe the torch script ever got UDL support. Token-mod did, though, so you should be able to do something like this (untested, I don't use UDL)

!token-mod {{ --on emits_bright_light emits_low_light --set bright_light_distance|20 low_light_distance|20 }}

I don't know how @theAaron did it but he got the light to flicker too... made it much more atmospheric! Anyway, enough moping! :D  Thanks some much for this script - I assume changing --on to --off would "switch off" the light?


February 14 (4 years ago)

With LDL (LEgacy Dynamic Lighting) the torch API works great.... 

I currently play 5e, and I think LDL works great with some adjustments for darkvision.

By rules

Darkvision sees in dark as dim light, and in dim light as bright light. (i set the tokens with 60 / -5) in the Legacy Lightining. 

Normal vision don't see in dark and sees in dim light as dim light. 

For some reason, I can't get darkvision to work properly in UDL. 

February 14 (4 years ago)
Taz
Pro


Rober M. said:

With LDL (LEgacy Dynamic Lighting) the torch API works great.... 

I currently play 5e, and I think LDL works great with some adjustments for darkvision.

By rules

Darkvision sees in dark as dim light, and in dim light as bright light. (i set the tokens with 60 / -5) in the Legacy Lightining. 

Normal vision don't see in dark and sees in dim light as dim light. 

For some reason, I can't get darkvision to work properly in UDL. 

I've been running 5E in Roll20 for about 4 years now. I know how to get LDL working properly but UDL has some features that look really neat (and I don't seem to have any issues with darkvision... so far at least!).

February 14 (4 years ago)
David M.
Pro
API Scripter

Taz said:

 I assume changing --on to --off would "switch off" the light?

That should work. If you are testing out UDL, I might suggest making a copy of your LDL game first or starting a new one in case you start to have problems. The UDL bug threads are very active. Doing a hot conversion could be painful to revert if needed.

February 15 (4 years ago)
Taz
Pro


David M. said:

Taz said:

 I assume changing --on to --off would "switch off" the light?

That should work. If you are testing out UDL, I might suggest making a copy of your LDL game first or starting a new one in case you start to have problems. The UDL bug threads are very active. Doing a hot conversion could be painful to revert if needed.

It did, and I have ;-)  Learned that the hard way :(  Had to recreate a game virtually from scratch because I wanted to try an early release UDL and *didn't* backup...

February 15 (4 years ago)
David M.
Pro
API Scripter

Oof, that stings. Good luck with round 2!

February 15 (4 years ago)
The Aaron
Roll20 Production Team
API Scripter

Sorry for the delay on Torch.  Something about the way UDL is implemented and how Torch calls it causes bizarre things to happen (donut shaped rings of light, etc).  I'll have to try it out again and see if it's working.

February 16 (4 years ago)
Taz
Pro


The Aaron said:

Sorry for the delay on Torch.  Something about the way UDL is implemented and how Torch calls it causes bizarre things to happen (donut shaped rings of light, etc).  I'll have to try it out again and see if it's working.

Thank you! I'd hazard a guess that it's something to do with the coding of bright and dim light... just a guess. David M's solution works well enough, but I do miss the flickering effect ;-) 

February 17 (4 years ago)
Ray
Pro

LDL !torch has definitely developed a problem...

Here is my Infravision macro:

!torch 60,-5,no,@{selected|token_name}|200

Dim light beginning at -5 does not work...Bright and Dim is defaulting to 50%/50%...no matter what I set it to the light is 50%/50%

All Players see Light does not work...all players can see the light.

Hope that helps

February 17 (4 years ago)
The Aaron
Roll20 Production Team
API Scripter

No commas, and it operates off the token id, not the name. Also, I'm not sure what that 200 is intended to be:

!torch 60 -5 no @{selected|token_id}

!token-mod {{ --on emits_bright_light --set bright_light_distance|20 --id @{target|token_id} }}


I can not for the life of me get anything to emit light with UDL without opening the tokens settings, what am I doing wrong here?

April 22 (4 years ago)

Just for posterity, I was able to get this working and now use it in place of Torch. You do need to have TokenMod script installed from the API library. I use the following in place of Torch and Snuff respectively:

!token-mod {{ --on emits_bright_light emits_low_light --set bright_light_distance|20 low_light_distance|20 low_light_opacity|75 }}

!token-mod {{ --on emits_bright_light emits_low_light --set bright_light_distance|0 low_light_distance|25 low_light_opacity|40 }}

Altering the low light opacity variable and keeping a short low light radius on the Snuff equivalent lets me keep a minimal visible circle around characters without low light or dark vision. I also have a blackout macro which turns it all off.


April 26 (4 years ago)
Taz
Pro


Ian W. said:

Just for posterity, I was able to get this working and now use it in place of Torch. You do need to have TokenMod script installed from the API library. I use the following in place of Torch and Snuff respectively:

!token-mod {{ --on emits_bright_light emits_low_light --set bright_light_distance|20 low_light_distance|20 low_light_opacity|75 }}

!token-mod {{ --on emits_bright_light emits_low_light --set bright_light_distance|0 low_light_distance|25 low_light_opacity|40 }}

Altering the low light opacity variable and keeping a short low light radius on the Snuff equivalent lets me keep a minimal visible circle around characters without low light or dark vision. I also have a blackout macro which turns it all off.


Nice! Can you share the blackout one please (I like to keep vision as it would be - ie no low light / dark vision, then you can't see squat!)?

One of the think my group *really* like with the old Torch version is the Flicker command (when there's a natural light rather than magical). They like that it flickers and give them glimpses of things outside the "normal" radius...

May 20 (4 years ago)

Sorry never saw the reply! Two ways to approach it:

!token-mod {{ --on emits_bright_light emits_low_light --set bright_light_distance|0 low_light_distance|0 }} leaves emit light on but sets both distances to zero.

!token-mod {{ --off emits_bright_light emits_low_light --set }} leaves the light distances intact but turns emit light off.

For me there is no practical distance between the two, but I can imagine some use cases where isolating those variables might be important.

Something like Flicker could probably be engineered with token-mod but that's outside the realm of anything I'm currently doing.


Taz said:

Nice! Can you share the blackout one please (I like to keep vision as it would be - ie no low light / dark vision, then you can't see squat!)?

One of the think my group *really* like with the old Torch version is the Flicker command (when there's a natural light rather than magical). They like that it flickers and give them glimpses of things outside the "normal" radius...