Document JobGauge padding, private cached fields, and two previously-missing fields#1756
Closed
RoseOfficial wants to merge 22 commits intoaers:mainfrom
Closed
Document JobGauge padding, private cached fields, and two previously-missing fields#1756RoseOfficial wants to merge 22 commits intoaers:mainfrom
RoseOfficial wants to merge 22 commits intoaers:mainfrom
Conversation
Secondary vtable moved from 0x1420F68D8 to 0x1420F6008 in current binary, confirmed via constructor xrefs in FishingEventHandler_ctor and FishingEventHandler_Create.
Init() caches an action sheet row pointer for Between the Lines (Action 7419) at gauge+0x20, following the same pattern as RedMageGauge's action row pointers.
All vtable overrides exhaustively checked; neither range is read by any gauge function.
Only BeastGauge at 0x08 is packet-sourced; remaining bytes are never touched by any vtable function.
0x09 falls within a DWORD packet copy, 0x0D within a WORD copy; neither is read by any vtable function. 0x0E-0x0F not packet-sourced.
0x09 within DWORD packet copy, 0x0D within WORD copy; neither read by any vtable function. 0x0E-0x0F not packet-sourced.
0x0D falls within a WORD packet copy but is never read by any vtable function. 0x0E-0x0F not packet-sourced.
Packet copy only reaches 0x0E (StepIndex); 0x0F is never written or read by any vtable function.
Within bulk QWORD copy range; never read by any vtable function.
0x08-0x09 within DWORD packet copy, never read. 0x0E-0x0F not packet-sourced, never read by any vtable function.
0x0D within WORD packet copy, never read. 0x0E-0x0F not packet-sourced, never read by any vtable function.
0x0D within WORD packet copy, never read. 0x0E-0x0F not packet-sourced, never read by any vtable function.
0x09 within DWORD packet copy, 0x0D within WORD copy; neither read by any vtable function. 0x0E-0x0F not packet-sourced.
0x09 and 0x0B within DWORD packet copy, never read. 0x0D-0x0F not packet-sourced, never read by any vtable function.
Both ranges are zeroed by ChangeGauge and never written or read by any vtable function. Confirmed via vtable analysis and ChangeGauge zeroing pattern.
Add AstrologianSpell enum for the ActiveSpell field at 0x0E (values 1/2/3 correspond to Fall Malefic, Aspected Benefic, Gravity II; read by the action upgrade resolver). Document all confirmed padding bytes. Mark struct complete.
All vtable overrides confirmed: Init writes DWORD to 0x08-0x0B and WORD to 0x0C-0x0D then caches one action row at 0x20. Tick only touches 0x08-0x09. vf10 reads only 0x0A and 0x0D. vf11 reads no gauge fields. Nothing writes to 0x0E-0x0F, 0x10-0x1F, or 0x28-0x2F. Struct is fully mapped.
Collaborator
|
So a few points:
With all that in mind come back to this when you stop using AI for most of your job. |
Author
|
The two public fields (NinjutsuActivated and ActiveSpell) are real findings regardless of your other objections. Happy to resubmit those cleanly if you're open to it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Exhaustive vtable analysis of all 21
JobGaugesubclasses. For each gauge, every overridden vtable function was inspected to determine which bytes are read or written. Bytes that are confirmed to never be accessed by any override are documented as padding. Additionally, several previously-undocumented fields have been named and typed.Methodology
For each gauge:
Init,Tick, andReceivePacketValueswere checked to establish which bytes are packet-sourced vs. client-computed vs. untouched.ProcessDeferredReplaceActionwas confirmed as a safe skip — it does not read gauge fields in any gauge.JobGaugeManager::ChangeGaugewas analyzed to confirm exact zeroing ranges per gauge, providing additional corroboration of struct data sizes.Changes
New public fields
NinjaGauge.NinjutsuActivated(0x0C,byte)Previously noted as an unknown with a commented-out stub. Confirmed by analysis:
Initzeroes this byte;ReceivePacketValuesnever writes it; it is set to1locally when a mudra sequence is in progress (confirmed viaProcessDeferredReplaceAction). This is a client-local flag, not server-sourced.AstrologianGauge.ActiveSpell(0x0E,AstrologianSpell)A previously undocumented server-sourced byte at 0x0E.
ReceivePacketValuescopies a QWORD covering 0x08–0x0F from the packet;vf6(the action upgrade resolver) reads this byte and maps values 1/2/3 to action rows for Fall Malefic (29246), Aspected Benefic (29247), and Gravity II (29248). A newAstrologianSpell : byteenum has been added toJobGaugeEnums.csfor the three values.New private cached fields
These fields are written only by
Init(usingsub_14080B560for action sheet row lookups or direct computation) and are never exposed to consumers. They are documented asprivateto make struct layout explicit and to prevent future confusion about "unknown" gaps.BlackMageGauge._betweenTheLinesRow(0x20,nint)Action sheet row pointer for Between the Lines (Action 7419), cached by
Init. Used byvf10andvf11for action upgrade and cost resolution.ReaperGauge._regressRangeSquared(0x20,float)Precomputed
Action.Range²for Regress (Action 24403), cached byInit. Allows external code to perform squared-distance comparisons without a square root.AstrologianGauge._retrogradeRangeSquared(0x20,float)Same pattern as Reaper — precomputed
Action.Range²for Retrograde (Action 41507), cached byInit.RedMageGauge._enchantedRiposteRowthrough_enchantedRipostePvPRow(0x10–0x48, 8×nint)Eight action sheet row pointers cached by
Initfor PrimaryCostValue lookups on the eight enchanted actions (7527, 7528, 7529, 7530, 16528, 29685, 29688, 41488). These explain the large gap betweenManaStacksat 0x0A and the end of the struct.Padding documentation
// offset: paddingcomments added to every gauge where gap bytes are confirmed. Each comment reflects the specific reason the bytes are padding: