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

Some 20-line cast times are "wrong" #299

Open
xpdota opened this issue Feb 15, 2023 · 4 comments
Open

Some 20-line cast times are "wrong" #299

xpdota opened this issue Feb 15, 2023 · 4 comments

Comments

@xpdota
Copy link

xpdota commented Feb 15, 2023

Short version: Sometimes, the cast bar as seen in-game does not match up with ACT's reported cast time in 20-lines, even if the ACT value is technically correct in the sense that the server tells the client that the ability has snapshotted after the shorter time. However, on the in-game UI, the cast bar is not done yet, indicating that there's something else driving or modifying the car bar.

This has been an issue with certain fights. Here's examples I can think of off the top of my head:

  • DSR: Thordan's "Broad Swing" at the end of P2 has a slightly longer cast bar in-game than reported in the log (IDs 0x63C0 and 63C1).
  • P8S2: High Concept cast bars (0x79AC) are significantly longer than reported in the log.
  • TOP: Seems there are a few here as well. e.g. see this note in Cactbot.

Taking High Concept as an example:

Initial cast, lists 4.7 seconds as the duration. Game files list it as 5.0 seconds which is typical (damage snapshot is usually 0.3 seconds after the castbar ends):

20|2022-09-04T23:44:32.0070000+08:00|4001454C|Hephaistos|79AC|_rsv_31148|4001454C|Hephaistos|4.700|100.00|77.00|0.00|0.00|f14d42db7bac198c

That cast snapshots 5 seconds later, as expected from the 20-line. But this snapshot doesn't do anything - no statuses nor damage:

22|2022-09-04T23:44:37.0010000+08:00|4001454C|Hephaistos|79AC|_rsv_31148|1022A82E|Name Removed|1B|79AC8000|0|0|0|0|0|0|0|0|0|0|0|0|0|0|60286|107077|3800|10000|||100.91|92.36|0.00|-3.08|26836494|33218076|10000|10000|||100.00|77.00|0.00|0.00|000090FE|0|8|67cf5bff1120b1d6

But the cast bar in-game is only about halfway done at that point. The actual castbar end + damage + buffs comes about 9.5 seconds after the start of the cast, approximately when the in-game castbar finishes. The buffs come from the environment, while the damage comes from an entirely different action ID with no castbar:

26|2022-09-04T23:44:41.4550000+08:00|D12|_rsv_3346|8.00|E0000000||102FAB3E|Name Removed|00|68898||c3ea0aa2b8aad01c
22|2022-09-04T23:44:41.5000000+08:00|40014567|Hephaistos|710A|_rsv_28938|102A4B24|Name Removed|750603|984D0000|1B|710A8000|0|0|0|0|0|0|0|0|0|0|0|0|67593|67593|2800|10000|||100.42|100.85|0.00|-3.11|44|44|0|10000|||100.00|100.00|0.00|0.00|00009116|0|8|9caa6ed55e814d0f
@xpdota xpdota changed the title Some 20-line cast times are wrong Some 20-line cast times are "wrong" Feb 15, 2023
@valarnin
Copy link

https://raw.githubusercontent.com/xivapi/ffxiv-datamining/master/csv/Action.csv:

#,Name,,Icon,ActionCategory,,Animation{Start},VFX,Animation{End},ActionTimeline{Hit},,ClassJob,BehaviourType,ClassJobLevel,IsRoleAction,Range,CanTargetSelf,CanTargetParty,CanTargetFriendly,CanTargetHostile,,,TargetArea,,,,CanTargetDead,,CastType,EffectRange,XAxisModifier,,PrimaryCost{Type},PrimaryCost{Value},SecondaryCost{Type},SecondaryCost{Value},Action{Combo},PreservesCombo,Cast<100ms>,,Recast<100ms>,CooldownGroup,AdditionalCooldownGroup,MaxCharges,AttackType,Aspect,ActionProcStatus,,Status{GainSelf},UnlockLink,ClassJobCategory,,,AffectsPosition,Omen,,IsPvP,,,,,,,,,,,,IsPlayerAction
31148,"High Concept",False,405,2,0,8,24,3201,5996,0,-1,0,0,False,0,True,False,False,False,False,False,False,False,False,0,False,False,2,60,0,True,0,0,0,0,0,False,50,43,0,0,0,0,5,7,0,1,0,0,0,0,False,False,0,0,False,False,True,False,False,True,False,False,False,0,False,False,False

Specifically:

Cast<100ms>,,
50,43,

9300ms cast time, with something (maybe animation-related?) starting after the first 5000ms.

I think you'd need to verify this across a bunch of other stuff as well to be sure that it's correct, though.

@xpdota
Copy link
Author

xpdota commented Feb 15, 2023

That seems reasonable. Seems to match up with my 3 examples.

Onto implementation:

  • For player abilities, you can generally trust the server-provided cast time. Deriving it from the data files would require their SpS/SkS to be known. The damage snapshot is 0.5 seconds before the end of the castbar i.e. slidecast window. I don't know if any player abilities behave differently or would have a non-zero value in that field.
  • For enemy abilities, there's two snapshots - one at the end of the castbar, which is the "were you standing in it" snapshot, and then the damage is typically 0.3 seconds after that. The data file will report the longer duration - e.g. for a 2.7 second castbar, the damage will be applied at 3.0 seconds, and the data file lists 3.0 as the duration.

So I think the cleanest way it could be implemented is:

  1. Check if it's a player ability
  2. If not, check if it has an "extra duration" or whatever we want to call that column.
  3. If so, add that onto the cast time.

If it's in the plugin, it might make more sense as an extra field of some sort (either indicating you need to add it to the normal cast time, or just add it on the plugin side and have a field for "visual cast time"), since the "cast time" that we have right now is still potentially useful in some ways.

Of course, it could also just be left up to downstream consumers.

@Makar8000
Copy link

It's one thing to point out that the cast bar in the game UI does not match what is in the packet (like what is being reported with the TOP enrage cast), but it's a entirely different thing to mention "snapshots". I am not sure how that fits into this discussion, especially considering there is no consistent way to determine any of the types of snapshots you just brought up. It's not always related to the end of the cast bar or action exd, it's just the best rough estimate that players can use since the encounters/mechanics are usually consistent with that. Understanding snapshots gets messy especially for things with multiple hidden actors where the "real" cast is coming from OR for things like A12 where the snapshot for sacrament is nearly a second after the cast bar in the UI.

The damage snapshot is 0.5 seconds before the end of the castbar i.e. slidecast window

This is only an estimate, and is variable for every cast from the player due to ping.

one at the end of the castbar, which is the "were you standing in it" snapshot

This isn't always true

I am assuming that what you are basically suggesting/wanting, is for the cast times of actions to show the time listed in the Action EXD rather than what's in the packet. Snapshots have nothing to do with that and are technically "independent".

@xpdota
Copy link
Author

xpdota commented Feb 16, 2023

It's one thing to point out that the cast bar in the game UI does not match what is in the packet (like what is being reported with the TOP enrage cast), but it's a entirely different thing to mention "snapshots". I am not sure how that fits into this discussion, especially considering there is no consistent way to determine any of the types of snapshots you just brought up.

Bringing up snapshots is partially to provide background information, but also to clarify that the actual cast bar time seems to be the packet cast time plus the extra from the unknown column in the EXD. You want to ignore the actual "CastTime" column in favor of the server-provided time, because that would also cause it to not match the visual castbar. The CastTime column typically corresponds to the difference between the S>C cast packet and S>C snapshot packet (but not 100% of the time, e.g. player abilities).

I am assuming that what you are basically suggesting/wanting, is for the cast times of actions to show the time listed in the Action EXD rather than what's in the packet.

Sort of. As I mentioned above, it would be something like "packet cast time plus extra time from the unknown exd column".

Kind of OT now:

This is only an estimate, and is variable for every cast from the player due to ping.

I believe the discrepancy is accounted for if you consider only the S>C packets. The local client will visually start playing the cast before the server sends back the "Okay, you're casting this now" packet, which would cause it to be less than 0.5 seconds effectively.

Understanding snapshots gets messy especially for things with multiple hidden actors where the "real" cast is coming from OR for things like A12 where the snapshot for sacrament is nearly a second after the cast bar in the UI.

It depends. Many of these look something like this:

  1. Real boss starts cast bar (0.0s)
  2. Real boss finishes cast bar (2.7s)
  3. Real boss "snapshots" ability (3.0s) - 21-line with no actual effects
  4. Fake actor snapshots ability (3.Xs) - actual damage or whatever

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants