xorus / EngageTimer

Stopwatch / Countdown plugin for Dalamud
GNU Affero General Public License v3.0
16 stars 6 forks source link

Stopwatch does not reset on boss transitions, which messes with carryover runs #51

Closed HaySome22 closed 1 year ago

HaySome22 commented 1 year ago

When doing carryover P12S runs, the timer keeps counting. Practically, players want to reset the timer when entering phase 2. The ACT equivalent is to manually end the encounter so a new one automatically starts when you enter combat after the cutscene. Does this plugin have something similar?

xorus commented 1 year ago

The stopwatch works by looking at the condition "InCombat" which is an internal game status applied to characters. The game does not remove it when transitionning phases like in P12S but I never ran into this issue because we'd just quickly reset/wipe after the transition so we could do full openers. I could not find a reliable way to detect a combat transition yet :/.

If you can read code you can see the relevant code here: https://github.com/xorus/EngageTimer/blob/main/Status/CombatStopwatch.cs#L38

Because the condition "incombat" is never dropped, I can't make it so it stops the stopwatch. Best I could do might be to set it to zero and disable it until you manually start it again, which seems very unpactical. I don't think I can change the way the stopwatch starts/stops as its the most accurate and less cpu-intensive I've found yet. (but more research is always welcome)

Best I can think of would be a /eg stopwatch reset that would just set the stopwatch value to 0. It would immediatly start back but I guess you could pu that into a macro and use a hotkey to trigger it.

Would that help?

HaySome22 commented 1 year ago

Oh I see. That's just unfortunate. The precision of this timer is why it's generally preferred over the ACT one, but that would be lost if you have to manually start it. Thanks for reviewing this.

xorus commented 1 year ago

Yeah I really can't think of anything else with the tools I have, and I don't like my half bakes solution idea either. I can't wait to restart the timer on combat action as openers / rebuffing / dance / whatever would mess with that. I can't check for the boss being in the anger list either as it is also inaccurate if you start attacking a little late, and I'm not even sure it's feasible in a generic way that would work on other door bosses too :/. Guess the stopwatch is a standard Speedrun timer now lol.

I'll be closing making this thread as solved but thanks for bringing this issue to my attention! Hope someone figures it out or SE unjanks things :p.

xorus commented 1 year ago

Changed the issue title to make it easier for people to search, thread is still open for ideas.