quisquous / cactbot

FFXIV TypeScript Raiding Overlay
Apache License 2.0
797 stars 382 forks source link

Add timeline options to replace timeline names (e.g. 100 Gs => blue floaties) #8

Closed quisquous closed 6 years ago

xephero commented 6 years ago

As an addendum to this, it would be nice if timelines could be altered via triggers. Say for instance a boss is known to do mechanics ordered as either A (XYZ) B or B (XYZ) A. A and B always both happen, but can be in either order. Once we see A, we know that mechanic B will follow Z; but with static timelines, there's no way to reflect that, and it'll have to be "A or B" at that time, or you build out parallel paths.

A trigger on A or B first that is able to go into the timeline and rewrite the upcoming mechanic would be useful in that case.

quisquous commented 6 years ago

I've thought about this, but I also really like that all the timeline files are currently all compatible with the timeline plugin or the kaizoban fork. I'm somewhat reluctant to add too many extra features that they don't have.

My general feeling right now is that when there are alternate paths, you still have to find the timings for each path, and so parallel paths aren't really any worse, at least on the fights that exist so far. I'll keep this thought in mind though for future fights. If they really add one that has a ton of mechanics alternating back and forth, then I'll remember this thought for the future.

xephero commented 6 years ago

Parallel paths are something timelines handle relatively gracefully right now, I agree. There are cases where it's more minor than full splits, though, that it's useful, and it doesn't necessarily have to break compatibility.

Take O7S for example; We can figure out whether an upcoming cast will be Load or Skip or Retrieve based on prior activity. In the timeline itself we can simply have "Load??" like is in there now, and kaizoban will happily eat it up just like that. But with triggers, if we see a skip, we can look for the next "Load??" cast and replace it with "Skip", and if we don't, then we can replace the next "Load??" cast with simply "Load". This is even more applicable to O7N where we know that a given Load will be one of two things, but not which one until it goes off. The timeline resorts to just a plain "Load" there because everything preceding it is the same and it's totally not worth it to map out every pair just to hang onto the implicit variable of what the current and prior programs were.

Doing the selection based on current timeline position and actual ability names might not be the best way to go about it, but it is certainly possible to handle entirely within the triggers part, assuming you have a way of scanning timeline entries and getting the current time (these may not be true, I haven't looked at the core js parts too closely).

If it's something that happens more often throughout the fight, maybe you can set up a hideall "--sync2--" line, add an instance of that before the one we want (or even at the same time) that doesn't actually sync with anything, and use that as the starting time for the entry search to replace. Or even just require unique ones altogether if they're going to be replaced, then add hideall "A/B" and add "{time} A" if we see B first. Or, even less intrusive, if you don't mind coupling timelines and triggers a little more tightly, just straight up use the timeline number itself to select lines.