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

Toggle sight for all NPC tokens

I've bought the Yawning Portal pack and all the monsters and NPCs have sight enabled which must cause a drain on the web speed. I can of course click on each token one by one and switch sight off but is there an option to switch off sight for all non-player tokens in the game?
1585414270

Edited 1585610603
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The Aaron kindly wrote the following script for me. It mass-removes or adds sight from characters game-wide when you issue one of the following commands: All PCs See:&nbsp; !set-has-sight --pcs --sight All PCs Blind :&nbsp; !set-has-sight --pcs --blind All NPCs See :&nbsp; !set-has-sight --npcs --sight All NPCs Blind: All NPCs !set-has-sight --npcs --blind Everyone Sees: !set-has-sight --all --sight Everyone Blind:&nbsp; !set-has-sight --all --blind Be careful, because these really do change all characters in the game. Here is the code The Aaron gazed upon his old code and like Athena Parthenus, new code sprang fully formed from his brow, ready to shine upon the world the new light of wisdom. Here's the Gist:&nbsp; <a href="https://gist.github.com/shdwjk/e01aff3741987d594357c7c1a0853980" rel="nofollow">https://gist.github.com/shdwjk/e01aff3741987d594357c7c1a0853980</a>
Wicked! Thanks man! Now for the dumb question - what do I do with that?
This is all new to me as well, but best I can tell, when you go into API Settings in your Game Menu (before loading into the VTT) you can pick from premade APIs or you can make a custom API. So I believe you would copy this script into the box for custom API. Then you would type the commands keithcurtis intially posted to make the sight changes.&nbsp;
1585430440
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Yes, here is a handy explanatory video by user Nick O. It's quite short.
Thanks guys! Are you aware of a script that allows me to toggle the 'emits light' off for all NPC tokens? I'm trying to save on the lag as my connection isn't the best.&nbsp;
1585598914
The Aaron
Roll20 Production Team
API Scripter
I can add that to the above pretty easily this evening.
Sweet! Thanks dude! Very decent of you. Will I just need to delete and then re-add the script?
1585600304
The Aaron
Roll20 Production Team
API Scripter
Yeah, you'll just replace it with what I post later.&nbsp; I'll add additional functionality
1585601470
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I'll update my post to just have a link to yours after you post, so as not to have dueling code.
1585609444
The Aaron
Roll20 Production Team
API Scripter
Here's the Gist:&nbsp; <a href="https://gist.github.com/shdwjk/e01aff3741987d594357c7c1a0853980" rel="nofollow">https://gist.github.com/shdwjk/e01aff3741987d594357c7c1a0853980</a> !set-has-sight --no-light Will remove light settings from all npc tokens. Note : There's no going back once you run it, it loses the settings.&nbsp; You might want to copy your game and try it out first to make sure it's what you want.
1585611063
The Aaron
Roll20 Production Team
API Scripter
keithcurtis said: Here is the code The Aaron gazed upon his old code and like Athena Parthenus, new code sprang fully formed from his brow, ready to shine upon the world the new light of wisdom. BWAHAHAHAHAHA!!!