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

Can macros affect Updated Dynamic Lighting?

1606882072

Edited 1606882141
I don't think they can. I'm a Pro user, and while I lack the coding knowledge to mess with the API, there shouldn't be anything I'm unable to do -- except mess with Updated Dynamic Lighting. To grasp the most basic understanding of how a lighting macro is formed, all I'm attempting to do is to remove vision from a token . I've tried several different macros. (All of these are derived from larger macros with all sorts of options. To learn, I'm just trying to blind a token .) First, meet Bob's House . Bob's House is a map. Page Details Dynamic Lighting Barriers Restrict Movement = On Updated Dynamic Lighting Updated Dynamic Lighting = ON Explorer Mode = On Daylight Mode = Off Update when Token Drop = On Legacy Lighting Nothing enabled here. Now, meet Bob  the token. Details Represents Character: Bob Controlled By (Determined by Character settings) ((All Players)) Updated Dynamic Lighting Vision = On Night Vision = On Night Vision Distance = 40 Tint Color = Gray? Night Vision Effect = Dimming Dimming Start = 20 feet All other settings disabled or set to 0. Legacy Lighting All settings disabled or left at default. The Classic (Aaron's Macro?  Link ) !token-mod --set light_hassight#no light_angle#360 light_otherplayers#no This is a token macro. (I click the token. With the token still selected, I use the macro.) On use, nothing happens. But that's okay. I understand lighting has since changed.  To blind a token,  again:  Link !token-mod --set light_otherplayers|off light_radius|0 light_dimradius|0 light_angle|360 Doesn't work, but again, old macro though. So I search for more recent posts and find this for  Normal Vision.  Link !token-mod --on has_bright_light_vision emits_bright_light emits_low_light --set bright_light_distance#0 low_light_distance#0 Doesn't work. Nothing in Bob's settings changes. I'm sorry for coming off so irritated, I just feel lost. Is it simply in development still?
1606884126
The Aaron
Roll20 Production Team
API Scripter
No worries.  Updated Dynamic Lighting support is still developing and the API sometimes has problems.  Here's a simple TokenMod command that will toggle vision on and off for a Token using on a UDL page: !token-mod --flip has_bright_light_vision has_night_vision A more verbose way of limiting the vision to 0 radius would be: !token-mod --on has_limit_field_of_vision has_limit_field_of_night_vision --set limit_field_of_vision_total|0 limit_field_of_night_vision_total|0 For reference, here are all the Updated Dynamic Lighting options in TokenMod: Updated Dynamic Lighting (Booleans) has_bright_light_vision  is the UDL version of  light_hassight . It controls if a token can see at all, and must be turned on for a token to use UDL. You can also use the alias  bright_vision . has_night_vision  controls if a token can see without emitted light around it. This was handled with  light_otherplayers  in the old light system. In the new light system, you don't need to be emitting light to see if you have night vision turned on. You can also use the alias  night_vision . emits_bright_light  determines if the configured  bright_light_distance  is active or not. There wasn't a concept like this in the old system, it would be synonymous with setting the  light_radius  to 0, but now it's not necessary. You can also use the alias  emits_bright . emits_low_light  determines if the configured  low_light_distance  is active or not. There wasn't a concept like this in the old system, it would be synonymous with setting the  light_dimradius  to 0 (kind of), but now it's not necessary. You can also use the alias  emits_low . Updated Dynamic Lighting (Number or Blank) night_vision_distance  lets you set how far away a token can see with no light. You need to have  has_night_vision  turned on for this to take effect. You can also use the alias  night_distance . bright_light_distance  lets you set how far bright light is emitted from the token. You need to have  has_bright_light_vision  turned on for this to take effect. You can also use the alias  bright_distance . low_light_distance  lets you set how far low light is emitted from the token. You need to have  has_bright_light_vision  turned on for this to take effect. You can also use the alias  low_distance . There are also the direction of the various light/vision: limit_field_of_vision_center limit_field_of_night_vision_center directional_bright_light_center And the width of the same: limit_field_of_vision_total limit_field_of_night_vision_total directional_bright_light_total
For reference, here are all the Updated Dynamic Lighting options in TokenMod: PRAISE THE SUN. Thank you Aaron for your hard work and for the original macro. I'm not one for avoiding evolution, and so I embraced Updated Dynamic Lighting (once 'restrict movement' and 'update on token drop' were in place, what I call the anti-cheating features). However, the lack of a similar macro is one of the things that may just make me hold on to Legacy Lighting for another couple months.
1606947337
The Aaron
Roll20 Production Team
API Scripter
UDL is still a little under cooked, but it does have some nice new features.  Plus this is pretty cool: UDLWindows