From 8fb5b495e2cd076a5eb07741f967defbe628619a Mon Sep 17 00:00:00 2001 From: Brendan Borthwick Date: Thu, 23 Nov 2023 18:17:56 -0800 Subject: [PATCH] Fix game structs for 1.8.86 --- sfse/GameFormComponents.h | 5 +- sfse/GameForms.h | 236 +++++++++++++++++++------------------- sfse/GameObjects.h | 158 ++++++++++++------------- sfse/GameReferences.h | 55 +++++---- 4 files changed, 220 insertions(+), 234 deletions(-) diff --git a/sfse/GameFormComponents.h b/sfse/GameFormComponents.h index 675185d..7fc7cb5 100644 --- a/sfse/GameFormComponents.h +++ b/sfse/GameFormComponents.h @@ -126,11 +126,8 @@ class BGSObjectPlacementDefaults : public BaseFormComponent virtual void Unk_0A(); // 0A u64 unk08; // 08 - u32 unk10; // 10 - u32 unk14; // 14 - u32 unk18; // 18 }; -static_assert(sizeof(BGSObjectPlacementDefaults) == 0x20); +static_assert(sizeof(BGSObjectPlacementDefaults) == 0x10); struct alignas(0x4) ACTOR_BASE_DATA { diff --git a/sfse/GameForms.h b/sfse/GameForms.h index 603166b..0de4a43 100644 --- a/sfse/GameForms.h +++ b/sfse/GameForms.h @@ -338,15 +338,15 @@ class TESForm : public TESFormRefCount, public BSReflection::IObject virtual void Unk_61(); // 61 // members - u64 sourceFiles; // 18 - TESFileContainer - u32 unk20; // 20 + u32 unk18; // 18 + u32 unk1C; // 1C + u32 formFlags; // 20 u32 unk24; // 24 - u32 formFlags; // 28 - u32 unk2C; // 2C - u32 formID; // 30 - u8 unk34; // 34 - also flag - u8 unk35; // 35 - u8 formType; // 36 + u32 formID; // 28 + u8 unk2C; // 2C - also flag + u8 unk2D; // 2D + u8 formType; // 2E + u8 modIndex; // 2F using _GetFormByNumericID = TESForm * (*)(u32 formId); static RelocAddr<_GetFormByNumericID> GetFormByNumericID; @@ -355,7 +355,7 @@ class TESForm : public TESFormRefCount, public BSReflection::IObject static RelocAddr<_GetFormByEditorID> GetFormByEditorID; }; static_assert(offsetof(TESForm, refCount) == 0x08); -static_assert(sizeof(TESForm) == 0x38); +static_assert(sizeof(TESForm) == 0x30); class BGSKeyword : public TESForm { @@ -377,7 +377,8 @@ class BGSListForm : public TESForm { public: - BSTArray ArrayOfForms; // 38 + BSTArray ArrayOfForms; // 30 + u64 unk40; // 40 u64 unk48; // 48 u64 unk50; // 50 u64 unk58; // 58 @@ -386,27 +387,26 @@ class BGSListForm : u64 unk70; // 70 u64 unk78; // 78 u64 unk80; // 80 - u64 unk88; // 88 }; -static_assert(sizeof(BGSListForm) == 0x90); +static_assert(sizeof(BGSListForm) == 0x88); class BGSMorphableObject : public TESForm { public: - BSFixedString unk38; // 38 - BGSMorphableObject* unk40; // 40 - Seems to point to itself? - BSFixedString performanceMaterial; // 48 - BSFixedString chargenMaterial; // 50 - BSFixedString unk58; // 58 - u32 unk60; // 60 - u32 unk64; // 64 + BSFixedString unk30; // 30 + BGSMorphableObject* unk38; // 38 - Seems to point to itself? + BSFixedString performanceMaterial; // 40 + BSFixedString chargenMaterial; // 48 + BSFixedString unk50; // 50 + u32 unk58; // 58 + u32 unk5C; // 5C }; -static_assert(sizeof(BGSMorphableObject) == 0x68); +static_assert(sizeof(BGSMorphableObject) == 0x60); class BGSHeadPart : public TESForm, - public TESFullName, // 38 - public BGSModelMaterialSwap // 48 + public TESFullName, // 30 + public BGSModelMaterialSwap // 40 { public: enum HeadPartType : s32 @@ -427,80 +427,80 @@ class BGSHeadPart : HeadPartEyelashes }; - BSFixedString unk70; // 70 - BGSHeadPart* unk78; // 78 - TESModel ChargenModel; // 80 - TESModelTri MorphsA[3]; // A0 - u8 unk100; // 100 - u8 pad101[7]; // 101 - u64 unk108; // 108 - BSTArray extraParts; // 110 - BGSMorphableObject* morph; // 120 - u64 unk128; // 128 - BGSListForm* unk130; // 130 - BSFixedString unk138; // 138 - BSFixedString unk140; // 140 - HeadPartType eType; // 148 - u32 unk14C; // 14C + BSFixedString unk68; // 68 + BGSHeadPart* unk70; // 70 + TESModel ChargenModel; // 78 + TESModelTri MorphsA[3]; // 98 + u8 unkF8; // F8 + u8 padF9[7]; // F9 + u64 unk100; // 100 + BSTArray extraParts; // 108 + BGSMorphableObject* morph; // 118 + u64 unk120; // 120 + BGSListForm* unk128; // 128 + BSFixedString unk130; // 130 + BSFixedString unk148; // 138 + HeadPartType eType; // 140 + u32 unk144; // 144 }; -static_assert(sizeof(BGSHeadPart) == 0x150); -static_assert(offsetof(BGSHeadPart, strFullName) == 0x40); -static_assert(offsetof(BGSHeadPart, cModel) == 0x50); +static_assert(sizeof(BGSHeadPart) == 0x148); +static_assert(offsetof(BGSHeadPart, strFullName) == 0x38); +static_assert(offsetof(BGSHeadPart, cModel) == 0x48); class BGSBoneModifier : public TESForm { public: virtual ~BGSBoneModifier(); - BoneModifierData* unk38; // 38 + BoneModifierData* unk30; // 30 }; -static_assert(sizeof(BGSBoneModifier) == 0x40); +static_assert(sizeof(BGSBoneModifier) == 0x38); class BGSEquipSlot : public TESForm { public: virtual ~BGSEquipSlot(); - BSFixedString unk38; // 38 - void* unk40; // 40 + BSFixedString unk30; // 30 + void* unk38; // 38 + u64 unk40; // 40 u64 unk48; // 48 u64 unk50; // 50 u64 unk58; // 58 - u64 unk60; // 60 }; -static_assert(sizeof(BGSEquipSlot) == 0x68); +static_assert(sizeof(BGSEquipSlot) == 0x60); class BGSBodyPartData : public TESForm, - public TESModel, + public TESModel, // 30 public BGSPreloadable { public: - u64 unk60[(0x130 - 0x60) >> 3]; // 60 + u64 unk58[(0x128 - 0x58) >> 3]; // 58 + BSFixedString unk128; // 128 BSFixedString unk130; // 130 BSFixedString unk138; // 138 BSFixedString unk140; // 140 BSFixedString unk148; // 148 - BSFixedString unk150; // 150 }; -static_assert(sizeof(BGSBodyPartData) == 0x158); +static_assert(sizeof(BGSBodyPartData) == 0x150); class BGSMovementType : public TESForm { public: - BSFixedString unk38; // 38 - u64 unk40[(0x140 - 0x38) >> 3]; + BSFixedString unk30; // 30 + u64 unk38[(0x140 - 0x38) >> 3]; }; -static_assert(sizeof(BGSMovementType) == 0x148); +static_assert(sizeof(BGSMovementType) == 0x140); class BGSAimAssistPoseData : public TESForm { public: + u64 unk30; // 30 u64 unk38; // 38 u64 unk40; // 40 u64 unk48; // 48 u64 unk50; // 50 - u64 unk58; // 58 }; class TESRace : @@ -516,42 +516,42 @@ class TESRace : public BGSPreloadable { public: - BSFixedString editorID; // F0 + BSFixedString editorID; // E8 + void* unkF0; // F0 void* unkF8; // F8 - void* unk100; // 100 - float unk108; // 108 + float unk100; // 100 + u32 unk104; // 104 + u32 unk108; // 108 u32 unk10C; // 10C - u32 unk110; // 110 - u32 unk114; // 114 + u64 unk110; // 110 u64 unk118; // 118 u64 unk120; // 120 u64 unk128; // 128 - u64 unk130; // 130 + u32 unk130; // 130 + u32 unk134; // 134 u32 unk138; // 138 u32 unk13C; // 13C - u32 unk140; // 140 - u32 unk144; // 144 + u64 unk140; // 140 u64 unk148; // 148 u64 unk150; // 150 u64 unk158; // 158 - u64 unk160; // 160 - BSFixedString slotNames[64]; // 168 - void* unk368[64]; // 368 - BSTHashMap slotMap; // 568 + BSFixedString slotNames[64]; // 160 + void* unk360[64]; // 360 + BSTHashMap slotMap; // 560 struct EquipSlot { BGSEquipSlot* unk00; // 00 void* unk08; // 08 }; - BSTArray unk5A0; // 5A0 + BSTArray unk598; // 598 + u64 unk5A8; // 5A8 u64 unk5B0; // 5B0 u64 unk5B8; // 5B8 - u64 unk5C0; // 5C0 - BSTArray unk5C8[2]; // 5C8 - u64 unk5E8; // 5E8 - TESModel unk5F0[4]; // 5F0 - TESModel faceBones[2]; // 670 - struct Unk6B0 + BSTArray unk5C0[2]; // 5C0 + u64 unk5E0; // 5E0 + TESModel unk5E8[4]; // 5E8 + TESModel faceBones[2]; // 668 + struct Unk6A8 { s32 unk00; float unk04; @@ -614,19 +614,19 @@ class TESRace : u32 unkF8; u32 unkFC; }; - Unk6B0 unk6B0; // 6B0 - u64 unk7B0; // 7B0 - BGSTextureModel unk7B8[2]; // 7B8 - BGSAnimationGraphComponent unk7F8[4]; // 7F8 - void* unk8F8[2]; // 8F8 - BGSBodyPartInfo bodyPartInfo; // 908 - BGSAttachParentArray attachParentA; // 930 + Unk6A8 unk6A8; // 6A8 + u64 unk7A8; // 7A8 + BGSTextureModel unk7B0[2]; // 7B0 + BGSAnimationGraphComponent unk7F0[4]; // 7F0 + void* unk8F0[2]; // 8F0 + BGSBodyPartInfo bodyPartInfo; // 900 + BGSAttachParentArray attachParentA; // 928 + u64 unk940; // 940 u64 unk948; // 948 u64 unk950; // 950 - u64 unk958; // 958 - BGSMovementType* unk960[4]; // 960 - u64 unk980; - u64 unk988; + BGSMovementType* unk958[4]; // 958 + u64 unk978; // 978 + u64 unk980; // 980 using FaceSliderID = u32; using FaceMorphID = u32; @@ -667,55 +667,53 @@ class TESRace : void* unk140; // 140 BSFixedString unk148; // 148 }; - ChargenData* chargenData[2]; // 990 - u64 unk9A0; // 9A0 - BSFixedString handMaterials[2]; // 9A8 - BSFixedString skinMaterials[2]; // 9B8 - BSFixedString unk9C8[2]; // 9C8 - BSTArray unk9D8[2]; // 9D8 - struct Unk9F8 + ChargenData* chargenData[2]; // 988 + u64 unk998; // 998 + BSFixedString handMaterials[2]; // 9A0 + BSFixedString skinMaterials[2]; // 9B0 + BSFixedString unk9C0[2]; // 9C0 + BSTArray headParts[2]; // 9D0 + struct Unk9F0 { void* unk00[2]; }; - Unk9F8 unk9F8[2]; - BSFixedString unkA18; + Unk9F0 unk9F0[2]; + BSFixedString unkA10; }; -static_assert(offsetof(TESRace, unk368) == 0x368); +static_assert(offsetof(TESRace, unk360) == 0x360); static_assert(offsetof(TESRace, unk5C0) == 0x5C0); static_assert(offsetof(TESRace, unk5E8) == 0x5E8); -static_assert(offsetof(TESRace, unk5F0) == 0x5F0); -static_assert(offsetof(TESRace::Unk6B0, unk80) == 0x80); -static_assert(offsetof(TESRace, unk6B0) == 0x6B0); -static_assert(offsetof(TESRace, unk7B8) == 0x7B8); -static_assert(offsetof(TESRace, unk7F8) == 0x7F8); -static_assert(offsetof(TESRace, unk8F8) == 0x8F8); -static_assert(offsetof(TESRace, bodyPartInfo) == 0x908); -static_assert(offsetof(TESRace, attachParentA) == 0x930); -static_assert(offsetof(TESRace, unk948) == 0x948); -static_assert(offsetof(TESRace, unk9D8) == 0x9D8); -static_assert(offsetof(TESRace, unk9F8) == 0x9F8); -static_assert(offsetof(TESRace, unkA18) == 0xA18); -static_assert(sizeof(TESRace::Unk6B0) == 0x100); -static_assert(sizeof(TESRace::Unk6B0) == 0x100); +static_assert(offsetof(TESRace::Unk6A8, unk80) == 0x80); +static_assert(offsetof(TESRace, unk6A8) == 0x6A8); +static_assert(offsetof(TESRace, unk7B0) == 0x7B0); +static_assert(offsetof(TESRace, unk7F0) == 0x7F0); +static_assert(offsetof(TESRace, unk8F0) == 0x8F0); +static_assert(offsetof(TESRace, bodyPartInfo) == 0x900); +static_assert(offsetof(TESRace, attachParentA) == 0x928); +static_assert(offsetof(TESRace, unk940) == 0x940); +static_assert(offsetof(TESRace, headParts) == 0x9D0); +static_assert(offsetof(TESRace, unk9F0) == 0x9F0); +static_assert(offsetof(TESRace, unkA10) == 0xA10); +static_assert(sizeof(TESRace::Unk6A8) == 0x100); static_assert(sizeof(TESRace::ChargenData::FaceMorphData) == 0x68); static_assert(sizeof(TESRace::ChargenData) == 0x150); -static_assert(sizeof(TESRace) == 0xA20); +static_assert(sizeof(TESRace) == 0xA18); class BGSAVMData : public TESForm { public: - BSFixedString editorName; // 38 - BGSAVMData* unk40; // 40 - Points to itself? + BSFixedString editorName; // 30 + BGSAVMData* unk38; // 38 - Points to itself? enum Type { SIMPLE, COMPLEX, MODULATION }; - u64 type; // 48 - BSFixedString name; // 50 - BSFixedString name2; // 58 + u64 type; // 40 + BSFixedString name; // 48 + BSFixedString name2; // 50 struct Entry { BSFixedString name; @@ -727,9 +725,9 @@ class BGSAVMData : public TESForm Color color; u32 unk14; }; - Entry* entryBegin; // 60 - Entry* entryEnd; // 68 - Entry* unk70; // 70 - Why are there 2 end pointers? - u64 unk78; // 78 + Entry* entryBegin; // 58 + Entry* entryEnd; // 60 + Entry* unk68; // 68 - Why are there 2 end pointers? + u64 unk70; // 70 }; -static_assert(sizeof(BGSAVMData) == 0x80); \ No newline at end of file +static_assert(sizeof(BGSAVMData) == 0x78); \ No newline at end of file diff --git a/sfse/GameObjects.h b/sfse/GameObjects.h index 76fd0fb..1f8bb19 100644 --- a/sfse/GameObjects.h +++ b/sfse/GameObjects.h @@ -24,6 +24,8 @@ class TESObject : public TESForm virtual void Unk_69(); // 69 virtual void Unk_6A(); // 6A virtual void Unk_6B(); // 6B + + BGSSnapTemplateComponent snapTemplate; // 30 }; class TESBoundObject : public TESObject @@ -50,19 +52,17 @@ class TESBoundObject : public TESObject virtual void Unk_7E(); // 7E virtual void Unk_7F(); // 7F - BGSSnapTemplateComponent snapTemplate; // 38 - u64 unk50; // 50 - u32 unk58; // 58 - u32 unk5C; // 5C - u64 unk60; // 60 - BGSMod::Template::Items templateItems; // 68 - BGSPreviewTransform previewTransform; // 88 - BGSObjectPlacementDefaults placementDefaults; // D0 + NiPoint3 boundMin; // 48 + NiPoint3 boundMax; // 54 + BGSMod::Template::Items templateItems; // 60 + BGSPreviewTransform previewTransform; // 80 + BGSObjectPlacementDefaults placementDefaults; // C8 + u32 unkD8; // D8 }; -static_assert(offsetof(TESBoundObject, templateItems) == 0x68); -static_assert(offsetof(TESBoundObject, previewTransform) == 0x88); -static_assert(offsetof(TESBoundObject, placementDefaults) == 0xD0); -static_assert(sizeof(TESBoundObject) == 0xF0); +static_assert(offsetof(TESBoundObject, templateItems) == 0x60); +static_assert(offsetof(TESBoundObject, previewTransform) == 0x80); +static_assert(offsetof(TESBoundObject, placementDefaults) == 0xC8); +static_assert(sizeof(TESBoundObject) == 0xE0); class TESBoundAnimObject : public TESBoundObject { @@ -71,29 +71,23 @@ class TESBoundAnimObject : public TESBoundObject virtual void Unk_80(); // 80 virtual void Unk_81(); // 81 - - u64 unkF0; // F0 - u64 unkF8; // F8 - u64 unk100; // 100 - u64 unk108; // 108 - u64 unk110; // 110 }; -static_assert(sizeof(TESBoundAnimObject) == 0x118); +static_assert(sizeof(TESBoundAnimObject) == 0xE0); class TESActorBase : public TESBoundAnimObject, - public TESActorBaseData, // 118 - public TESContainer, // 188 - public TESSpellList, // 1A0 - public TESAIForm, // 1B8 - public TESFullName, // 1F8 - public ActorValueOwner, // 208 - public BGSDestructibleObjectForm, // 210 - public BGSSkinForm, // 220 - public BGSKeywordForm, // 230 - public BGSAttackDataForm, // 260 - public BGSPerkRankArray, // 270 - public BGSPropertySheet // 288 + public TESActorBaseData, // E0 + public TESContainer, // 150 + public TESSpellList, // 168 + public TESAIForm, // 180 + public TESFullName, // 1C0 + public ActorValueOwner, // 1D0 + public BGSDestructibleObjectForm, // 1D8 + public BGSSkinForm, // 1E8 + public BGSKeywordForm, // 1F8 + public BGSAttackDataForm, // 200 + public BGSPerkRankArray, // 228 + public BGSPropertySheet // 238 { public: virtual void Unk_82(); // 82 @@ -104,11 +98,11 @@ class TESActorBase : class TESNPC : public TESActorBase, - public TESRaceForm, // 298 - public BGSOverridePackCollection, // 2A8 - public BGSForcedLocRefType, // 2F0 - public BGSNativeTerminalForm, // 308 - public BSTEventSink // 318 + public TESRaceForm, // 250 + public BGSOverridePackCollection, // 260 + public BGSForcedLocRefType, // 270 + public BGSNativeTerminalForm, // 2B8 + public BSTEventSink // 2D0 { public: class InstanceData : public TBO_InstanceData @@ -117,38 +111,38 @@ class TESNPC : u64 unk10[(0x158 - 0x10) >> 3]; }; - BGSAttachParentArray AttachParents; // 320 + BGSAttachParentArray AttachParents; // 2E8 + u64 unk300; // 300 + u32 unk308; // 308 + u32 unk30C; // 30C + TESClass* pCl; // 310 + u64 unk318; // 318 + u64 unk320; // 320 + TESCombatStyle* pCombatStyle; // 328 + u32 unk330; // 330 + u32 unk334; // 334 u64 unk338; // 338 - u32 unk340; // 340 - u32 unk344; // 344 - TESClass* pCl; // 348 - u64 unk350; // 350 - u64 unk358; // 358 - TESCombatStyle* pCombatStyle; // 360 - u32 unk368; // 368 - u32 unk36C; // 36C - u64 unk370; // 370 - TESNPC* pFaceNPC; // 378 - NiPoint3 MorphWeight; // 380 - float fHeight; // 38C - float fHeightMax; // 390 - u32 unk394; // 394 - u64 unk398; // 398 - u64 unk3A0; // 3A0 - u64 unk3A8; // 3A8 - BSFixedString unk3B0; // 3B0 - u64 unk3B8; // 3B8 - u64 unk3C0; // 3C0 - BGSOutfit* pDefOutfit; // 3C8 - BGSOutfit* pSleepOutfit; // 3D0 - BGSListForm* pDefaultPackList; // 3D8 - TESFaction* pCrimeFaction; // 3E0 - u64 unk3F8; // 3E8 - BSTArray HeadPartsA; // 3F0 - u64 unk400; // 400 - BSTArray* unk408; // 408 -- 5 floats entries? - BSTHashMap2* AdditionalSliders; // 410 - BSTHashMap*>* unk418; // 418 + TESNPC* pFaceNPC; // 340 + NiPoint3 MorphWeight; // 348 + float fHeight; // 354 + float fHeightMax; // 358 + u32 unk35C; // 35C + u64 unk360; // 360 + u64 unk368; // 368 + u64 unk370; // 370 + BSFixedString unk378; // 378 + u64 unk380; // 380 + u64 unk388; // 388 + BGSOutfit* pDefOutfit; // 390 + BGSOutfit* pSleepOutfit; // 398 + BGSListForm* pDefaultPackList; // 3A0 + TESFaction* pCrimeFaction; // 3A8 + u64 unk3B0; // 3B0 + BSTArray HeadPartsA; // 3B8 + u64 unk3C8; // 3C8 + BSTArray* unk3D0; // 3D0 -- 5 floats entries? + BSTHashMap2* AdditionalSliders; // 3D8 + BSTHashMap*>* unk3E0; // 3E0 struct HeadPartData { u32 type; // 00 1 - Mask? @@ -163,24 +157,24 @@ class TESNPC : Color color; // 20 u32 intensity; // 24 up to 128 for some reason replaces alpha, color.a does nothing? }; - BSTArray HeadPartDataA; // 420 - u32 skinTone; // 430 - u32 unk434; // 434 - BSFixedString teeth; // 438 - BSFixedString jewelryColor; // 440 - BSFixedString eyeColor; // 448 - BSFixedString hairColor; // 450 - BSFixedString facialHairColor; // 458 - BSFixedString eyebrowColor; // 460 - u64 unk468; // 468 - BSFixedString unk470; // 470 - BSTHashMap* shapeBlendData; // 478 - ShapeBlendData Map - u8 pronoun; // 480 - u8 pad481[7]; // 481 + BSTArray HeadPartDataA; // 3E0 + u32 skinTone; // 3F8 + u32 unk3FC; // 3FC + BSFixedString teeth; // 400 + BSFixedString jewelryColor; // 408 + BSFixedString eyeColor; // 410 + BSFixedString hairColor; // 418 + BSFixedString facialHairColor; // 420 + BSFixedString eyebrowColor; // 428 + u64 unk468; // 430 + BSFixedString unk438; // 438 + BSTHashMap* shapeBlendData; // 440 - ShapeBlendData Map + u8 pronoun; // 448 + u8 pad449[7]; // 449 DEFINE_MEMBER_FN_1(DeriveGeneticParentAppearance, void, 0x01B2DBE8, TESNPC* source); DEFINE_MEMBER_FN_1(CopyAppearance, void, 0x01B2C020, TESNPC* source); }; -static_assert(sizeof(TESNPC) == 0x488); +static_assert(sizeof(TESNPC) == 0x450); static_assert(sizeof(TESNPC::HeadPartData) == 0x28); static_assert(sizeof(TESNPC::InstanceData) == 0x158); diff --git a/sfse/GameReferences.h b/sfse/GameReferences.h index 1425fb3..4c5fa3f 100644 --- a/sfse/GameReferences.h +++ b/sfse/GameReferences.h @@ -224,40 +224,37 @@ class TESObjectREFR : public TESForm virtual void Unk_12F(); // 12F // the following should be inherited when decoded properly - void* BSTransformDeltaEvent; // 38 - void* IMovementProcessMessageInterface; // 40 - void* IPostAnimationChannelUpdateFunctor; // 48 - void* BSAnimationGraphEvent; // 50 - void* BGSInventoryListEvent; // 58 - void* IAnimationGraphManagerHolder; // 60 - void* IKeywordFormBase; // 68 - void* ActorValueOwner; // 70 - void* ActorValueChangedEvent; // 78 + void* BSTransformDeltaEvent; // 30 + void* IMovementProcessMessageInterface; // 38 + void* IPostAnimationChannelUpdateFunctor; // 40 + void* BSAnimationGraphEvent; // 48 + void* BGSInventoryListEvent; // 50 + void* IAnimationGraphManagerHolder; // 58 + void* IKeywordFormBase; // 60 + void* ActorValueOwner; // 68 + void* ActorValueChangedEvent; // 70 // members - u32 unk80; // 80 - u32 unk84; // 84 - u64 unk88; // 88 - u64 unk90; // 90 - u32 unk98; // 98 - u8 pad9C[4]; // 9C - OBJ_REFR data; // A0 - u64 unkD0; // D0 - u64 unkD8; // D8 - TESObjectCELL* parentCell; // E0 - void* loadedData; // E8 - u64 unkF0; // F0 - u64 extraDataList; // F8 - u64 unk100; // 100 - u16 scale; // 108 - u8 unk10A; // 10A - u8 unk10B; // 10B + u64 unk78; // 78 + OBJ_REFR data; // 80 + u64 unkB0; // B0 + u64 unkB8; // B8 + TESObjectCELL* parentCell; // C0 + void* loadedData; // C8 + u64 unkF0; // D0 + u64 extraDataList; // D8 + u16 scale; // E0 + u8 unkE2; // E2 + u8 flags; // E3 DEFINE_MEMBER_FN_0(IsInSpaceship, bool, 0x02B4B594) DEFINE_MEMBER_FN_0(IsInSpace, bool, 0x01A140A8) DEFINE_MEMBER_FN_1(HasKeyword, bool, 0x0139F778, BGSKeyword*); }; -static_assert(sizeof(TESObjectREFR) == 0x110); +static_assert(offsetof(TESObjectREFR, data) == 0x80); +static_assert(offsetof(TESObjectREFR, parentCell) == 0xC0); +static_assert(offsetof(TESObjectREFR, scale) == 0xE0); +static_assert(sizeof(TESObjectREFR) == 0xF0); class Actor : public TESObjectREFR { @@ -387,8 +384,8 @@ class Actor : public TESObjectREFR DEFINE_MEMBER_FN_0(UpdateChargenAppearance, void, 0x0231F9D8); DEFINE_MEMBER_FN_1(SetSkinTone, void, 0x0231F650, u32 skinToneIndex); - u64 unk110[(0x260 - 0x110) >> 3]; // 110 - void* unk260; // 260 + u64 unkF0[(0x240 - 0xF0) >> 3]; // F0 + void* unk240; // 240 }; class MenuActor : public Actor