Skip to content

Commit

Permalink
feat: TESNPC, TESActorBaseData RE (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 authored Oct 9, 2023
1 parent a0c345f commit 6996d8f
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 21 deletions.
18 changes: 18 additions & 0 deletions CommonLibSF/include/RE/F/FactionRank.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#pragma once

namespace RE
{
class TESFaction;

struct FACTION_RANK // SNAM
{
public:
// members
TESFaction* faction; // 00
std::int8_t rank; // 08
std::uint8_t pad09; // 09
std::uint16_t pad0A; // 0A
std::uint32_t pad0C; // 0C
};
static_assert(sizeof(FACTION_RANK) == 0x10);
}
32 changes: 18 additions & 14 deletions CommonLibSF/include/RE/T/TESActorBaseData.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
#pragma once

#include "RE/B/BSTArray.h"
#include "RE/B/BaseFormComponent.h"
#include "RE/F/FactionRank.h"

namespace RE
{
class BGSVoiceType;
class TESActorBase;

struct alignas(0x4) ACTOR_BASE_DATA
{
enum class Flag
Expand Down Expand Up @@ -59,25 +64,24 @@ namespace RE
void InitializeDataComponent() override; // 02

// add
virtual void Unk_0B(); // 0B
virtual void CopyFromTemplateForms(TESActorBase** a_forceTemplates); // 0B
virtual void Unk_0C(); // 0C
virtual void Unk_0D(); // 0D
virtual void Unk_0E(); // 0E

// members
ACTOR_BASE_DATA actorData; // 08
std::int32_t changeFlags; // 1C
std::uint64_t unk20; // 20
std::uint64_t unk28; // 28
std::uint64_t unk30; // 30
std::uint64_t unk38; // 38
std::uint64_t unk40; // 40
std::uint64_t unk48; // 48
std::uint64_t unk50; // 50
std::uint64_t unk58; // 58
std::uint64_t unk60; // 60
std::uint32_t unk68; // 68
std::uint32_t unk6C; // 6C
ACTOR_BASE_DATA actorData; // 08
std::int32_t changeFlags; // 1C
BSTArray<FACTION_RANK> factions; // 20
TESForm** templateForms; // 30
std::uint64_t unk38; // 38
TESForm* baseTemplateForm; // 40
std::uint64_t unk48; // 48
std::uint64_t unk50; // 50
TESForm* legendTemplate; // 58
BGSVoiceType* voiceType; // 60
std::uint32_t unk68; // 68
std::uint32_t unk6C; // 6C
};
static_assert(sizeof(TESActorBaseData) == 0x70);
}
15 changes: 8 additions & 7 deletions CommonLibSF/include/RE/T/TESNPC.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace RE
class BGSHeadPart;
class BGSListForm;
class BGSOutfit;
class BGSRelationship;
class MenuOpenCloseEvent;
class TESClass;
class TESCombatStyle;
Expand All @@ -41,19 +42,19 @@ namespace RE
kTheyThem
};

struct HeadPartData
struct TintData
{
std::uint32_t type; // 00
std::uint32_t unk04; // 04
BSFixedString category; // 08
BSFixedString material; // 10
BSFixedString name; // 10
BSFixedString texturePath; // 18
Color color; // 20
std::uint32_t intensity; // 24
};
static_assert(sizeof(HeadPartData) == 0x28);
static_assert(sizeof(TintData) == 0x28);

~TESNPC() override;
~TESNPC() override; // 00

// members
BGSAttachParentArray attachParents; // 320
Expand Down Expand Up @@ -88,16 +89,16 @@ namespace RE
std::uint64_t unk408; // 408
std::uint64_t unk410; // 410
std::uint64_t unk418; // 418
BSTArray<HeadPartData> headpartData; // 420
std::uint32_t skinTone; // 430
BSTArray<TintData> tintData; // 420
std::uint32_t skinToneIndex; // 430
std::uint32_t unk434; // 434
BSFixedString teeth; // 438
BSFixedString jewelryColor; // 440
BSFixedString eyeColor; // 448
BSFixedString hairColor; // 450
BSFixedString facialColor; // 458
BSFixedString eyebrowColor; // 460
std::uint64_t unk468; // 468
BSTArray<BGSRelationship*>* relationships; // 468
BGSLocalizedString organization; // 470 - faction?
std::uint64_t unk478; // 478
stl::enumeration<PRONOUN_TYPE, std::uint8_t> pronoun; // 480
Expand Down

0 comments on commit 6996d8f

Please sign in to comment.