Describe the bug
The vision of owned NPC tokens with sight is ignored if individualized views are off.
Workaround: changing the NPC token to PC, or turning individualized views on.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The player can see their owned NPC tokens.
MapTool Info
Desktop (please complete the following information):
Additional context
Previous discussion regarding PC and NPC tokens: https://github.com/RPTools/maptool/issues/655
When Individual Views is off the code is probably checking only checking for PC tokens with sight and not any player-owned tokens with sight.
Yep.
if (!isGMview && (token.getType() != Token.Type.PC)) {
continue;
}
Currently when individualized views is off, players get the vision of the PC tokens but not the vision of the NPC tokens, regardless of ownership.
Instead, I suggest players should get the vision of all PC tokens, as well as the vision of all NPC tokens owned by a non-gm player.
It looks like this was on purpose. See this post by @JamzTheMan, and the few above it and below it, in this thread on the forums: https://forums.rptools.net/viewtopic.php?f=60&t=23681&p=267032#p267054
I'm pretty sure we had this hashed out previously, so there are likely other threads to consider as well, but this at least provides the timeframe with nit was discussed...
Instead, I suggest players should get the vision of all PC tokens, as well as the vision of all NPC tokens owned by a non-gm player.
That would make sense to me. If a token is owned by a player client and has vision that token should contribute to the view of the player client.
I think there were some strong opinions on it IIRC. For me it just makes sense that ownership should drive things.
PR #2060 fixes this so that players get the vision of all PC tokens, as well as the vision of all NPC tokens owned by a connected non-gm player.
Tested. Player-owned NPC tokens now visible to players when Individual Views is not enabled and when no PC tokens are on map.
Most helpful comment
I think there were some strong opinions on it IIRC. For me it just makes sense that ownership should drive things.