From 9e5128012f66a96f5ef640c523c485107ead1d1c Mon Sep 17 00:00:00 2001 From: qudix <17361645+qudix@users.noreply.github.com> Date: Tue, 22 Oct 2024 13:50:42 -0500 Subject: [PATCH] fix: `TESNPC` (#291) - the inheritance offset markers are probably wrong, but that doesn't really matter right now. --- include/RE/T/TESActorBase.h | 24 ++++----- include/RE/T/TESActorBaseData.h | 21 ++++---- include/RE/T/TESNPC.h | 93 ++++++++++++++++----------------- 3 files changed, 69 insertions(+), 69 deletions(-) diff --git a/include/RE/T/TESActorBase.h b/include/RE/T/TESActorBase.h index 2c3345a6..d1dd40b0 100644 --- a/include/RE/T/TESActorBase.h +++ b/include/RE/T/TESActorBase.h @@ -21,17 +21,17 @@ namespace RE class TESActorBase : public TESBoundAnimObject, // 000 public TESActorBaseData, // 0E0 - 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, // 228 - public BGSPerkRankArray, // 238 - public BGSPropertySheet // 250 + public TESContainer, // 168 + public TESSpellList, // 180 + public TESAIForm, // 198 + public TESFullName, // 1D8 + public ActorValueOwner, // 1E0 + public BGSDestructibleObjectForm, // 1F0 + public BGSSkinForm, // 200 + public BGSKeywordForm, // 218 + public BGSAttackDataForm, // 240 + public BGSPerkRankArray, // 250 + public BGSPropertySheet // 268 { public: SF_RTTI_VTABLE(TESActorBase); @@ -44,5 +44,5 @@ namespace RE virtual void SetCombatStyle(TESCombatStyle*); // 84 virtual TESForm* GetAsForm(); // 85 }; - static_assert(sizeof(TESActorBase) == 0x268); + static_assert(sizeof(TESActorBase) == 0x270); } diff --git a/include/RE/T/TESActorBaseData.h b/include/RE/T/TESActorBaseData.h index 4a925621..f13aa825 100644 --- a/include/RE/T/TESActorBaseData.h +++ b/include/RE/T/TESActorBaseData.h @@ -112,15 +112,16 @@ namespace RE ACTOR_BASE_DATA actorData; // 08 std::int32_t changeFlags; // 1C BSTArray factions; // 20 - TESForm** templateForms; // 30 - TESForm** unk38; // 38 - TESForm* baseTemplateForm; // 40 - TESLevItem* deathItem; // 48 - TESGlobal* legendChance; // 50 - TESForm* legendTemplate; // 58 - BGSVoiceType* voiceType; // 60 - std::uint32_t unk68; // 68 - std::uint32_t unk6C; // 6C + std::uint64_t pad30; // 30 + TESForm** templateForms; // 38 + TESForm** unk40; // 40 + TESForm* baseTemplateForm; // 48 + TESLevItem* deathItem; // 50 + TESGlobal* legendChance; // 58 + TESForm* legendTemplate; // 60 + BGSVoiceType* voiceType; // 68 + std::uint32_t unk70; // 70 + std::uint32_t unk74; // 74 }; - static_assert(sizeof(TESActorBaseData) == 0x70); + static_assert(sizeof(TESActorBaseData) == 0x78); } diff --git a/include/RE/T/TESNPC.h b/include/RE/T/TESNPC.h index 16f5577c..c9a5862d 100644 --- a/include/RE/T/TESNPC.h +++ b/include/RE/T/TESNPC.h @@ -29,11 +29,11 @@ namespace RE class TESNPC : public TESActorBase, // 000 - public TESRaceForm, // 260 - public BGSOverridePackCollection, // 270 - public BGSForcedLocRefType, // 2B8 - public BGSNativeTerminalForm, // 2D0 - public BSTEventSink // 2E0 + public TESRaceForm, // 278 + public BGSOverridePackCollection, // 288 + public BGSForcedLocRefType, // 2D0 + public BGSNativeTerminalForm, // 2E8 + public BSTEventSink // 2F8 { public: SF_RTTI_VTABLE(TESNPC); @@ -108,49 +108,48 @@ namespace RE } // members - BGSAttachParentArray attachParents; // 2E8 - std::uint32_t unk308; // 308 - std::uint32_t unk30C; // 30C - TESClass* npcClass; // 310 - std::uint64_t unk318; // 318 - BGSListForm* giftFilter; // 320 - TESCombatStyle* combatStyle; // 328 - std::uint32_t fileOffset; // 330 - std::uint32_t unk334; // 334 - TESRace* originalRace; // 338 - TESNPC* faceNPC; // 340 - MorphWeight morphWeight; // 348 - float height; // 354 - float heightMax; // 358 - std::uint32_t unk35C; // 35C - TESNPC* unk360; // 360 - std::uint64_t unk368; // 368 + BGSAttachParentArray attachParents; // 2F8 + std::uint32_t unk318; // 318 + std::uint32_t unk31C; // 31C + TESClass* npcClass; // 320 + BGSListForm* giftFilter; // 328 + TESCombatStyle* combatStyle; // 330 + std::uint32_t fileOffset; // 338 + std::uint32_t unk33C; // 33C + TESRace* originalRace; // 340 + TESNPC* faceNPC; // 348 + MorphWeight morphWeight; // 350 + float height; // 35C + float heightMax; // 360 + std::uint32_t unk364; // 364 + TESNPC* unk368; // 368 std::uint64_t unk370; // 370 - BGSLocalizedString shortName; // 378 - TESObjectARMO* farSkin; // 380 - TESFurniture* powerArmorFurn; // 388 - BGSOutfit* defaultOutfit; // 390 - BGSOutfit* sleepOutfit; // 398 - BGSListForm* defaultPackList; // 3A0 - TESFaction* crimeFaction; // 3A8 - TESFaction* unk3B0; // 3B0 - BSGuarded, BSNonReentrantSpinLock> headParts; // 3B8 - BSTArray* unk3D0; // 3D0 - BSTHashMap2* unk3D8; // 3D8 - BSTHashMap*>* unk3E0; // 3E0 - BSTArray tintAVMData; // 3E8 - std::uint32_t skinToneIndex; // 3F8 - std::uint32_t unk3FC; // 3FC - BSFixedString teeth; // 400 - BSFixedString jewelryColor; // 408 - BSFixedString eyeColor; // 410 - BSFixedString hairColor; // 418 - BSFixedString facialColor; // 420 - BSFixedString eyebrowColor; // 428 - BSTArray* relationships; // 430 - BGSLocalizedString organization; // 438 - faction? - BSTHashMap* shapeBlendData; // 440 - REX::Enum pronoun; // 448 + std::uint64_t unk378; // 378 + BGSLocalizedString shortName; // 380 + TESObjectARMO* farSkin; // 388 + TESFurniture* powerArmorFurn; // 390 + BGSOutfit* defaultOutfit; // 398 + BGSOutfit* sleepOutfit; // 3A0 + BGSListForm* defaultPackList; // 3A8 + TESFaction* crimeFaction; // 3B0 + TESFaction* unk3B8; // 3B8 + BSGuarded, BSNonReentrantSpinLock> headParts; // 3C0 + BSTArray* unk3D8; // 3D8 + BSTHashMap2* unk3E0; // 3E0 + BSTHashMap*>* unk3E8; // 3E8 + BSTArray tintAVMData; // 3F0 + std::uint32_t skinToneIndex; // 400 + std::uint32_t unk404; // 404 + BSFixedString teeth; // 408 + BSFixedString jewelryColor; // 410 + BSFixedString eyeColor; // 418 + BSFixedString hairColor; // 420 + BSFixedString facialColor; // 428 + BSFixedString eyebrowColor; // 430 + BSTArray* relationships; // 438 + BGSLocalizedString organization; // 440 - faction? + BSTHashMap* shapeBlendData; // 448 + REX::Enum pronoun; // 450 }; static_assert(sizeof(TESNPC) == 0x458); }