CommonLibSSE (powerof3)
BGSBodyPartData.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/A/ActorValues.h"
4 #include "RE/B/BGSBodyPartDefs.h"
5 #include "RE/B/BGSPreloadable.h"
6 #include "RE/B/BSFixedString.h"
7 #include "RE/F/FormTypes.h"
8 #include "RE/N/NiPoint3.h"
9 #include "RE/T/TESForm.h"
10 #include "RE/T/TESModel.h"
11 #include "RE/T/TESModelPSA.h"
12 
13 namespace RE
14 {
15  struct PART_DATA // BPND
16  {
17  public:
18  enum class Flag
19  {
20  kNone = 0,
21  kSeverable = 1 << 0,
22  kIKData = 1 << 1,
23  kIKData_BipedData = 1 << 2,
24  kExplodable = 1 << 3,
25  kIKData_IsHead = 1 << 4,
26  kIKData_HeadTracking = 1 << 5,
27  kToHitChance_Absolute = 1 << 6
28  };
29 
30  // members
31  float damageMult; // 00
34  std::int8_t healthPercent; // 06
36  std::int8_t toHitChance; // 08
37  std::int8_t explosionChance; // 09
38  std::int8_t explosionGenericDebrisCount; // 0A
39  std::uint8_t pad0B; // 0B
40  std::uint32_t pad0C; // 0C
43  float trackingMaxAngle; // 20
45  std::int8_t dismemberGenericDebrisCount; // 28
46  std::int8_t unk29; // 29
47  std::uint16_t unk2A; // 2A
48  std::uint32_t unk2C; // 2C
54  std::uint32_t pad5C; // 5C
57  std::int8_t dismemberDecalCount; // 70
58  std::int8_t explosionDecalCount; // 71
59  std::uint16_t pad72; // 72
61  };
62  static_assert(sizeof(PART_DATA) == 0x78);
63 
65  {
66  public:
67  // members
68  BSFixedString nodeName; // 00 - BPNN
69  BSFixedString targetName; // 08 - BPNT
71  BSFixedString partName; // 18 - BPTN
74  TESModelPSA poseMatching; // 50 - PNAM
75  PART_DATA data; // 78 - BPND
76  };
77  static_assert(sizeof(BGSBodyPart) == 0xF0);
78 
80  public TESForm, // 00
81  public TESModel, // 20
82  public BGSPreloadable // 48
83  {
84  public:
85  inline static constexpr auto RTTI = RTTI_BGSBodyPartData;
86  inline static constexpr auto VTABLE = VTABLE_BGSBodyPartData;
87  inline static constexpr auto FORMTYPE = FormType::BodyPartData;
88 
89  struct RecordFlags
90  {
91  enum RecordFlag : std::uint32_t
92  {
93  kDeleted = 1 << 5,
94  kIgnored = 1 << 12
95  };
96  };
97 
98  ~BGSBodyPartData() override; // 00
99 
100  // override (TESForm)
101  void InitializeData() override; // 04
102  void ClearData() override; // 05
103  bool Load(TESFile* a_mod) override; // 06
104  void InitItemImpl() override; // 13
105 
106  // members
107  BGSBodyPart* parts[BGSBodyPartDefs::LIMB_ENUM::kTotal]; // 50
109  };
110  static_assert(sizeof(BGSBodyPartData) == 0x88);
111 }
Definition: BGSBodyPartData.h:83
void ClearData() override
~BGSBodyPartData() override
static constexpr auto VTABLE
Definition: BGSBodyPartData.h:86
static constexpr auto FORMTYPE
Definition: BGSBodyPartData.h:87
static constexpr auto RTTI
Definition: BGSBodyPartData.h:85
BGSRagdoll * ragdoll
Definition: BGSBodyPartData.h:108
void InitItemImpl() override
void InitializeData() override
bool Load(TESFile *a_mod) override
BGSBodyPart * parts[BGSBodyPartDefs::LIMB_ENUM::kTotal]
Definition: BGSBodyPartData.h:107
Definition: BGSBodyPartData.h:65
BSFixedString targetName
Definition: BGSBodyPartData.h:69
BSFixedString hitReactionVariablePrefix
Definition: BGSBodyPartData.h:70
BSFixedString nodeName
Definition: BGSBodyPartData.h:68
BSFixedString partName
Definition: BGSBodyPartData.h:71
BSFixedString goreObjectName
Definition: BGSBodyPartData.h:72
TESModelPSA poseMatching
Definition: BGSBodyPartData.h:74
TESModel explosionSpecialDebris
Definition: BGSBodyPartData.h:73
PART_DATA data
Definition: BGSBodyPartData.h:75
Definition: BGSDebris.h:42
Definition: BGSExplosion.h:53
Definition: BGSImpactDataSet.h:13
Definition: BGSPreloadable.h:8
Definition: BGSRagdoll.h:15
Definition: NiPoint3.h:6
Definition: TESFile.h:17
Definition: TESForm.h:36
Definition: TESModelPSA.h:8
Definition: TESModel.h:16
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BGSBodyPartData(static_cast< std::uint64_t >(514002))
constexpr std::array< REL::ID, 3 > VTABLE_BGSBodyPartData
Definition: Offsets_VTABLE.h:8595
Definition: BGSBodyPartData.h:90
RecordFlag
Definition: BGSBodyPartData.h:92
@ kDeleted
Definition: BGSBodyPartData.h:93
@ kIgnored
Definition: BGSBodyPartData.h:94
Definition: BGSBodyPartData.h:16
std::int8_t toHitChance
Definition: BGSBodyPartData.h:36
Flag
Definition: BGSBodyPartData.h:19
BGSImpactDataSet * dismemberImpactDataSet
Definition: BGSBodyPartData.h:55
std::int8_t explosionGenericDebrisCount
Definition: BGSBodyPartData.h:38
REX::EnumSet< Flag, std::uint8_t > flags
Definition: BGSBodyPartData.h:32
float dismemberGenericDebrisScale
Definition: BGSBodyPartData.h:51
BGSDebris * dismemberGenericDebris
Definition: BGSBodyPartData.h:49
std::uint32_t pad0C
Definition: BGSBodyPartData.h:40
std::int8_t explosionDecalCount
Definition: BGSBodyPartData.h:58
BGSExplosion * dismemberExplosion
Definition: BGSBodyPartData.h:50
REX::EnumSet< BGSBodyPartDefs::LIMB_ENUM, std::uint8_t > type
Definition: BGSBodyPartData.h:33
float explosionGenericDebrisScale
Definition: BGSBodyPartData.h:44
std::uint32_t unk2C
Definition: BGSBodyPartData.h:48
BGSDebris * explosionGenericDebris
Definition: BGSBodyPartData.h:41
BGSExplosion * explosion
Definition: BGSBodyPartData.h:42
std::int8_t explosionChance
Definition: BGSBodyPartData.h:37
std::uint16_t unk2A
Definition: BGSBodyPartData.h:47
float explosionSpecialDebrisScale
Definition: BGSBodyPartData.h:60
std::int8_t healthPercent
Definition: BGSBodyPartData.h:34
std::uint16_t pad72
Definition: BGSBodyPartData.h:59
std::uint32_t pad5C
Definition: BGSBodyPartData.h:54
float damageMult
Definition: BGSBodyPartData.h:31
std::int8_t unk29
Definition: BGSBodyPartData.h:46
std::uint8_t pad0B
Definition: BGSBodyPartData.h:39
REX::EnumSet< ActorValue, std::uint8_t > actorValue
Definition: BGSBodyPartData.h:35
std::int8_t dismemberGenericDebrisCount
Definition: BGSBodyPartData.h:45
NiPoint3 goreRotate
Definition: BGSBodyPartData.h:53
NiPoint3 goreTranslate
Definition: BGSBodyPartData.h:52
float trackingMaxAngle
Definition: BGSBodyPartData.h:43
std::int8_t dismemberDecalCount
Definition: BGSBodyPartData.h:57
BGSImpactDataSet * explosionImpactDataSet
Definition: BGSBodyPartData.h:56