[Bug]: MTScript function `setCurrentMap` can show players maps which should not be visible to players.
Opened this issue · 6 comments
Describe the Bug
Orignally raised here: https://discord.com/channels/296230822262865920/917471293450891325/1401710043921125517
The MTScript function setCurrentMap can take players to a map that should not be visible to players. While this is a trusted function, it is unexpected that a player is able to see a map that has been set to be not visible to players.
To Reproduce
Connect to a server as a player and run a macro containing setCurrentMap("<not visible map name>") which takes them to a map that is set to be not visible to players.
Observe that the player can see the map as they could if was visible.
Expected Behaviour
If a map is set to be not visible to players, players should not be able to see or be taken to it by any means.
Concerns exist however about the impact of changing such entrenched functionality to a player-safe way of switching maps, so a solution may be a new function or parameter to the existing function.
Screenshots
No response
MapTool Info
1.3b60+
Desktop
No response
Additional Context
For now https://wiki.rptools.info/index.php/setCurrentMap has been updated with a Warning about this unexpected behaviour.
May be seperate Feature Request to hide maps from the mini map selector on the menu bar.
This is not a bug. The is map visible functionality only dictates what map names the players can see and change to themselves. The GM should always be able to send players to any map.
This is not a bug. The is map visible functionality only dictates what map names the players can see and change to themselves. The GM should always be able to send players to any map.
Thanks for confirming it is not a bug, however to me it still seems inconsistent with the UI functionality, as in:
- If the GM is on a map which is not visible to players and he uses Tool -> Enforce Players to Current Map (or Ctrl + E), players are not taken to that map. I am not sure of any way a GM can manually do via the UI what this function does for player not-visible maps.
- If a player is on a map and the GM sets that map to be not player visible, then the player's map screen goes black. This function bypasses that black screen.
Do you think this needs to be a feature request instead then rather than a bug? e.g. a foolproof way of switching maps without unintentionally exposing player-only visible maps? I'm thinking something more akin to the current Enforce Players to Current Map UI functionality. If so please can someone change the labels/ticket type as appropriate? Thanks!
This is not a bug. The is map visible functionality only dictates what map names the players can see and change to themselves. The GM should always be able to send players to any map.
Thanks for confirming it is not a bug, however to me it still seems inconsistent with the UI functionality, as in:
- If the GM is on a map which is not visible to players and he uses Tool -> Enforce Players to Current Map (or Ctrl + E), players are not taken to that map. I am not sure of any way a GM can manually do via the UI what this function does for player not-visible maps.
- If a player is on a map and the GM sets that map to be not player visible, then the player's map screen goes black. This function bypasses that black screen.
Do you think this needs to be a feature request instead then rather than a bug? e.g. a foolproof way of switching maps without unintentionally exposing player-only visible maps? I'm thinking something more akin to the current Enforce Players to Current Map UI functionality. If so please can someone change the labels/ticket type as appropriate? Thanks!
Yeah, I would consider the not being able to bring players to where you are with enforcing players to the current map a bug. When it's fixed, it should probably pop up a dialog saying something along the lines of "You are moving players to a hidden map", with the options continue, continue and unhide map, cancel.
Yeah, I would consider the not being able to bring players to where you are with enforcing players to the current map a bug. When it's fixed, it should probably pop up a dialog saying something along the lines of "You are moving players to a hidden map", with the options continue, continue and unhide map, cancel.
But there is still the inconsistent behaviour of moving a player to a map that isn't "Player Visible" and them being able to see it, and it going black when the setting is toggled on while they are on the map.
If we're going to preserve the "map is visible" feature when moving a player to a "hidden" map then it might be nice to break the "Player Visible" setting into two variants:
- Map Hidden from Selector - Map does not show up in the selector and a player can only access the map via trusted macro or GM action.
- Player Visible - Blacks out map as it does now when a player is on it, but does not prevent moving players to it (though will be black when a player is on it regardless of how they get there).
And, tangentially, fix "Enforce Player to Map" to work regardless of whether the map is hidden from the selector or visible.
It's important that options mean what they say. The fact that maps which aren't "Player Visible" are in fact visible to players is clearly a problem, all the more so when this behaviour is hidden behind macro functions. @FullBleed is spot on to suggest separating the ability for players to select a map from their ability to see the map when brought there.
And, tangentially, fix "Enforce Player to Map" to work regardless of whether the map is hidden from the selector or visible.
Certainly, it should respect player visibility, not player selectability ...
... But who else is like me and finds "Enforce Players to Current Map" kind of clunky? I rarely care that players end up where I am, I want them to go to the map I prepared for them. Sometimes that is that same map I'm on, sometimes not. It's also an everyone-goes or no-one-goes option - I have no built-in option to send one or two players to the Astral Plane as penance for forgetting how a bag of holding works.
What I'd rather have is a list of players (just like the one in the Connections window, incidentally), be able to select the players of my choice (possibly all), then pick a map to send them to. And the list of maps I can choose to send them too would be the player visible maps, regardless of whether the players could have selected these maps themselves.
And, tangentially, fix "Enforce Player to Map" to work regardless of whether the map is hidden from the selector or visible.
Certainly, it should respect player visibility, not player selectability ...
Not sure If I was clear on this... but I actually think being able to "Enforce Players" to any map should NOT respect Player Visibility. Visibility is not Accessibility. I think I should be able to send Players to any map (which I believe is Craig's view). However, if "Player Visible" IS toggled off, then I think it should have consistent behaviour regardless of how they get to the map and they should be arriving at a black map. Right now, I can't do that with Enforce and I see no reason why.
Likewise, if the map isn't selectable I should continue to be able to send players to "hidden" maps.
... But who else is like me and finds "Enforce Players to Current Map" kind of clunky? I rarely care that players end up where I am, I want them to go to the map I prepared for them. Sometimes that is that same map I'm on, sometimes not. It's also an everyone-goes or no-one-goes option - I have no built-in option to send one or two players to the Astral Plane as penance for forgetting how a bag of holding works.
I definitely find it clunky because it's all-or-none. In my primary framework I disable the built in map selector and determine map access on a per-token basis. I can also move tokens and players individually to certain maps. The built-in tools just aren't up to snuff in this regard (macroscript ftw).
Typically, I prefer players to move themselves though (unless they're not paying attention)... so I give token's access and ask players to switch to a map via their character sheet map selection. But even with that, I almost always have them drop into a block of VBL so they can't see or do anything until I--and any additional group members--are ready to proceed. If the above updates were made to Player Visible/Hidden Selection I guess I could start using the Player Visible flag to black out a map during entrance staging.