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

Hide tokens in turn tracker when out of line of sight

1603908153

Edited 1603908204
Hi! I'm new to Pro and don't have any experience regarding use of API scripts and most importantly finding them . There may already be a script for my problem, so before trying to write a script myself I figured I could ask the more experienced users whether they know of an existing script that does what I want: Can I make tokens invisible in the turn tracker when none of the players has sight of that token? Meaning, if they can't see it on the map due to dynamic lighting, they can't see it in the turn tracker either. That way I can roll for initiative for all enemies on a map, whether visible at the start of combat or not, and the players don't automatically see how much enemies there are in the turn tracker. So far I've been moving tokens to the GM layer if necessary; that way players don't see them in the turn tracker. But keeping track of who the players can see and who they don't (and moving the tokens back and forth between token layer and GM layer) after every turn is a bit of a hassle. A (probably more simple) alternative that would help me as well is just hiding the turn tracker completely or at least hide all non-player tokens in the turn-tracker. Does anyone know of a method to do any of this?
1603911114

Edited 1603911139
David M.
Pro
API Scripter
Not exactly what you are asking, but you may try out this trick proposed by Mel C (no api required). Basically putting copies of creatures on another page and rolling initiative there. Relies on the purported fact that GMs see all turns in the tracker for all pages, while players only see those entries for the page with the Player Ribbon. I haven't tested, but it sounded interesting. Of course, the players would never see the enemy turns in the tracker with this scenario, so YMMV. Dunno, could be seen as a feature, depending on how you want to run things. 
1603911288
The Aaron
Roll20 Production Team
API Scripter
I'm not aware of a script that can do that currently.  It would be pretty complicated and require quite a bit of math. Your second ask is probably easier, providing a way to have all non-player token's initiative hidden.  The way I'd do that is basically extracting some bits from Bump, which kind of does the opposite.  I'd have a surrogate token on the GM layer with the Initiative, and just make sure to keep it with the initiative no matter which you select to roll.
1603913298
David M.
Pro
API Scripter
For the always hidden tracker entries route, would you need a script if you just kept a copy of each npc type somewhere out of the way on the GM layer and just rolled initiative from there? I guess the advantage of the reverse Bump script would be if you deleted the master token, the surrogate would be deleted as well (and thus automatically removed from the turn tracker)?
1603915214
The Aaron
Roll20 Production Team
API Scripter
And hovering would highlight the right token, and things that ping you to the current turn's token would put you to the right place. 
I just pop them onto the GM layer. If you use the keyboard shortcuts it is fast and easy to zip around the layers. [control/command] [L] [K] = to the Gm layer [control/command] [L] [O] = to the Token layer. The tokens on the GM layer will not be visible to the players on the Tracker.
Thank you for your advice! I will definitly check out the bump script. Keeping a copy of each token on the GM layer or a different page is a nice idea as well (and probably less work for me). Thank you again! PS: @al e.: My problem with moving tokens to/from the GM layer was not the time needed to move them, but the time needed to check if any of the player tokens still has line of sight to (each) enemy token every turn.
1604432539
Victor B.
Pro
Sheet Author
API Scripter
GM layer is the only real way.  Detecting the dynamic lighting and hiding tokens based on multiple party member locations I'm not sure is even possible.