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

Enable Vision For All NPCs in UDL

Hi folks, apologies if this has been covered elsewhere but is there a method of enabling vision for all monsters/npcs? This post by the ever helpful keithcurtis, referencing a script by The Aaron, is exactly what I'm after but I assume this no longer works due to 'has sight' relating to LDL. Cheers
1656465866
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Rotimer! Here's a UDL-friendly version , again, courtesy of the amazing Aaron.
Fantastic. Most kind of you. You both have just saved me a whole heap o' clicking. Cheers
1656576980

Edited 1656577096
Oh dear, sorry to be a pain. While the script does work correctly and enabled vision for all NPCs when I issued the command, it merely flips the Vision toggle but the vision doesn't work. Roll20 obviously recognises that the token has vision as pressing Ctrl+L before using the script results in the pop up saying the token does not have vision enabled. However unless I open the token settings and manually toggle the Vision off and then on again, the token sees no light. Here's a gif demonstrating the behaviour I experienced this same behaviour when I was trying to use TokenMod to enable vision.
Apologies for the bump, if it's poor etiquette here I'm happy to start a new thread. Has anyone any insight as to why the Vision toggle doesn't actually enable vision when set via API?
1656812336
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
There is a bug that a token does not respect Angle of Light when set by the API until the token is opened and closed manually, but vision should work. It does for token-mod (just tested). It's possible the Aaron put in some code to work around that bug. I'll see if I can ping him.
1656840779

Edited 1656841387
Ah, so that's what's happening. Thanks again.  And you only need to open and close the token, you don't need to toggle the vision manually like I initially thought. That's not so bad. Obviously if The Aaron had some cunning code that saves the extra clicksI'd be delighted to use it, but I can live with it if not.