Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raidboss: use ActorControlExtra for sidewise spark cleaves #483

Conversation

jacob-keller
Copy link

Valarnin recently did some work to improve the Twilight Sabbath triggers
in m4s. He discovered that we can detect the Wicked Replica cleave
directions using the ActorControlExtra log lines with the 0197
'PlayActionTimeline' category.

Do the same in m4n, replacing the check for CombatantMemory trigger.
This should be more precise and less overhead. It is also slightly less
code.

As far as I can tell, all the clones use the same 11D6 and1 11D8 values
for their left or right cleave.

Signed-off-by: Jacob Keller [email protected]

Valarnin recently did some work to improve the Twilight Sabbath triggers
in m4s. He discovered that we can detect the Wicked Replica cleave
directions using the ActorControlExtra log lines with the 0197
'PlayActionTimeline' category.

Do the same in m4n, replacing the check for CombatantMemory trigger.
This should be more precise and less overhead. It is also slightly less
code.

As far as I can tell, all the clones use the same 11D6 and1 11D8 values
for their left or right cleave.

Signed-off-by: Jacob Keller <[email protected]>
@github-actions github-actions bot added raidboss /ui/raidboss module needs-review Awaiting review labels Oct 24, 2024
@jacob-keller
Copy link
Author

I've tested this on live game, and it works the same so far. I think this is preferable over combatant memory, but I think we still can't get rid of getcombatants entirely.

@valarnin
Copy link
Collaborator

For context here, PlayActionTimeline runs a full action timeline for a given actor. In this case, the action timeline is the entire "disc falling to reveal the actor" animation, which includes the actor's left/right cleave direction since that's part of the animation.

That's also why there are only two values for param1 - There's no "fast" animation variant.

The actual cast animation (that has the lightning VFX and includes the red "omen" cleave indicators on the floor) is still tied to the ActorCast packet/20| network log line, it's just not available until significantly later.

I just wanted to share the logic/reasoning of why PlayActionTimeline works here and why there are only two possible values for param1, since I didn't really include it in my PR.

@jacob-keller
Copy link
Author

I just wanted to share the logic/reasoning of why PlayActionTimeline works here and why there are only two possible values for param1, since I didn't really include it in my PR.

Thanks! Ya, I figured the savage version had a fast and slow animation variant since they need time between coming down and going off for the in between mechanics to hit.

@jacob-keller
Copy link
Author

For what its worth in my testing, the timing for the ActorControlExtra log lines and the combatant memory log lines appears to be very similar.

Copy link
Collaborator

@xiashtra xiashtra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me. Note that in testing, I regularly see the existing CombatantMemory version fire 1s sooner than this proposed ActorControlExtra version.

@xiashtra xiashtra removed the needs-review Awaiting review label Oct 30, 2024
@jacob-keller
Copy link
Author

Looks ok to me. Note that in testing, I regularly see the existing CombatantMemory version fire 1s sooner than this proposed ActorControlExtra version.

Hmmm that's interesting. In my logs it seems to appear at nearly the same time ... My understanding is that combatant memory relies on polling to check for and emit the matched log lines?

The delay probably only matters for the first hit anyway

@valarnin
Copy link
Collaborator

valarnin commented Oct 30, 2024

The timestamp of combatant memory log lines (261 lines) is not reliable because the actual tracked timestamp is always pulled from FFXIV_ACT_Plugin's GetServerTimestamp method, which can be running behind or ahead of the log writing queue that we push to in OverlayPlugin due to async code.

In the normal version of the fight, the network packet that actually changes the WeaponId always arrives with a server timestamp earlier than the PlayActionTimeline packet, but the order of any of the three lines can vary wildly.

Below is a quick grep of the three lines from some of my log files. Sorry about the age of these, I haven't touched the normal version of the fight in forever.

But the tl;dr is:

  1. Don't use CombatantMemory lines if there's another option
  2. Either 273|...|003F|?? or 273|...|0197|???? are perfectly and equally viable in normal mode
273|2024-07-21T19:09:19.0850000-04:00|400178F3|0197|11D8|0|0|0|648df0e69bee093b
273|2024-07-21T19:09:18.9960000-04:00|400178F3|003F|79|0|0|0|81006711b76830dc
261|2024-07-21T19:09:18.7360000-04:00|Change|400178F3|Heading|-1.5709|PosX|110.0000|PosY|100.0000|PosZ|0.0000|WeaponId|121|aa26ef11fc2b6ad6
261|2024-07-21T19:09:20.6540000-04:00|Change|400178F2|Heading|-3.1416|PosX|100.0000|PosY|110.0000|PosZ|0.0000|Radius|4.8388|WeaponId|121|51b4f94f898d9fd6
273|2024-07-21T19:09:21.0010000-04:00|400178F2|003F|79|0|0|0|87d916945cde1bfb
273|2024-07-21T19:09:21.0900000-04:00|400178F2|0197|11D8|0|0|0|b87b56294ff9edd0
273|2024-07-21T19:12:52.4200000-04:00|400178F4|003F|79|0|0|0|b207d53d57fa033d
261|2024-07-21T19:12:52.0510000-04:00|Change|400178F4|Heading|0.0000|PosX|100.0000|PosY|90.0000|PosZ|0.0000|Radius|4.8388|WeaponId|121|aac1b1ed55805f50
273|2024-07-21T19:12:52.4660000-04:00|400178F4|0197|11D8|0|0|0|6b3470181bbbe13d
273|2024-07-21T19:12:54.3810000-04:00|400178F3|003F|79|0|0|0|f30d8285cab20ac0
261|2024-07-21T19:12:53.9770000-04:00|Change|400178F3|WeaponId|121|ccc05ed1ac018573
273|2024-07-21T19:12:54.4690000-04:00|400178F3|0197|11D8|0|0|0|1cda3499967b75f7
273|2024-07-21T19:12:56.3850000-04:00|400178F2|003F|79|0|0|0|c35c5760cdb9719d
261|2024-07-21T19:12:56.0260000-04:00|Change|400178F2|WeaponId|121|3eb011666f7f058c
273|2024-07-21T19:12:56.4730000-04:00|400178F2|0197|11D8|0|0|0|d5b04bb12973caef
273|2024-07-21T19:12:58.3890000-04:00|400178F1|003F|79|0|0|0|b432d9a8f7584c43
261|2024-07-21T19:12:57.9800000-04:00|Change|400178F1|WeaponId|121|c762ade762182afe
273|2024-07-21T19:12:58.4770000-04:00|400178F1|0197|11D8|0|0|0|07f238da38dd8411
273|2024-07-23T14:13:52.2230000-04:00|40016DC1|003F|79|0|0|0|f3dd637e9f85429f
261|2024-07-23T14:13:51.9920000-04:00|Change|40016DC1|Heading|-1.5709|PosX|110.0000|PosZ|0.0000|Radius|4.8388|WeaponId|121|6c4129b97924629c
261|2024-07-23T14:13:51.9920000-04:00|Change|40016DC1|Heading|-1.5709|PosX|110.0000|PosZ|0.0000|Radius|4.8388|WeaponId|121|c6c1386365a9269e
273|2024-07-23T14:13:52.2670000-04:00|40016DC1|0197|11D8|0|0|0|aaf2cc32bdf9c561
261|2024-07-23T14:16:56.0570000-04:00|Change|40016DC1|Heading|0.0000|PosX|100.0000|PosY|90.0000|PosZ|0.0000|WeaponId|121|e9fb5b785f09c444
273|2024-07-23T14:16:56.3950000-04:00|40016DC1|003F|79|0|0|0|b00f9f09fae4e776
273|2024-07-23T14:16:56.4400000-04:00|40016DC1|0197|11D8|0|0|0|3e85437d5f0b3f4a
261|2024-07-23T14:16:58.0220000-04:00|Change|40016DC0|Heading|-1.5709|PosX|110.0000|PosY|100.0000|PosZ|0.0000|WeaponId|121|f3dd073fe79c9d7c
273|2024-07-23T14:16:58.3560000-04:00|40016DC0|003F|79|0|0|0|95eec8d5efc83d0f
273|2024-07-23T14:16:58.4450000-04:00|40016DC0|0197|11D8|0|0|0|be7b7231c4a58f03
261|2024-07-23T16:15:36.1650000-04:00|Change|40015210|Heading|0.0000|PosX|100.0000|PosY|90.0000|PosZ|0.0000|WeaponId|121|c504278942a69b53
273|2024-07-23T16:15:36.5210000-04:00|40015210|0197|11D8|0|0|0|2cc0c827413cdb15
273|2024-07-23T16:15:36.4760000-04:00|40015210|003F|79|0|0|0|8c86a392b43d159f
273|2024-07-23T16:15:40.4390000-04:00|4001520E|003F|79|0|0|0|861efc874626c8ce
273|2024-07-23T16:15:40.5290000-04:00|4001520E|0197|11D8|0|0|0|77e0d5ef8a9e47fa
261|2024-07-23T16:15:40.2100000-04:00|Change|4001520E|Heading|-3.1416|PosX|100.0000|PosY|110.0000|PosZ|0.0000|Radius|4.8388|WeaponId|121|3c29b84d348a9356
273|2024-07-23T16:15:42.4470000-04:00|4001520D|003F|79|0|0|0|d25110eda2cc523a
261|2024-07-23T16:15:42.0840000-04:00|Change|4001520D|Heading|1.5708|PosX|90.0000|PosY|100.0000|PosZ|0.0000|Radius|4.8388|WeaponId|121|0892dcfc1bd67e91
273|2024-07-23T16:15:42.5360000-04:00|4001520D|0197|11D8|0|0|0|a77537ea11ee2792
261|2024-07-23T17:43:53.1980000-04:00|Change|4001B433|Heading|1.5708|PosX|90.0000|PosY|100.0000|PosZ|0.0000|WeaponId|121|5f9883a266448aa7
273|2024-07-23T17:43:53.5420000-04:00|4001B433|0197|11D8|0|0|0|3c21195ac75189cc
273|2024-07-23T17:43:53.4970000-04:00|4001B433|003F|79|0|0|0|5c7b559fdbdfd3f6
273|2024-07-23T17:46:46.5930000-04:00|4001B434|003F|79|0|0|0|01535777605e8ed1
273|2024-07-23T17:46:46.6370000-04:00|4001B434|0197|11D8|0|0|0|fa6be925662cf831
261|2024-07-23T17:46:46.1850000-04:00|Change|4001B434|Heading|0.0000|PosX|100.0000|PosY|90.0000|PosZ|0.0000|WeaponId|121|ade255d82c6aa1d6
261|2024-07-23T17:46:46.1850000-04:00|Change|4001B434|Heading|0.0000|PosX|100.0000|PosY|90.0000|PosZ|0.0000|WeaponId|121|660fa2c4cd733021
261|2024-07-23T17:50:21.5570000-04:00|Change|4001B434|Heading|0.0000|PosX|100.0000|PosY|90.0000|PosZ|0.0000|Radius|4.8388|WeaponId|121|2c1326506b66965e
273|2024-07-23T17:50:21.9730000-04:00|4001B434|0197|11D8|0|0|0|34077c8ff68dcdcd
273|2024-07-23T17:50:21.9290000-04:00|4001B434|003F|79|0|0|0|9cdeafaae47fd7b0
273|2024-07-23T22:40:38.8810000-04:00|400069BE|003F|79|0|0|0|ca7e7a959e2d5e85
261|2024-07-23T22:40:38.4310000-04:00|Change|400069BE|Heading|-1.5709|PosX|110.0000|PosZ|0.0000|Radius|4.8388|WeaponId|121|51cc34ea0208a9ca
273|2024-07-23T22:40:38.9250000-04:00|400069BE|0197|11D8|0|0|0|b0ff11f42231667a
261|2024-07-23T22:40:49.7310000-04:00|Change|400069BD|Heading|1.5708|PosX|90.0000|PosY|100.0000|PosZ|0.0000|Radius|4.8388|WeaponId|121|7e40b19b89c17471
273|2024-07-23T22:40:50.0700000-04:00|400069BD|003F|79|0|0|0|68bf6b5537a42e79
273|2024-07-23T22:40:50.1140000-04:00|400069BD|0197|11D8|0|0|0|7938e49703a2dc45
273|2024-07-23T22:43:49.1130000-04:00|400069BB|003F|79|0|0|0|6e14ab7062e55ec5
261|2024-07-23T22:43:48.6940000-04:00|Change|400069BB|Heading|1.5708|PosX|90.0000|PosY|100.0000|PosZ|0.0000|Radius|4.8388|WeaponId|121|81af5fd554b052f6
273|2024-07-23T22:43:49.2030000-04:00|400069BB|0197|11D8|0|0|0|7e7f1493be89d9df
273|2024-07-26T14:54:40.9490000-04:00|40009365|003F|79|0|0|0|813dcc2a668a2c75
273|2024-07-26T14:54:40.9930000-04:00|40009365|0197|11D8|0|0|0|8f3e5a1d2628026c
261|2024-07-26T14:54:40.5450000-04:00|Change|40009365|Heading|0.0000|PosX|100.0000|PosY|90.0000|PosZ|0.0000|WeaponId|121|bc2222ba2f323fda
261|2024-07-26T14:54:44.5620000-04:00|Change|40009363|Heading|-3.1416|PosX|100.0000|PosY|110.0000|PosZ|0.0000|Radius|4.8388|WeaponId|121|a50b0ded14368cc6
273|2024-07-26T14:54:44.9130000-04:00|40009363|003F|79|0|0|0|47fba4f71ceb6db2
273|2024-07-26T14:54:45.0020000-04:00|40009363|0197|11D8|0|0|0|f0de95127e3bb199

@xiashtra xiashtra merged commit 1c00202 into OverlayPlugin:main Oct 30, 2024
11 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 30, 2024
…eaves (#483)

Valarnin recently did some work to improve the Twilight Sabbath triggers
in m4s. He discovered that we can detect the Wicked Replica cleave
directions using the ActorControlExtra log lines with the 0197
'PlayActionTimeline' category.

Do the same in m4n, replacing the check for CombatantMemory trigger.
This should be more precise and less overhead. It is also slightly less
code.

As far as I can tell, all the clones use the same 11D6 and1 11D8 values
for their left or right cleave.

Signed-off-by: Jacob Keller <[email protected]>

Signed-off-by: Jacob Keller <[email protected]> 1c00202
github-actions bot pushed a commit that referenced this pull request Oct 30, 2024
…eaves (#483)

Valarnin recently did some work to improve the Twilight Sabbath triggers
in m4s. He discovered that we can detect the Wicked Replica cleave
directions using the ActorControlExtra log lines with the 0197
'PlayActionTimeline' category.

Do the same in m4n, replacing the check for CombatantMemory trigger.
This should be more precise and less overhead. It is also slightly less
code.

As far as I can tell, all the clones use the same 11D6 and1 11D8 values
for their left or right cleave.

Signed-off-by: Jacob Keller <[email protected]>

Signed-off-by: Jacob Keller <[email protected]> 1c00202
@jacob-keller jacob-keller deleted the jk-r4n-sidewise-spark-actor-control-extra branch October 31, 2024 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
raidboss /ui/raidboss module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants