From 88bd46a12c654037130ffdd6846b9b8ca8eb01ef Mon Sep 17 00:00:00 2001 From: aers Date: Wed, 25 Jun 2025 02:00:59 -0700 Subject: [PATCH 1/9] Update BoneSimulator.cs --- .../FFXIV/Client/Graphics/Physics/BoneSimulator.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/FFXIVClientStructs/FFXIV/Client/Graphics/Physics/BoneSimulator.cs b/FFXIVClientStructs/FFXIV/Client/Graphics/Physics/BoneSimulator.cs index 9dec15f4f1..dac0a4cd9d 100644 --- a/FFXIVClientStructs/FFXIV/Client/Graphics/Physics/BoneSimulator.cs +++ b/FFXIVClientStructs/FFXIV/Client/Graphics/Physics/BoneSimulator.cs @@ -11,11 +11,20 @@ public unsafe struct BoneSimulator { [FieldOffset(0x20)] public Vector3 CharacterPosition; [FieldOffset(0x30)] public Vector3 Gravity; [FieldOffset(0x40)] public Vector3 Wind; + // The following two values are derived from the PhysicsGroup sheet if applicable to the object. + // They are hardcoded to roughly 1/60 (0.016666668) and 60 (59.999996) in cases where the sheet isn't used. + [FieldOffset(0x50)] public float SimulationTime; + [FieldOffset(0x54)] public float SimulationTimeInv; // 1/SimulationTime + [Obsolete("Use SimulationTimeInv instead")] [FieldOffset(0x54)] public float Spring; // Default is ~60, intense jitter happens above that value. Lesser values remove the spring in the bone. [FieldOffset(0xF6)] public bool IsStarted; // Flag that is set to true when the simulator starts, and is quickly reset [FieldOffset(0xF7)] public bool IsStopped; // Same as Start, but when the simulator is requested to stop [FieldOffset(0xF8)] public bool IsReset; // When set to true, resets the bone simulator + [FieldOffset(0x444)] public bool IsSimulating; + [FieldOffset(0x445)] public bool IsTimeIntegrating; // Whether the simulator is integrating (time stepping) on this frame + [FieldOffset(0x446)] public bool IsCollidable; + /// Non-exhaustive list of physics groups public enum PhysicsGroup : uint { Clothing = 2, From 6e4d1c47af22ae09283966cffee831fdad9cac1b Mon Sep 17 00:00:00 2001 From: Haselnussbomber Date: Wed, 25 Jun 2025 13:03:49 +0200 Subject: [PATCH 2/9] Add AtkComponentBase.GetComponentType --- FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentBase.cs | 3 +++ ida/data.yml | 1 + 2 files changed, 4 insertions(+) diff --git a/FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentBase.cs b/FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentBase.cs index 19dd91aff0..65b97815d9 100644 --- a/FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentBase.cs +++ b/FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentBase.cs @@ -21,6 +21,9 @@ public unsafe partial struct AtkComponentBase : ICreatable { [MemberFunction("48 8D 05 ?? ?? ?? ?? C7 81 ?? ?? ?? ?? ?? ?? ?? ?? 48 89 01 33 C0 48 89 41 08")] public partial void Ctor(); + [MemberFunction("E8 ?? ?? ?? ?? 83 F8 0E 75 2B")] + public partial ComponentType GetComponentType(); + [MemberFunction("E8 ?? ?? ?? ?? 8B 53 F8")] public partial AtkResNode* GetNodeById(uint id); diff --git a/ida/data.yml b/ida/data.yml index 8d6ebda9f9..8291823a51 100644 --- a/ida/data.yml +++ b/ida/data.yml @@ -7233,6 +7233,7 @@ classes: funcs: 0x14064A920: ctor 0x14064ABA0: GetOwnerNodePosition + 0x14064AC90: GetComponentType 0x14064AEC0: GetNodeById 0x14064AF20: GetComponentById 0x14064AFD0: GetComponentIconTextById From 96b753fa419ff5ba5bc0011431cc69900443a58b Mon Sep 17 00:00:00 2001 From: Haselnussbomber Date: Wed, 25 Jun 2025 13:04:23 +0200 Subject: [PATCH 3/9] Add AtkTextInputEventInterface.GetOwnerNode --- FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs | 5 ++++- ida/data.yml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs b/FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs index e6a7f93179..6e768a32e9 100644 --- a/FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs +++ b/FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs @@ -25,5 +25,8 @@ public unsafe partial struct AtkTextInput { [GenerateInterop(true)] [VirtualTable("48 89 86 ?? ?? ?? ?? 48 8D 05 ?? ?? ?? ?? 48 89 86 ?? ?? ?? ?? E8 ?? ?? ?? ?? 40 F6 C5 01", 10, 5)] [StructLayout(LayoutKind.Explicit, Size = 0x8)] - public unsafe partial struct AtkTextInputEventInterface; + public unsafe partial struct AtkTextInputEventInterface { + [VirtualFunction(4)] + public partial AtkResNode* GetOwnerNode(); + } } diff --git a/ida/data.yml b/ida/data.yml index 8291823a51..346ecf29ce 100644 --- a/ida/data.yml +++ b/ida/data.yml @@ -901,6 +901,7 @@ classes: - ea: 0x142039CA0 vfuncs: 0: Dtor + 4: GetOwnerNode Component::GUI::AtkGrid: vtbls: - ea: 0x1420396F0 From 9dc4e2a8b7bfc2992b021d25551c779e0403a2be Mon Sep 17 00:00:00 2001 From: Haselnussbomber Date: Wed, 25 Jun 2025 13:04:30 +0200 Subject: [PATCH 4/9] Update CompletionModule --- .../FFXIV/Component/Completion/CompletionModule.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FFXIVClientStructs/FFXIV/Component/Completion/CompletionModule.cs b/FFXIVClientStructs/FFXIV/Component/Completion/CompletionModule.cs index d36012da4b..d1f0721323 100644 --- a/FFXIVClientStructs/FFXIV/Component/Completion/CompletionModule.cs +++ b/FFXIVClientStructs/FFXIV/Component/Completion/CompletionModule.cs @@ -16,6 +16,8 @@ namespace FFXIVClientStructs.FFXIV.Component.Completion; public unsafe partial struct CompletionModule { [FieldOffset(0x18)] public ExcelModuleInterface* ExcelModuleInterface; [FieldOffset(0x20)] public RaptureTextModule* RaptureTextModule; + [FieldOffset(0x28)] private bool Unk28; + [FieldOffset(0x29)] private byte Unk29; [FieldOffset(0x30)] public StdVector> CategoryData; [FieldOffset(0x48)] public StdVector CategoryNames; @@ -29,8 +31,8 @@ public unsafe partial struct CompletionModule { [FieldOffset(0x278)] public StdVector CompanionNames; [FieldOffset(0x290)] public StdVector SheetNames; - [FieldOffset(0x2A8)] private Utf8String Unk2A8; - [FieldOffset(0x310)] private Utf8String Unk310; + [FieldOffset(0x2A8)] public Utf8String OpenIconMacro; + [FieldOffset(0x310)] public Utf8String CloseIconMacro; [MemberFunction("E8 ?? ?? ?? ?? 48 8B 1B 41 FF C7"), GenerateStringOverloads] public partial void AddCompletionEntry(long groupIndex, uint rowId, CStringPointer itemText, CStringPointer groupTitle, ushort itemKey); From 12651634bd4f83f6f3668d6253c8a1be844e8a58 Mon Sep 17 00:00:00 2001 From: Haselnussbomber Date: Wed, 25 Jun 2025 15:18:53 +0200 Subject: [PATCH 5/9] Expose more UIModule fields Everything that's not in UIModuleInterface --- FFXIVClientStructs/FFXIV/Client/UI/UIModule.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/FFXIVClientStructs/FFXIV/Client/UI/UIModule.cs b/FFXIVClientStructs/FFXIV/Client/UI/UIModule.cs index 9ceb6572d6..8724d77d72 100644 --- a/FFXIVClientStructs/FFXIV/Client/UI/UIModule.cs +++ b/FFXIVClientStructs/FFXIV/Client/UI/UIModule.cs @@ -34,9 +34,9 @@ public unsafe partial struct UIModule { [FieldOffset(0x7F4)] public uint FrameCount; [FieldOffset(0x7F8)] internal ExcelModuleInterface* ExcelModuleInterface; // this is Component::Excel::ExcelModuleInterface, not Common::Component::Excel::ExcelModuleInterface! [FieldOffset(0x800)] internal RaptureTextModule RaptureTextModule; - [FieldOffset(0x1668)] internal CompletionModule CompletionModule; + [FieldOffset(0x1668)] public CompletionModule CompletionModule; [FieldOffset(0x19E0)] internal RaptureLogModule RaptureLogModule; - [FieldOffset(0x60B0)] internal UserFileManager UserFileManager; + [FieldOffset(0x60B0)] public UserFileManager UserFileManager; [FieldOffset(0x60D0)] internal RaptureMacroModule RaptureMacroModule; [FieldOffset(0x57B80)] internal RaptureHotbarModule RaptureHotbarModule; [FieldOffset(0x80910)] internal RaptureGearsetModule RaptureGearsetModule; @@ -105,19 +105,19 @@ public unsafe partial struct UIModule { [FieldOffset(0xC8490)] internal RaptureAtkModule RaptureAtkModule; [FieldOffset(0xF2098)] internal InfoModule InfoModule; [FieldOffset(0xF3D10)] internal UIModuleHelpers UIModuleHelpers; - [FieldOffset(0xF3D48)] internal Utf8String AddonSheetName; + [FieldOffset(0xF3D48)] public Utf8String AddonSheetName; - [FieldOffset(0xF3DB8)] internal Utf8String UIColorSheetName; + [FieldOffset(0xF3DB8)] public Utf8String UIColorSheetName; - [FieldOffset(0xF3E30)] internal Utf8String CompletionSheetName; - [FieldOffset(0xF3E98)] internal Utf8String CompletionOpenIconMacro; - [FieldOffset(0xF3F00)] internal Utf8String CompletionCloseIconMacro; - [FieldOffset(0xF3F68)] internal Utf8String NewLineMacro; + [FieldOffset(0xF3E30)] public Utf8String CompletionSheetName; + [FieldOffset(0xF3E98)] public Utf8String CompletionOpenIconMacro; + [FieldOffset(0xF3F00)] public Utf8String CompletionCloseIconMacro; + [FieldOffset(0xF3F68)] public Utf8String NewLineMacro; [FieldOffset(0xF3FD0)] public Utf8String LastTalkName; [FieldOffset(0xF4038)] public Utf8String LastTalkText; [FieldOffset(0xF40A0)] internal UIInputData UIInputData; [FieldOffset(0xF4AD0)] internal UIInputModule UIInputModule; - // [FieldOffset(0xF4BC0)] internal Vf79Struct; + // [FieldOffset(0xF4BC0)] public Vf79Struct; [MemberFunction("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC 20 48 8B F2 48 8B F9 45 84 C9")] public partial void ProcessChatBoxEntry(Utf8String* message, nint a4 = 0, bool saveToHistory = false); From 2353106e3443ecf145eb3b20ced897ac434ce27d Mon Sep 17 00:00:00 2001 From: Haselnussbomber Date: Wed, 25 Jun 2025 15:22:02 +0200 Subject: [PATCH 6/9] Update AtkTextInput, CompletionModule --- .../FFXIV/Component/Completion/CompletionModule.cs | 3 +++ .../FFXIV/Component/GUI/AtkComponentTextInput.cs | 2 +- FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs | 9 ++++++++- ida/data.yml | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/FFXIVClientStructs/FFXIV/Component/Completion/CompletionModule.cs b/FFXIVClientStructs/FFXIV/Component/Completion/CompletionModule.cs index d1f0721323..95b15b4995 100644 --- a/FFXIVClientStructs/FFXIV/Component/Completion/CompletionModule.cs +++ b/FFXIVClientStructs/FFXIV/Component/Completion/CompletionModule.cs @@ -43,6 +43,9 @@ public unsafe partial struct CompletionModule { [MemberFunction("E8 ?? ?? ?? ?? 48 8D 8D ?? ?? ?? ?? E8 ?? ?? ?? ?? 4C 8B 6C 24 ??")] public partial void ClearCompletionData(); + [MemberFunction("E8 ?? ?? ?? ?? 49 8D 8E ?? ?? ?? ?? 0F 28 CE")] + public partial void Update(Utf8String* completionSheetName, Utf8String* openIconMacro, Utf8String* closeIconMacro, nint a5); + [VirtualFunction(5)] public partial int GetSelection(CategoryData.CompletionDataStruct* dataStructs, int index, Utf8String* outputString, Utf8String* outputDisplayString); diff --git a/FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentTextInput.cs b/FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentTextInput.cs index d34285d666..6ef7de954c 100644 --- a/FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentTextInput.cs +++ b/FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentTextInput.cs @@ -21,7 +21,7 @@ public unsafe partial struct AtkComponentTextInput : ICreatable { [FieldOffset(0x1F0)] public AtkUldComponentDataTextInput ComponentTextData; [FieldOffset(0x250), Obsolete("Use ComponentTextData.MaxByte instead")] public uint MaxTextLength; [FieldOffset(0x254), Obsolete("Use ComponentTextData.MaxChar instead")] public uint MaxTextLength2; - [FieldOffset(0x26C)] public ushort InputSanitizationFlags; // passed to SanitizeString + [FieldOffset(0x26C)] public ushort InputSanitizationFlags; // passed to SanitizeString // TODO: change type to AllowedEntities [FieldOffset(0x280)] public Utf8String UnkText01; [FieldOffset(0x2E8)] public Utf8String UnkText02; diff --git a/FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs b/FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs index 6e768a32e9..00a70f6cc6 100644 --- a/FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs +++ b/FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs @@ -18,7 +18,14 @@ public unsafe partial struct AtkTextInput { [FieldOffset(0x1C0)] public ClipBoard ClipboardData; [FieldOffset(0x298)] public Utf8String CopyBufferRaw; [FieldOffset(0x300)] public Utf8String CopyBufferFiltered; - [FieldOffset(0xBF0)] public uint CompletionDepth; + + [FieldOffset(0xBF0)] public uint CompletionDepth; // TODO: should be (u)short + + [FieldOffset(0xC10)] public AllowedEntities InputSanitizationFlags; + + /// Call this only if has Payloads! + [MemberFunction("E8 ?? ?? ?? ?? E9 ?? ?? ?? ?? 48 8B 4E 18 48 8B 01")] + public partial void OpenCompletion(); // Component::GUI::AtkTextInput::AtkTextInputEventInterface // no explicit constructor, just an event interface diff --git a/ida/data.yml b/ida/data.yml index 346ecf29ce..1904025772 100644 --- a/ida/data.yml +++ b/ida/data.yml @@ -911,6 +911,7 @@ classes: base: Client::System::Input::TextServiceInterface::TextServiceEvent funcs: 0x1406459C0: ctor + 0x140649690: OpenCompletion Component::Text::TextChecker::ExecNonMacroFunc: vtbls: - ea: 0x142009010 From 8a8532edfdeed7e520c5a58b0935461cd75b5650 Mon Sep 17 00:00:00 2001 From: Haselnussbomber Date: Wed, 25 Jun 2025 16:49:32 +0200 Subject: [PATCH 7/9] Update AtkTextInput, AtkComponentInputBase --- .../FFXIV/Component/GUI/AtkComponentInputBase.cs | 3 +++ FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentInputBase.cs b/FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentInputBase.cs index 858107b9d2..cd9df538ac 100644 --- a/FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentInputBase.cs +++ b/FFXIVClientStructs/FFXIV/Component/GUI/AtkComponentInputBase.cs @@ -16,4 +16,7 @@ public unsafe partial struct AtkComponentInputBase { [FieldOffset(0x148)] public Utf8String UnkText2; [FieldOffset(0x1B0)] public AtkUnitBase* ContainingAddon; [FieldOffset(0x1D0)] public AtkUldComponentDataInputBase InputDataBase; + [FieldOffset(0x1C4)] public int SelectionStart; + [FieldOffset(0x1C8)] public int SelectionEnd; + [FieldOffset(0x1CC)] public int CursorPos; } diff --git a/FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs b/FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs index 00a70f6cc6..3df64a46bd 100644 --- a/FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs +++ b/FFXIVClientStructs/FFXIV/Component/GUI/AtkTextInput.cs @@ -3,6 +3,7 @@ using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Client.UI.Misc; using FFXIVClientStructs.FFXIV.Component.Completion; +using FFXIVClientStructs.FFXIV.Component.Text; namespace FFXIVClientStructs.FFXIV.Component.GUI; @@ -14,7 +15,14 @@ public unsafe partial struct AtkTextInput { [FieldOffset(0x18)] public TextService* TextService; [FieldOffset(0x20), FixedSizeArray] internal FixedSizeArray19> _atkHistory; [FieldOffset(0xC0)] public RaptureTextModule* RaptureTextModule; + [FieldOffset(0xC8)] public TextChecker* TextChecker; [FieldOffset(0xD0)] public AtkFontCodeModule* AtkFontCodeModule; + + [FieldOffset(0xDA)] public short CursorPos; + [FieldOffset(0xDC)] public short TextLength; + [FieldOffset(0xDE)] public short SelectionEnd; + [FieldOffset(0xE0)] public short SelectionStart; + [FieldOffset(0x1C0)] public ClipBoard ClipboardData; [FieldOffset(0x298)] public Utf8String CopyBufferRaw; [FieldOffset(0x300)] public Utf8String CopyBufferFiltered; From 3ab23cec3e79068be06f3c145f8d8c91db5123f3 Mon Sep 17 00:00:00 2001 From: pohky Date: Wed, 25 Jun 2025 19:01:52 +0200 Subject: [PATCH 8/9] Merge pull request #1464 from Haselnussbomber/update-componentbase-textinput Update AtkComponentBase, AtkTextInputEventInterface From 42e396868cc07cf107d0efa717ad1e1fad15d7d1 Mon Sep 17 00:00:00 2001 From: pohky Date: Wed, 25 Jun 2025 20:21:58 +0200 Subject: [PATCH 9/9] Update data.yml --- ida/data.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ida/data.yml b/ida/data.yml index 1904025772..e87b9a46b3 100644 --- a/ida/data.yml +++ b/ida/data.yml @@ -911,7 +911,7 @@ classes: base: Client::System::Input::TextServiceInterface::TextServiceEvent funcs: 0x1406459C0: ctor - 0x140649690: OpenCompletion + 0x1406497C0: OpenCompletion Component::Text::TextChecker::ExecNonMacroFunc: vtbls: - ea: 0x142009010