Use Global structs for TC packets#535
Conversation
valarnin
left a comment
There was a problem hiding this comment.
I see an open PR (ravahn/machina#38) to address some of this upstream, but that PR only updates ActorCast. Is there a reason it doesn't also address the differences in ActionEffect?
Just a request to add a comment pointing to the previous commit, as I expect to overhaul this code some time in the next few months as part of the pre-8.0 cleanup, and I don't want to lose track of the original logic.
…tHelper.cs Co-authored-by: valarnin <valarnin@gmail.com>
|
Added the commit reference comment. Regarding ActionEffect and the other structs: I did notice there may be similar TC-vs-Global differences outside ActorCast, but I’m not sure what direction upstream Machina would prefer. From my testing with the TC client, the working behavior appears to be TC opcodes + Global packet structs for this path. Setting I’m not sure whether upstream Machina would prefer TC to explicitly define separate structs that currently match Global, or to continue sharing the Global structs while only keeping TC-specific opcodes. Since I’m not familiar enough with the intended maintenance direction, I kept this PR narrow and only submitted the ActorCast fix I could verify. Happy to adjust the scope if you’d prefer this PR to cover ActionEffect or other TC packet structs too. |
Each game build needs its own opcodes and packet structs. Global, Chinese, and Korean are all now on the same game build (same build date, same opcodes). Until TC is also on the same build, that client will continue to need its own structs. As such, those structs should be updated in Machina for correctness. This OverlayPlugin PR (and FFXIV_ACT_Plugin using the Global structs for the TC region) is a workaround currently. |
Summary
Fix Traditional Chinese packet parsing by using Global packet structures with TC opcodes.
FFXIV_ACT_Plugincurrently handles Traditional Chinese packets through Global packet handlers at runtime. As a result, the effective runtime model is:Previously,
MachinaPacketHelper.csattempted to resolve a dedicated TC packet type first:When a TC-specific Machina structure exists, this can cause the helper to use the TC structure instead of the Global one. Since this does not match the packet structures used by
FFXIV_ACT_Pluginat runtime, it can lead to parsing mismatches.Change
Use the Global packet type for TC packet structure resolution:
The TC opcode values are still used as before.
Testing
Tested this change on the Traditional Chinese client. Several logs that previously failed to display now work correctly.
For example,
107logs are displayed correctly after this change.Notes
This change is intended to match the current runtime behavior of
FFXIV_ACT_Plugin.If
FFXIV_ACT_Pluginlater switches TC runtime handling to dedicated TC packet handlers and packet structures, this logic can be restored to use: