CommonLibSSE NG
Loading...
Searching...
No Matches
TESRace.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/A/ActorValues.h"
8#include "RE/B/BGSSkinForm.h"
10#include "RE/B/BSFixedString.h"
11#include "RE/B/BSTArray.h"
12#include "RE/B/BipedObjects.h"
13#include "RE/F/FormTypes.h"
14#include "RE/N/NiPoint3.h"
15#include "RE/S/Sexes.h"
16#include "RE/T/TESDescription.h"
17#include "RE/T/TESForm.h"
18#include "RE/T/TESFullName.h"
19#include "RE/T/TESModel.h"
20#include "RE/T/TESSpellList.h"
21#include "RE/T/TESTexture.h"
22
23namespace RE
24{
25 class AttackAnimationArrayMap;
26
27 namespace BSResource
28 {
29 struct ID;
30 }
31
32 enum class RACE_SIZE
33 {
34 kSmall = 0,
35 kMedium = 1,
36 kLarge = 2,
37 kExtraLarge = 3
38 };
39
40 struct RACE_DATA
41 {
42 public:
43 enum
44 {
46 };
47
48 enum class Flag
49 {
50 kNone = 0,
51 kPlayable = 1 << 0,
52 kFaceGenHead = 1 << 1,
53 kChild = 1 << 2,
54 kTiltFrontBack = 1 << 3,
55 kTiltLeftRight = 1 << 4,
56 kNoShadow = 1 << 5,
57 kSwims = 1 << 6,
58 kFlies = 1 << 7,
59 kWalks = 1 << 8,
60 kImmobile = 1 << 9,
61 kNotPushable = 1 << 10,
62 kNoCombatInWater = 1 << 11,
63 kNoRotatingToHeadTrack = 1 << 12,
64 kDontShowBloodSpray = 1 << 13,
65 kDontShowBloodDecal = 1 << 14,
66 kUseHeadTrackAnims = 1 << 15,
69 kAllowRagdollCollision = 1 << 18,
70 kRegenHPInCombat = 1 << 19,
71 kCantOpenDoors = 1 << 20,
72 kAllowPCDialogue = 1 << 21,
73 kNoKnockdowns = 1 << 22,
74 kAllowPickpocket = 1 << 23,
76 kDontShowWeaponBlood = 1 << 25,
77 kOverlayHeadPartList = 1 << 26,
78 kOverrideHeadPartList = 1 << 27,
79 kCanPickupItems = 1 << 28,
81 kCanDualWield = 1 << 30,
82 kAvoidsRoads = 1 << 31,
83 };
84
85 enum class Flag2
86 {
87 kNone = 0,
88 kUseAdvancedAvoidance = 1 << 0,
89 kNonHostile = 1 << 1,
90 kAllowMountedCombat = 1 << 4
91 };
92
94 {
95 public:
96 // members
98 std::uint8_t bonus; // 1
99 };
100 static_assert(sizeof(SkillBoost) == 0x2);
101
102 // members
104 std::uint16_t pad0E; // 0E
105 float height[SEXES::kTotal]; // 10
106 float weight[SEXES::kTotal]; // 18
108 float startingHealth; // 24
109 float startingMagicka; // 28
110 float startingStamina; // 2C
111 float baseCarryWeight; // 30
112 float baseMass; // 34
113 float accelerate; // 38
114 float decelerate; // 3C
120 float healthRegen; // 54
121 float magickaRegen; // 58
122 float staminaRegen; // 5C
123 float unarmedDamage; // 60
124 float unarmedReach; // 64
126 float aimAngleTolerance; // 6C
127 float flightRadius; // 70
128 float angleAccelerate; // 74
129 float angleTolerance; // 78
134 };
135 static_assert(sizeof(RACE_DATA) == 0xA4);
136
137 class TESRace :
138 public TESForm, // 000
139 public TESFullName, // 020
140 public TESDescription, // 030
141 public TESSpellList, // 040
142 public BGSSkinForm, // 050
143 public BGSBipedObjectForm, // 060
144 public BGSKeywordForm, // 070
145 public BGSAttackDataForm // 088
146 {
147 public:
148 inline static constexpr auto RTTI = RTTI_TESRace;
149 inline static constexpr auto VTABLE = VTABLE_TESRace;
150 inline static constexpr auto FORMTYPE = FormType::Race;
151
152 enum class EquipmentFlag
153 {
154 kNone = 0,
155 kHandToHandMelee = 1 << 0,
156 kOneHandSword = 1 << 1,
157 kOneHandDagger = 1 << 2,
158 kOneHandAxe = 1 << 3,
159 kOneHandMace = 1 << 4,
160 kTwoHandSword = 1 << 5,
161 kTwoHandAxe = 1 << 6,
162 kBow = 1 << 7,
163 kStaff = 1 << 8,
164 kSpell = 1 << 9,
165 kShield = 1 << 10,
166 kTorch = 1 << 11,
167 kCrossbow = 1 << 12
168 };
169
171 {
172 enum RecordFlag : std::uint32_t
173 {
174 kDeleted = 1 << 5,
175 kIgnored = 1 << 12,
176 kCritter = 1 << 19 // ?
177 };
178 };
179
181 {
182 enum
183 {
184 kWalk = 0,
190 kTotal
191 };
192 };
193
195 {
196 enum
197 {
198 kNose = 0,
202
204 };
205
206 struct Morph
207 {
208 public:
209 // members
210 std::uint32_t morphFlags; // 00
211 std::uint32_t unk04; // 04
212 std::uint32_t unk08; // 08
213 std::uint32_t unk0C; // 0C
214 std::uint32_t unk10; // 10
215 std::uint32_t unk14; // 14
216 std::uint32_t unk18; // 18
217 std::uint32_t unk1C; // 1C
218 };
219 static_assert(sizeof(Morph) == 0x20);
220
222 {
223 public:
225 {
226 public:
227 enum class SkinTone
228 {
229 kNone = 0,
230 kLipColor = 1,
231 kCheekColor = 2,
232 kEyeliner = 3,
233 kEyeSocketUpper = 4,
234 kEyeSocketLower = 5,
235 kSkinTone = 6,
236 kPaint = 7,
237 kLaughLines = 8,
239 kNose = 10,
240 kChin = 11,
241 kNeck = 12,
242 kForehead = 13,
243 kDirt = 14,
244 };
245
246 // members
247 std::uint16_t index; // 00 - TINI
249 std::uint8_t pad03; // 03
250 std::uint32_t pad04; // 04
251 TESTexture file; // 08 - TINT
253 };
254 static_assert(sizeof(TintLayer) == 0x20);
255
256 struct Presets
257 {
258 public:
259 // members
263 };
264 static_assert(sizeof(Presets) == 0x48);
265
266 // members
269 };
270 static_assert(sizeof(TintAsset) == 0x68);
271
272 // members
274 std::uint32_t numFlagsSet[kNumVariants]; // 80
278 BSTArray<TESNPC*>* presetNPCs; // A8 - RPRM / RPRF
282 };
283 static_assert(sizeof(FaceRelatedData) == 0xC8);
284
285 struct UnkData
286 {
287 public:
288 // members
290 std::uint32_t numUnkHashes1; // 08
291 std::uint32_t pad0C; // 0C
292 std::uint32_t numUnkHashes2; // 10
293 std::uint32_t pad14; // 14
294 };
295 static_assert(sizeof(UnkData) == 0x18);
296
297 ~TESRace() override; // 00
298
299 // override (TESForm)
300 void InitializeData() override; // 04
301 void ClearData() override; // 05
302 bool Load(TESFile* a_mod) override; // 06
303 void InitItemImpl() override; // 13
304 bool GetPlayable() const override; // 19
305 const char* GetFormEditorID() const override; // 32 - { return formEditorID.c_str(); }
306 bool SetFormEditorID(const char* a_str) override; // 33 - { formEditorID = a_str; }
307
308 [[nodiscard]] bool AllowsPCDialogue() const;
309 [[nodiscard]] bool AllowsPickpocket() const;
310 [[nodiscard]] bool IsChildRace() const;
311
312 // members
313 TESModel skeletonModels[SEXES::kTotal]; // 098 - ANAM
315 float clampFaceGeoValue; // 18C - PNAM
316 float clampFaceGeoValue2; // 18C - UNAM
317 std::uint32_t pad194; // 194
318 BGSTextureModel bodyTextureModels[SEXES::kTotal]; // 198
322 BGSVoiceType* defaultVoiceTypes[SEXES::kTotal]; // 258 - VTCK
324 TESObjectARMO* decapitateArmors[SEXES::kTotal]; // 270 - DNAM
327 std::uint64_t unk2B0; // 2B0
328 std::uint64_t unk2B8; // 2B8
329 std::uint64_t unk2C0; // 2C0
330 std::uint64_t unk2C8; // 2C8
338 BSFixedString bipedObjectNameA[BIPED_OBJECTS::kEditorTotal]; // 310 - NAME
341 std::uint32_t unk42C; // 42C - TESModel::unk24
343 TESRace* morphRace; // 438 - NAM8
344 TESRace* armorParentRace; // 440 - RNAM
347 BGSMovementType* baseMoveTypes[MovementTypes::kTotal]; // 478 - WKMV / RNMV / WMMV / FLMV / SNMV / SPMV
348 FaceRelatedData* faceRelatedData[SEXES::kTotal]; // 4A8
349 };
350 static_assert(sizeof(TESRace) == 0x4B8);
351}
Definition AttackAnimationArrayMap.h:13
Definition BGSArtObject.h:12
Definition BGSAttackDataForm.h:11
Definition BGSBehaviorGraphModel.h:8
Definition BGSBipedObjectForm.h:61
Definition BGSBodyPartData.h:83
Definition BGSColorForm.h:13
Definition BGSEquipSlot.h:10
Definition BGSImpactDataSet.h:13
Definition BGSKeywordForm.h:12
Definition BGSMaterialType.h:12
Definition BGSMovementType.h:11
Definition BGSSkinForm.h:10
Definition BGSSoundDescriptorForm.h:14
Definition BGSTextureModel.h:8
Definition BGSTextureSet.h:16
Definition BGSVoiceType.h:25
Definition BSTArray.h:377
Definition NiPoint3.h:6
Definition TESDescription.h:12
Definition TESFile.h:15
Definition TESForm.h:35
Definition TESFullName.h:9
Definition TESModel.h:16
Definition TESObjectARMO.h:37
Definition TESRace.h:146
std::uint64_t unk2B8
Definition TESRace.h:328
AttackAnimationArrayMap * attackAnimationArrayMap[SEXES::kTotal]
Definition TESRace.h:331
~TESRace() override
FaceRelatedData * faceRelatedData[SEXES::kTotal]
Definition TESRace.h:348
BGSArtObject * dismemberBlood
Definition TESRace.h:335
BSFixedString behaviorGraphProjectNames[SEXES::kTotal]
Definition TESRace.h:321
TESObjectARMO * decapitateArmors[SEXES::kTotal]
Definition TESRace.h:324
std::uint32_t unk42C
Definition TESRace.h:341
bool SetFormEditorID(const char *a_str) override
bool GetPlayable() const override
BSTArray< BSFixedString > phonemeTargets
Definition TESRace.h:346
std::uint64_t unk2C8
Definition TESRace.h:330
bool AllowsPickpocket() const
static constexpr auto FORMTYPE
Definition TESRace.h:150
BSTArray< BGSEquipSlot * > equipSlots
Definition TESRace.h:339
BGSBodyPartData * bodyPartData
Definition TESRace.h:323
BSFixedString bipedObjectNameA[BIPED_OBJECTS::kEditorTotal]
Definition TESRace.h:338
bool AllowsPCDialogue() const
float clampFaceGeoValue
Definition TESRace.h:315
std::uint64_t unk2C0
Definition TESRace.h:329
BGSVoiceType * defaultVoiceTypes[SEXES::kTotal]
Definition TESRace.h:322
bool Load(TESFile *a_mod) override
EquipmentFlag
Definition TESRace.h:153
const char * GetFormEditorID() const override
TESRace * armorParentRace
Definition TESRace.h:344
UnkData unk448
Definition TESRace.h:345
std::uint32_t pad194
Definition TESRace.h:317
bool IsChildRace() const
UnkData unk280
Definition TESRace.h:325
void ClearData() override
void InitializeData() override
BGSMaterialType * bloodImpactMaterial
Definition TESRace.h:333
BGSSoundDescriptorForm * corpseCloseSound
Definition TESRace.h:337
TESRace * morphRace
Definition TESRace.h:343
float clampFaceGeoValue2
Definition TESRace.h:316
BGSMovementType * baseMoveTypes[MovementTypes::kTotal]
Definition TESRace.h:347
BGSSoundDescriptorForm * corpseOpenSound
Definition TESRace.h:336
static constexpr auto VTABLE
Definition TESRace.h:149
stl::enumeration< EquipmentFlag, std::uint32_t > validEquipTypes
Definition TESRace.h:340
BGSTextureModel bodyTextureModels[SEXES::kTotal]
Definition TESRace.h:318
BSFixedString formEditorID
Definition TESRace.h:332
RACE_DATA data
Definition TESRace.h:314
std::uint64_t unk2B0
Definition TESRace.h:327
BGSBehaviorGraphModel behaviorGraphs[SEXES::kTotal]
Definition TESRace.h:319
BGSEquipSlot * unarmedEquipSlot
Definition TESRace.h:342
static constexpr auto RTTI
Definition TESRace.h:148
void InitItemImpl() override
BGSImpactDataSet * impactDataSet
Definition TESRace.h:334
TESModel skeletonModels[SEXES::kTotal]
Definition TESRace.h:313
UnkData unk298
Definition TESRace.h:326
BSFixedString rootBehaviorGraphNames[SEXES::kTotal]
Definition TESRace.h:320
Definition TESSpellList.h:13
Definition TESTexture.h:10
Definition PCH.h:223
Definition AbsorbEffect.h:6
constexpr REL::VariantID RTTI_TESRace(513954, 392612, 0x1edba20)
constexpr std::array< REL::VariantID, 8 > VTABLE_TESRace
Definition Offsets_VTABLE.h:946
RACE_SIZE
Definition TESRace.h:33
Definition ID.h:10
Definition TESRace.h:94
stl::enumeration< ActorValue, std::uint8_t > skill
Definition TESRace.h:97
std::uint8_t bonus
Definition TESRace.h:98
Definition TESRace.h:41
stl::enumeration< BIPED_OBJECT, std::uint32_t > bodyObject
Definition TESRace.h:125
float accelerate
Definition TESRace.h:113
Flag
Definition TESRace.h:49
NiPoint3 mountCameraOffset
Definition TESRace.h:133
float injuredHealthPercent
Definition TESRace.h:118
@ kNumSkillBoosts
Definition TESRace.h:45
float startingStamina
Definition TESRace.h:110
float baseMass
Definition TESRace.h:112
float height[SEXES::kTotal]
Definition TESRace.h:105
float angleTolerance
Definition TESRace.h:129
float unarmedReach
Definition TESRace.h:124
SkillBoost skillBoosts[kNumSkillBoosts]
Definition TESRace.h:103
float weight[SEXES::kTotal]
Definition TESRace.h:106
float startingMagicka
Definition TESRace.h:109
NiPoint3 dismountOffset
Definition TESRace.h:132
stl::enumeration< Flag2, std::uint32_t > flags2
Definition TESRace.h:130
stl::enumeration< RACE_SIZE, std::uint32_t > raceSize
Definition TESRace.h:115
stl::enumeration< BIPED_OBJECT, std::uint32_t > headObject
Definition TESRace.h:116
stl::enumeration< BIPED_OBJECT, std::uint32_t > shieldObject
Definition TESRace.h:119
float unarmedDamage
Definition TESRace.h:123
float baseCarryWeight
Definition TESRace.h:111
float staminaRegen
Definition TESRace.h:122
float startingHealth
Definition TESRace.h:108
NiPoint3 mountOffset
Definition TESRace.h:131
float aimAngleTolerance
Definition TESRace.h:126
stl::enumeration< BIPED_OBJECT, std::uint32_t > hairObject
Definition TESRace.h:117
float flightRadius
Definition TESRace.h:127
float healthRegen
Definition TESRace.h:120
stl::enumeration< Flag, std::uint32_t > flags
Definition TESRace.h:107
float angleAccelerate
Definition TESRace.h:128
float magickaRegen
Definition TESRace.h:121
Flag2
Definition TESRace.h:86
float decelerate
Definition TESRace.h:114
std::uint16_t pad0E
Definition TESRace.h:104
Definition TESRace.h:181
@ kWalk
Definition TESRace.h:184
@ kSprint
Definition TESRace.h:189
@ kRun
Definition TESRace.h:185
@ kTotal
Definition TESRace.h:190
@ kSneak
Definition TESRace.h:188
@ kFly
Definition TESRace.h:187
@ kSwim
Definition TESRace.h:186
Definition TESRace.h:171
RecordFlag
Definition TESRace.h:173
@ kCritter
Definition TESRace.h:176
@ kDeleted
Definition TESRace.h:174
@ kIgnored
Definition TESRace.h:175
Definition TESRace.h:286
std::uint32_t pad0C
Definition TESRace.h:291
std::uint32_t numUnkHashes2
Definition TESRace.h:292
BSResource::ID ** unkHashes
Definition TESRace.h:289
std::uint32_t numUnkHashes1
Definition TESRace.h:290
std::uint32_t pad14
Definition TESRace.h:293