Maptool: Vision of owned NPC tokens is ignored if individualized views is off

Created on 21 Jun 2020  路  7Comments  路  Source: RPTools/maptool

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:

  1. Create a NPC token with sight
  2. Start the server, making sure individualized views are off and the map vision is on
  3. Have a player join, and give them ownership of the NPC token
  4. The player won't be able to see their token

Expected behavior
The player can see their owned NPC tokens.

MapTool Info

  • Version: 1.7.0, develop
  • Install: ew

Desktop (please complete the following information):

  • OS: Windows
  • Version: 10

Additional context
Previous discussion regarding PC and NPC tokens: https://github.com/RPTools/maptool/issues/655

bug tested

Most helpful comment

I think there were some strong opinions on it IIRC. For me it just makes sense that ownership should drive things.

All 7 comments

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.

Was this page helpful?
0 / 5 - 0 ratings