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

Help with Vision macro script

February 17 (3 years ago)

Hello,

I wanted to know if someone can help me with an issue I am having.  I am using TokenMod and I wanted to use a few macros that would allow me to change my PC's vision.  If they get caught in a Darkness spell, blizzard, etc., I want to "one-click" their view and change it back once it is done.  The macros that I am using work.  I can change the entire parties view but it bogs down Roll20 and and then I can not change their view back.  Has anyone else experienced this?  
Here are the macros that I am using.  

!token-mod {{
  --set
    bright_vision|on
    night_vision|on
 night_vision_distance|60
    night_vision_effect|dimming
 night_vision_tint|transparent
    defaulttoken
}}

and this one

!token-mod {{
  --set
    bright_vision|on
    night_vision|on
 night_vision_distance|60
    night_vision_effect|dimming
 night_vision_tint|transparent
    defaulttoken
}}

Thanks 

February 17 (3 years ago)
I don't like changing vision settings because they are hard to remember they were changed.  If a character is just temporarily blinded I really don't think you need to use the api to cover that for 1-2 turns.  Thats alot more tedious stuff to add to your job adjudicating combat.  I gave my players a lightsource macro though for them to manage themselves but that uses Torch api and LDL.  
February 17 (3 years ago)

Calihecit looks like you posted the same macro twice, so if you have a second macro that isn't working, then go ahead and post that.

I would strongly suggest not using tinted night vision or colored light, as in my experience those two settings are still heavily bugged. I seem to remember that I had issues with either the Nocturnal or Dimming night vision settings as well. 

It's also helpful to only use vision for PC tokens, instead of all NPC tokens, because Dynamic Lighting is a resource hog. It's great for dungeon crawls, but your computer is literally going to be tracing lighting paths for every token that has vision enabled to every visible light source. If you can use simple Fog of War for the same effect, it will greatly help with computer resource issues. If you can use Dynamic Lighting without using Explorer Mode, that will help. Turning on Update When Token Drop can help as well so that lighting lines aren't continually refreshed while a token is moving. 


And just in case it's helpful, here's my standard vision/lighting troubleshooting checklist. 

  1. Make sure you are using Chrome or Firefox.
  2. Make sure you are set to only use either Updated Dynamic Lighting or Legacy Dynamic Lighting, not both.
  3. Token must have vision enabled.
  4. Token must be 'controlled' by the player who is checking vision.
  5.     You should use a 'dummy account' in order to see changes live/instantaneously when you make them as GM. There are other benefits as well (streaming, testing macros and other tricks, resetting the game URL).
  6. There needs to be a light source.
  7. Tokens always emit light from the center of the token -- in LDL it comes from a small point in the center of the image, and in UDL it comes from a circle that is some small percentage of the image size -- so if you set the map image as a light source, you'll get some funky behavior.
  8. Token and light source need to be on the correct layers.
  9. Do not use .webm animated tokens. They are currently bugged and often will not work correctly and prevent visibility.
  10. If a player cannot see, move their token. There is a bug with UDL that prevents player vision from 'activating' until after one of their tokens is moved on a page.
  11. Make sure you don't have a Fog of War/Permanent Darkness layer on.
  12. Make sure you don't have Advanced Fog of War/Explorable Darkness blocking vision.
  13. Explorable Darkness and Advanced Fog of War are saved for each token. So if a player has control of a token, they will see all of their 'explored area'.
  14. Page 'Cell Width' settings can have an affect on a token's vision, especially if the 'light multiplier' is set to something other than 100%. Switch the Cell Width to '1' and see what happens.
  15. Check random other page settings, such as 'Restrict Movement'
  16. Make sure your view is centered on a token that has vision enabled and a light source
  17. Make sure you/your players are on the correct page. Double check that they have not been split from the Party ribbon.
  18. Clear your browser cache.
  19. Clear the game chat archive.


February 18 (3 years ago)

Thank you for the help.  I'm posting one of the other scripts below

!token-mod {{
  --set
    bright_vision|on
    night_vision|on
 night_vision_distance|10
    night_vision_effect|off
 night_vision_tint|#c0c0c0
    defaulttoken
}}

Assuming I didnt mess up the macro script, I'll try them without the dimming effect and see how it works!  Thanks again