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

GM Controlling Player Vision on Turn Order?

Background: my group uses Roll20 with a mixed face-to-face and remote player group. Roll-20 is displayed for the face-to-face group on a wall monitor that is a clone of a second GM monitor running a player instance of the game. The primary monitor runs the GM instance of roll20. Unfortunately, my face-to-face players are die-hard paper scribbles and dice in hand players that refuse to embrace the use of tablets or laptops at the gaming table and the GM controls all player token activity for those players. Issue: when using dynamic lighting and vision, the shared face-to-face player monitor shows a shared party vision view unless I individually activate vision for the active player and deactivate vision for the inactive players using tokenmod. "CTRL - L" only appears to work on the GM Instance. I was curious if there is better way to automate the vision control process so that the shared monitor only displays the vision of the player whose turn is active. 1. Can TokenMod turn vision on for one player (the active turn player) and off for all other players in a single macro? 2. Could player vision view could be incorporated with the TurnMarker API so that the active marked player has only their vision displayed on the player shared monitor. I realize this would also affect the vision of the remote players, but I am ok with that. I welcome any thoughts or idea anyone might have on the best way to accomplish this or if this has already been done. Thanks
1464089543
The Aaron
Pro
API Scripter
Token mod can change the vision settings, so you could use it to toggle has sight whenever a token's turn begins and ends. I think it would be: !token-mod --flip light_hassight Something automating that could be added to TurnMarker, possibly keyed off the token representing a character and having permission 'all' to only get tokens that are group controlled (or via an attribute).  The he first you could do now, though it's a bit manual. The second I'll look into, though probably not soon. 
I am already using Token Mod macros manually as you prescribed. As you said, it is a bit manual, but is has been a viable solution although somewhat cumbersome. I always appreciate your input on any forum threads.  Thanks
It would probably be easier to just add a small function to change has sight on the token at the top of the turn order and exclude the remote player.
1464097899
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Could also use my  ShareVision  Script. Simply set all the actual tokens to not have sight and then just mark whichever token you want to have vision with the correct status marker. Not sure it's any less manual than tokenmod, but thought I'd throw it out there.
Thanks for everyone's input. I have been attempting multiple solutions to limit the shared gameroom display view to the active character's vision only. I have attempted turn to "has sight" on/off manually and using token mod, but it appears vision on the shared gameroom display is more dependent on the whether the account ID for the shared instance controls the character on the shared display than the actual vision settings. All tokens controlled by the shared display account name share vision regardless of whether "has sight" is toggled on or off. If the vision setting parameters are deleted for each character token, then it works, but they they have to be reset back to the proper settings on each turn order change. Is it possible to to changed the "controlled by" settings via a macro or does this require an API script? Are they any known API scripts that already do this or something like this that I can adopt for this purpose? Thanks,
1464872510

Edited 1464872678
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Michelle, Just want to make sure I'm understanding what you're saying. In your game, turning someone's "has sight" on or off doesn't affect the vision of that token? That sounds like a bug to me, or at least I've never run into that behavior before. Do you have any light sources active in the area of your players? and do you have "enforce LOS" active on the page settings? Roll20 doesn't enforce a vision radius, so if you have light sources near other characters and they are in line of sight, or you don't have enforce los enabled, the one character that has vision will still be able to see things around the other characters and it will probably look a lot like you are still getting vision from those other characters. This of course does not explain it working if you delete the parameters, so I actually have no clue. Hope that helps Sorry that was totally unhelpful, Scott
Shonder said: 2. Could player vision view could be incorporated with the TurnMarker API so that the active marked player has only their vision displayed on the player shared monitor. I realize this would also affect the vision of the remote players, but I am ok with that. I'm working on a simple script that doesn't need any integration into any other scripts and will allow you to save the sight of tokens to a list and then when that token appears at the top of the turn order, it has its sight set to what was saved. Won't have it until later this week though. Maybe Friday evening and maybe not at all if it doesn't work. 
That would be awesome! I look forward to it
About halfway done. So far you can save the light settings of selected tokens. Should be fairly simple to expand it to get/set sight/vision/light settings based on the turn order. However, I need to re-do some stuff to use character id's instead of token id's, since each time you make a copy of a token... its id changes.
1464991703

Edited 1464992153
Question... are you using character sheets in Roll20 at all for the players or just tokens on a map? I'm running into the same issue Michelle D has. You're using a single account to control all the face to face player tokens.... which means simply toggling light_hassight isn't good enough to limit the vision per token. Removing all sight/vision/light settings from everything but the token on top of the turn order is a bad hack... because other tokens nearby may have light that the current token could see and removing those settings would cause the current token to not see everything they should be able to see.
Thought about removing the represents information on the token and then adding it back at the top of the turn order, but if you're using tokens to track HP, it unlinks those stats until the character it represents is added back. So... any adjustments made outside of that character's turn would not be saved. Possible solutions are... 1. Use tokens not tied to any character sheet. Would need to remember to update the character sheet at the end of combat. 2. Add yet another api script to link token stats to character sheets without representing the character sheet.
SkyCaptainXII. Michelle D is my wonderful gaming spouse of 30 years. Yes we are using character sheets, so removing the represents character info would cause more work than efficiency gained. I believe the solution is to add or removed the player "controlled by" on each turn change. If the shared monitor account is "Gameroom", any characters controlled by "Gameroom" sharevision regardless of whether or not "All players see light" is checked so long as the token "Has Sight" setting is checked. If I remove controlled by "Gameroom" and leave "All players see light", the light emitted by that token is still seen by all characters on the shared monitor that have "controlled by "Gameroom" set and the linked token has "Has sight checked". The Aaron was discussing adding the TokenMod Ability to be able to change "controlled by", which would allow the use of macros to control share monitor vision on each turn change. This would be great, but not as elegant as automatically changing "controlled by" to the active character as turn tracker advances. Macro based control would work great out of combat is maps are used. After watching several hours of streaming games yesterday during Roll20Con yesterday, I am surprised there has not been more demand for shared player view that has a true turn-based depiction of character vision. The ability add/change token/character control via macros has many other uses such as giving individual or shared control of other tokens for the purpose of scrying, clairvoyance, familiars, pets, etc. If all you "Script-O-Mancers" could solve this, my gaming group would truly be in your debt. I have not coded in years and have never learned Java except for a few SCORM calls needed for troubleshooting in my profession. I have decided to dig in to the code again, but at my current pace it could be years....lol. Thanks,
Shonder said: SkyCaptainXII. Michelle D is my wonderful gaming spouse of 30 years. Yes we are using character sheets, so removing the represents character info would cause more work than efficiency gained. I believe the solution is to add or removed the player "controlled by" on each turn change. If the shared monitor account is "Gameroom", any characters controlled by "Gameroom" sharevision regardless of whether or not "All players see light" is checked so long as the token "Has Sight" setting is checked. If I remove controlled by "Gameroom" and leave "All players see light", the light emitted by that token is still seen by all characters on the shared monitor that have "controlled by "Gameroom" set and the linked token has "Has sight checked". The Aaron was discussing adding the TokenMod Ability to be able to change "controlled by", which would allow the use of macros to control share monitor vision on each turn change. This would be great, but not as elegant as automatically changing "controlled by" to the active character as turn tracker advances. Macro based control would work great out of combat is maps are used. Here's the problem... you can't edit the controlledby field of tokens without unlinking them from the character sheet they represent. So if you're tracking hit points with the tokens or anything else with the token bars it becomes pretty complex to keep everything connected properly via the api.
Can you edit the character "controlled by" setting via api  instead of the token "controlled by setting" without having to reset the linkage? Just curious. Thanks all for your input.  This is not a showstopper for us, since we always have a good time regardless. We just thought it would be cool to actually see the actual vision of the individual player on the shared monitor.
Will try that after my one shot game tonight and see if it works.
Ok. Have it working. Now I need to refine it and add a way to quickly reset vision on all the characters at the end of combat. I'm also trying to figure out what is the best way to handle monster turns, since it currently just removes the controlledny settings on any characters in the turn order that have also had their controlledby settings saved via an api command.
Ok, found something weird which I spent many many hours trying to figure out. The lighting changes won't change unless you move a token or click on the map in the browser for the players. Unless.... you trigger a token change event by setting or unsetting something like a status icon. I was sooooo pissed when I figured that out cause I had re-written the script a half-dozen times or more trying to get the instant change of lighting I had earlier. Finally figured out what it was when I re-enabled my simple initiative tracker script. So... once I figure out a way to trigger that on token change event without screwing up something people use for something else, I'll have a better version for you that doesn't rely on tokens and instead uses character id's. Much easier and more robust.
1465136374

Edited 1465136615
Here's an improved version of the script. To use it, you just need to get the character id's for the characters you want to toggle control of. The easiest way to do that is to select tokens that represent those characters and enter @{selected|character_id} in chat. Then copy/paste the character id's into the script like this ... var CharacterIDs = ["id", "id", "id"] ... replacing id with the actual id shown in chat. It should look like this: var CharacterIDs = ["-KHWScTHo_oHinvteAqm", "-KGucJWiVEW9vZhF7_eM", "-KHWSkIxLWXyGIO5A4dJ"]; Due to the way lighting doesn't update until a token change has been triggered, this version includes adding a green dot to the token at the top of the turn order. You could use whatever status icon you want, but I haven't been able to find an easy way to trigger the change. Maybe TheAaron can figure something out. on("change:campaign:turnorder", function(current, previous) {     var CharacterIDs = ["-KHWScTHo_oHinvteAqm", "-KGucJWiVEW9vZhF7_eM", "-KHWSkIxLWXyGIO5A4dJ"];     var CurrentTO = JSON.parse(current.get("turnorder"));     var PreviousTO = JSON.parse(previous["turnorder"]);     var Token;     var Character;          // Save F2F data...     if (!state.f2f) state.f2f = {};     if (_.isEmpty(state.f2f)) {         _.each(CharacterIDs, function(charid) {             Character = getObj("character", charid);             state.f2f[charid] = {                 CharacterID: charid,                 ControlledBy: Character.get("controlledby")             }         });     }          // Process the turn order...     if (CurrentTO.length > 0) {         _.each(state.f2f, function(a) {             getObj("character", a["CharacterID"]).set("controlledby", "");         });         if (CurrentTO[0].id != -1) Token = getObj("graphic", CurrentTO[0].id);         if (CurrentTO[0].id != -1 && Token.get("represents") !== "") Character = getObj("character", Token.get("represents"));         if (CurrentTO[0].id != -1 && Token.get("represents") !== "" && Character.id in state.f2f) {             Character.set("controlledby", state.f2f[Character.id]["ControlledBy"]);         } else {             // Return control to all players during npc and custom item turns...             _.each(state.f2f, function(b) {                 getObj("character", b["CharacterID"]).set("controlledby", b["ControlledBy"]);             });         }     } else {         // Turn order tracker is empty. Return control to all players...         _.each(state.f2f, function(z) {             getObj("character", z["CharacterID"]).set("controlledby", z["ControlledBy"]);         });         state.f2f = {};     }          // Simple Initiative Tracker (Green Dot)...     if (CurrentTO.length === 0 && PreviousTO[0].id != -1) getObj("graphic", PreviousTO[0].id).set("status_green", false);     if (CurrentTO.length > 0 && CurrentTO[0].id != -1) getObj("graphic", CurrentTO[0].id).set("status_green", true);     if (PreviousTO.length > 0 && PreviousTO[0].id != -1) getObj("graphic", PreviousTO[0].id).set("status_green", false); });
SkyCaptainXIII you are amazing!!!  Thanks so much! This works great!  It works exactly as you described.  We will use this for our game next week. I have been playing around with this all morning and it works great. I will let you know any issues I encounter. Thanks!!!!
Are you using the original one I posted many hours ago or the one I posted this morning at 10:20 eastern usa time?
1469599671

Edited 1469599915
I have found that this script, which I like, seems to interfere with TurnMarker, killing off the orange turn marker that appears under tokens...? You get the status marker instead, but I did like that orange marker... Typical, went back in to check things and it works... Aaron was fixing my scripts the other day so I blame him.
Yeah, my script was written specifically for one thing and it requires an update to tokens to trigger the dynamic lighting change. Setting the green status marker seems to trigger that change. I didn't look too much into anything else that might work.
1469630709
The Aaron
Pro
API Scripter
Kevin Flynn said: Typical, went back in to check things and it works... Aaron was fixing my scripts the other day so I blame him. :) ping me if you want me to drop in and break it again.