Open Linruat opened 8 months ago
Combat Details doesn't really mess around with visibility. It sounds like that might be a bug with Foundry.
One of my players had the exact same issue and we also narrowed it down to Combat Details using Find the Culprit.
The issue isn't related to vision itself, but rather the module selecting the token of the next person in combat upon passing the turn, even if you don't have access to that token. On top of being able to see that token's vision, this allows you to write in chat as their character and even use their features and spells through modules like Argon HUD.
I managed to reproduce the issue after I realized that this bug report and my player both use the targeting tool instead of pressing T on tokens.
I can verify this bug - we'd been seeing it for a while, so not sure when it's introduced, but I reproduced it in a world with no modules enabled except for this one and Action Pack, mostly because it's the easiest way to demonstrate the problem.
In this combat, Akra is the player, and Quillathe is the GM/enemy. Combat has started, and everything is as expected. The player does their turn, and it's still as expected.
However, if the player has anything else targeted, when they end their turn, the selection focuses upon the new character which is not the player, and this (if using Action Pack) reveals their stats, etc in the left-hand tray. They can't DO anything from it (although they can see the inventory and abilities), although they CAN prematurely end the turn by clicking End Turn.
Other modules can similarly expose it (Always HP is one that comes to mind) but unless you've got something like these which retains information on the screen, the only real way to notice it is that the visibility swaps to the other person. If I were to add a wall between the two:
Akra will see with Quillathe's visibility when it goes to Quillathe's turn
I played around with it when doing this demonstration, and it's specifically the "Select Combatants" option (which is available to each user, not just the GM). It's selecting combatants they don't have ownership to, apparently if they're targeted. Toggling that option off in the player's session appears to disable the problem.
We tried a quick change:
if (combat && combat.started && setting('select-combatant')) {
combat?.combatant?.token?._object?.control();
}
To:
if (combat && combat.started && combat?.combatant?.token?.isOwner && setting('select-combatant')) {
combat?.combatant?.token?._object?.control();
}
seems to take care of it.
When Passing a Turn While having the Foundry "Select Targets Tool" Selected, Provides Players Vision from selected targets on those targets' turns.
Steps to reproduce the behavior:
Expected behavior Regardless of target selection method, the player should NOT gain the vision of the selected target
Screenshots What the character Should See:![image](https://github.com/ironmonk88/monks-combat-details/assets/156027259/3fd7ee80-6bfe-4622-8f0a-258a1aef94f8)
What the player can see, but shouldn't:![image](https://github.com/ironmonk88/monks-combat-details/assets/156027259/133fd802-1314-4b00-bbc7-0d04d9cd4d2b)
Please complete as much of the following information as possible:
Find the Culprit
listed this module as the culprit.Additional context -Verified Players do NOT have any permissions for the suspect token -This issue does NOT occur if you have any tool other than "Select Targets" tool selected when you pass your turn.