ironmonk88 / monks-tokenbar

GNU General Public License v3.0
48 stars 46 forks source link

Movement remains in "combat turn" after ending combat encounter #106

Open ejrinkus opened 3 years ago

ejrinkus commented 3 years ago

Foundry version 0.8.6

Game System D&D 5E

What happened Our DM ran us through a combat encounter tonight, then ended the encounter, but we all still could not move our tokens and continued receiving warning messages saying that we couldn't move because it wasn't our combat turn. After trying to debug for a bit (starting a new encounter -> ending the new encounter), we couldn't quite figure out what was happening.

I hopped into the server as a GM player, and noticed that the "Combat Turn" icon in the token bar was still highlighted. Selecting "Free Movement" instead seemed to solve the issue.

What we expected Ending the combat encounter automatically transitions the movement style from "Combat Turn" to "Free Movement."

Console Logs Unfortunately, it doesn't seem like anything particularly helpful in the console logs.

On the GM side, I see the following (starting with when I create the encounter to when I end it):

Foundry VTT | Created Combat with id [***]
foundry.js:2032 Foundry VTT | Rendering TokenHUD
backend.mjs:306 Foundry VTT | Created Combatant with id [***] in parent Combat [***]
foundry.js:2032 Foundry VTT | Rendering TokenHUD
backend.mjs:306 Foundry VTT | Created Combatant with id [***] in parent Combat [***]
foundry.js:2032 Foundry VTT | Rendering TokenHUD
backend.mjs:306 Foundry VTT | Created Combatant with id [***] in parent Combat [***]
foundry.js:2032 Foundry VTT | Rendering TokenHUD
backend.mjs:306 Foundry VTT | Created Combatant with id [***] in parent Combat [***]
monks-tokenbar.js:22 monks-tokenbar |  Changing global movement combat
monks-tokenbar.js:22 monks-tokenbar |  display notification
foundry.js:2032 Foundry VTT | Rendering Dialog
foundry.js:2032 Foundry VTT | Rendering AssignXPApp
backend.mjs:306 Foundry VTT | Deleted Combat with id [***]

And on the player side:

Foundry VTT | Created Combat with id [W5JyaSPaXL6jZ2SP]
backend.mjs:306 Foundry VTT | Created Combatant with id [rD5VPO4yKQ8JGzly] in parent Combat [W5JyaSPaXL6jZ2SP]
backend.mjs:306 Foundry VTT | Created Combatant with id [vxfDiPgkbVxNcgzk] in parent Combat [W5JyaSPaXL6jZ2SP]
backend.mjs:306 Foundry VTT | Created Combatant with id [te9K81apK9Q3Zt8Z] in parent Combat [W5JyaSPaXL6jZ2SP]
backend.mjs:306 Foundry VTT | Created Combatant with id [jqEZpBvqhecsDG68] in parent Combat [W5JyaSPaXL6jZ2SP]
monks-tokenbar.js:22 monks-tokenbar |  movement change
foundry.js:19156 You are calling PlaceableObject#getFlag which has been deprecated in favor of Document#getFlag. Support will be removed in 0.9.0
monks-tokenbar.js:22 monks-tokenbar |  Checking movement Anfira Otrovac Combatant zq3qKYp5tJs5439s Token false
foundry.js:19156 You are calling PlaceableObject#getFlag which has been deprecated in favor of Document#getFlag. Support will be removed in 0.9.0
monks-tokenbar.js:22 monks-tokenbar |  Checking movement Anfira Otrovac Combatant zq3qKYp5tJs5439s Token false
foundry.js:19156 You are calling PlaceableObject#getFlag which has been deprecated in favor of Document#getFlag. Support will be removed in 0.9.0
foundry.js:19165 You are calling PlaceableObject#setFlag which has been deprecated in favor of Document#setFlag. Support will be removed in 0.9.0
foundry.js:19156 You are calling PlaceableObject#getFlag which has been deprecated in favor of Document#getFlag. Support will be removed in 0.9.0
monks-tokenbar.js:22 monks-tokenbar |  Checking movement Anfira Otrovac Combatant zq3qKYp5tJs5439s Token false
foundry.js:19156 You are calling PlaceableObject#getFlag which has been deprecated in favor of Document#getFlag. Support will be removed in 0.9.0
monks-tokenbar.js:22 monks-tokenbar |  unsetting notified Token {_events: i, _eventsCount: 2, tempDisplayObjectParent: null, transform: t, alpha: 1, …}
foundry.js:19174 You are calling PlaceableObject#unsetFlag which has been deprecated in favor of Document#unsetFlag. Support will be removed in 0.9.0
backend.mjs:306 Foundry VTT | Deleted Combat with id [W5JyaSPaXL6jZ2SP]
foundry.js:19156 You are calling PlaceableObject#getFlag which has been deprecated in favor of Document#getFlag. Support will be removed in 0.9.0
foundry.js:19156 You are calling PlaceableObject#getFlag which has been deprecated in favor of Document#getFlag. Support will be removed in 0.9.0
foundry.js:19156 You are calling PlaceableObject#getFlag which has been deprecated in favor of Document#getFlag. Support will be removed in 0.9.0
foundry.js:19165 You are calling PlaceableObject#setFlag which has been deprecated in favor of Document#setFlag. Support will be removed in 0.9.0
monks-tokenbar.js:22 monks-tokenbar |  unsetting notified Token {_events: i, _eventsCount: 2, tempDisplayObjectParent: null, transform: t, alpha: 1, …}
foundry.js:19174 You are calling PlaceableObject#unsetFlag which has been deprecated in favor of Document#unsetFlag. Support will be removed in 0.9.0

Note that the logs from the player side include when I attempted to move the token.

Let me know if there's any other info I can help provide!

ironmonk88 commented 3 years ago

What's the "Set movement after combat" setting set to?

ejrinkus commented 3 years ago

It's set to Free Movement: image

However, I didn't confirm this at the time I originally posted this issue. Let me test one more time and confirm that the issue is still present (it's possible my GM updated the setting since I posted the issue).

ejrinkus commented 3 years ago

OK, yeah, just confirmed that the issue is still happening. I also tried the following test cases:

So yeah, not seeing any weirdness based on what values these settings have, seems like the "Set movement after combat" is simply not being respected.

Hope that helps, thanks for looking!