Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

CC auto-selects token of the current turns actor when applying damage via chat buttons #82

Open
Almaity opened this issue Jul 15, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Almaity
Copy link

Almaity commented Jul 15, 2021

The Combat Carousel auto-selects the token who's turn it currently is when the tokens HP changes, whether via buttons in chat, right clicking token and changing it there, or changing it through the sheet. Seems it simply re-selects the current turns actor whenever HP changes. (Which is what the bar is set to, by default)

It also auto-selects tokens when a turn starts, but I see there's a post already requesting a way to toggle that on or off.

Expected behavior
I would like to keep my current token selected so that I may apply multiple damage rolls from different attacks/sources, as well as not have my vision change constantly due to changing which actor is selected.

Environment Info (please complete the following information):
image

  • CC Version: 0.2.1
  • Browser: chrome
  • OS: windows 10

Addon seems pretty damn cool, was really excited to use this since it has some functionality of another module I wanted to use (the hp bars in initiative tracker) but that module just lagged foundry out way too hard, this one doesn't seem to do that + it looks a lot better visually as well :)

@Almaity Almaity added the bug Something isn't working label Jul 15, 2021
@megahead11
Copy link

I can reproduce this same issue. I believe I reported it before in the discord a long time ago during alpha T_T

To clarify, it only seems to re-select if you use damage buttons (or the built in foundry right-click damage/heal dialogue) on any tokens in the tracker. Anyone not included will not cause this issue.

Hopefully there's a fix for this soon, because this makes it extremely difficult to use with any roll modules (like Better Rolls or Midi) that have damage buttons.

@eclarke12
Copy link
Member

eclarke12 commented Sep 3, 2021

I'm having trouble reproducing this issue. Are you saying if you apply damage to a token OTHER than the currently active turn, it re-selects the current turn?

I reproduced the behaviour. When you edit the HP of a different token (eg. select that token, then edit HP somehow) it will snap control back to the active turn.

If so, I believe this issue is resolved with #80

@megahead11
Copy link

I'm having trouble reproducing this issue. Are you saying if you apply damage to a token OTHER than the currently active turn, it re-selects the current turn?

If so, I believe this issue is resolved with #80

Yes, I believe the two are actually related.
In my current local copy of CC, I actually patched out the auto-selection on turn switch and it resolved this issue.

@eclarke12
Copy link
Member

This is caused by HP updates sending a render request to the carousel and part of that request triggers checking the "active" combatant and if the setting to control the active combatant is checked, it will then control that token.

Changing this will require a number of code changes so I'm going to park this item for a bit. For now please uncheck the "control active combatant" checkbox in settings to prevent this behaviour.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants