CommonLibSSE (powerof3)
TESForm.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSAtomic.h"
4 #include "RE/B/BSCoreTypes.h"
5 #include "RE/B/BSFixedString.h"
6 #include "RE/B/BSTArray.h"
7 #include "RE/B/BSTHashMap.h"
9 #include "RE/F/FormTypes.h"
10 #include "RE/T/TESFile.h"
11 
12 namespace RE
13 {
14  class BGSLoadFormBuffer;
15  class BGSSaveFormBuffer;
16  class TESBoundObject;
17  class TESFile;
18  struct FORM;
19  struct FORM_GROUP;
20 
21  class TESFileArray : public BSStaticArray<TESFile*>
22  {
23  public:
24  };
25  static_assert(sizeof(TESFileArray) == 0x10);
26 
28  {
29  public:
30  // members
32  };
33  static_assert(sizeof(TESFileContainer) == 0x8);
34 
35  class TESForm : public BaseFormComponent
36  {
37  public:
38  inline static constexpr auto RTTI = RTTI_TESForm;
39  inline static constexpr auto VTABLE = VTABLE_TESForm;
40  inline static constexpr auto FORMTYPE = FormType::None;
41 
42  struct ChangeFlags
43  {
44  enum ChangeFlag : std::uint32_t
45  {
46  kCreated = 0,
47  kFlags = 1 << 0
48  };
49  };
50 
51  struct RecordFlags
52  {
53  enum RecordFlag : std::uint32_t
54  {
55  kDestructible = 1 << 0,
56  kMaster = 1 << 0,
57  kUnlocked = 1 << 0,
58 
59  kAltered = 1 << 1,
60  kPlayable = 1 << 2,
61  kInitialized = 1 << 3,
62  kNonOccluder = 1 << 4,
63  kDeleted = 1 << 5,
64 
65  kBorderRegion = 1 << 6,
66  kGlobalConstant = 1 << 6,
67  kHasSpokenFlag = 1 << 6,
68  kKnown = 1 << 6,
70 
71  kFireOff = 1 << 7,
72  kMustUpdate = 1 << 8,
73  kOnLocalMap = 1 << 9,
74  kPersistent = 1 << 10,
75 
76  kDisabled = 1 << 11,
78 
79  kIgnored = 1 << 12,
80 
81  kEmpty = 1 << 13,
82  kResetDestruction = 1 << 13,
83 
84  kTemporary = 1 << 14,
86  kRandomAnim = 1 << 16,
87  kDangerous = 1 << 17,
88  kHasCurrents = 1 << 19,
90  kStillLoading = 1 << 21,
91  kFormRetainsID = 1 << 22,
92  kDestroyed = 1 << 23,
93 
94  kUnk24 = 1 << 24,
95 
96  kNoAIAcquire = 1 << 25,
97  kObstacle = 1 << 25,
98 
100  kDisableFade = 1 << 27,
101 
103  kShowOnWorldMap = 1 << 28,
104 
105  kChildCanUse = 1 << 29
106  };
107  };
108 
109  enum class InGameFormFlag
110  {
111  kNone = 0,
112  kWantsDelete = 1 << 0,
113  kForcedPersistent = 1 << 1,
114  kNoFavorAllowed = 1 << 4,
115  kIsSkyObject = 1 << 5,
116  kRefOriginalPersistent = 1 << 6,
117  kRefPermanentlyDeleted = 1 << 7
118  };
119 
120  ~TESForm() override; // 00
121 
122  // override (BaseFormComponent)
123  void InitializeDataComponent() override; // 01 - { return; }
124  void ClearDataComponent() override; // 02 - { SetEditorID(""); }
125  void CopyComponent(BaseFormComponent* a_rhs) override; // 03
126 
127  // add
128  virtual void InitializeData(); // 04 - { return; }
129  virtual void ClearData(); // 05 - { return; }
130  virtual bool Load(TESFile* a_mod); // 06 - { return true; }
131  virtual bool LoadPartial(TESFile* a_mod); // 07 - { return true; }
132  virtual bool LoadEdit(TESFile* a_mod); // 08 - { return Load(a_mod); }
133  virtual TESForm* CreateDuplicateForm(bool a_createEditorID, void* a_arg2); // 09
134  virtual bool AddChange(std::uint32_t a_changeFlags); // 0A
135  virtual void RemoveChange(std::uint32_t a_changeFlags); // 0B
136  virtual bool FindInFileFast(TESFile* a_mod); // 0C - { return false; }
137  virtual bool CheckSaveGame(BGSSaveFormBuffer* a_buf); // 0D - { return true; }
138  virtual void SaveGame(BGSSaveFormBuffer* a_buf); // 0E
139  virtual void LoadGame(BGSLoadFormBuffer* a_buf); // 0F
140  virtual void InitLoadGame(BGSLoadFormBuffer* a_buf); // 10 - { return; }
141  virtual void FinishLoadGame(BGSLoadFormBuffer* a_buf); // 11 - { return; }
142  virtual void Revert(BGSLoadFormBuffer* a_buf); // 12 - { return; }
143  virtual void InitItemImpl(); // 13 - { return; }
144  [[nodiscard]] virtual TESFile* GetDescriptionOwnerFile() const; // 14 - returns the file that last modified this form
145  [[nodiscard]] virtual FormType GetSavedFormType() const; // 15 - { return formType; }
146  virtual void GetFormDetailedString(char* a_buf, std::uint32_t a_bufLen); // 16 - { return std::sprintf_s(a_buf, a_bufLen, "%s Form '%s' (%08X)", g_formStrings[3 * formID], "", formID); }
147  [[nodiscard]] virtual bool GetKnown() const; // 17 - { return (flags >> 6 ) & 1; }
148  [[nodiscard]] virtual bool GetRandomAnim() const; // 18 - { return (flags >> 16) & 1; }
149  [[nodiscard]] virtual bool GetPlayable() const; // 19 - { return (flags >> 2) & 1; }
150  [[nodiscard]] virtual bool IsHeadingMarker() const; // 1A - { return false; }
151  [[nodiscard]] virtual bool GetDangerous() const; // 1B - { return (flags >> 17) & 1; }
152  [[nodiscard]] virtual bool QHasCurrents() const; // 1C - { return (flags >> 19) & 1; }
153  [[nodiscard]] virtual bool GetObstacle() const; // 1D - { return (flags >> 25) & 1; }
154  [[nodiscard]] virtual bool QIsLODLandObject() const; // 1E - { return false; }
155  [[nodiscard]] virtual bool GetOnLocalMap() const; // 1F - { return (flags >> 9) & 1; }
156  [[nodiscard]] virtual bool GetMustUpdate() const; // 20 - { return (flags >> 8) & 1; }
157  virtual void SetOnLocalMap(bool a_set); // 21 - { if (a_set) flags &= 0xFFFFFDFF; else flags |= 0x200; }
158  [[nodiscard]] virtual bool GetIgnoredBySandbox() const; // 22 - { return false; }
159  virtual void SetDelete(bool a_set); // 23 - { bool result = (flags >> 5) & 1; if (result != a_set) { if (a_set) flags |= 0x20; else flags &= 0xFFFFFFDF; AddChange(1); return result; }
160  virtual void SetAltered(bool a_set); // 24
161  virtual void SaveObjectBound(); // 25 - { return; }
162  virtual void LoadObjectBound(TESFile* a_mod); // 26 - { return; }
163  [[nodiscard]] virtual bool IsBoundObject() const; // 27 - { return false; }
164  [[nodiscard]] virtual bool IsObject() const; // 28 - { return false; }
165  [[nodiscard]] virtual bool IsMagicItem() const; // 29 - { return false; }
166  [[nodiscard]] virtual bool IsWater() const; // 2A - { return false; }
167  virtual TESObjectREFR* AsReference1(); // 2B - { return 0; }
168  [[nodiscard]] virtual const TESObjectREFR* AsReference2() const; // 2C - { return 0; }
169  [[nodiscard]] virtual std::uint32_t GetRefCount() const; // 2D - { return 0; }
170  [[nodiscard]] virtual const char* GetTextForParsedSubTag(const BSFixedString& a_tag) const; // 2E
171  virtual void Copy(TESForm* a_srcForm); // 2F - { return; }
172  virtual bool BelongsInGroup(FORM* a_form, bool a_allowParentGroups, bool a_currentOnly); // 30
173  virtual void CreateGroupData(FORM* a_form, FORM_GROUP* a_group); // 31
174  [[nodiscard]] virtual const char* GetFormEditorID() const; // 32 - { return ""; }
175  virtual bool SetFormEditorID(const char* a_str); // 33 - { return true; }
176  virtual bool IsParentForm(); // 34 - { return false; }
177  virtual bool IsParentFormTree(); // 35 - { return false; }
178  virtual bool IsFormTypeChild(FormType a_type); // 36 - { return false; }
179  virtual bool Activate(TESObjectREFR* a_targetRef, TESObjectREFR* a_activatorRef, std::uint8_t a_arg3, TESBoundObject* a_object, std::int32_t a_targetCount); // 37 - { return false; }
180  virtual void SetFormID(FormID a_id, bool a_updateFile); // 38
181  [[nodiscard]] virtual const char* GetObjectTypeName() const; // 39 - { return ""; }
182  [[nodiscard]] virtual bool QAvailableInGame() const; // 3A - { return true; }
183 
184  static void AddCompileIndex(FormID& a_id, TESFile* a_file)
185  {
186  using func_t = decltype(&TESForm::AddCompileIndex);
187  static REL::Relocation<func_t> func{ RELOCATION_ID(14509, 14667) };
188  func(a_id, a_file);
189  }
190 
191  [[nodiscard]] static auto GetAllForms()
192  -> std::pair<
194  std::reference_wrapper<BSReadWriteLock>>
195  {
196  static REL::Relocation<BSTHashMap<FormID, TESForm*>**> allForms{ RELOCATION_ID(514351, 400507) };
197  static REL::Relocation<BSReadWriteLock*> allFormsMapLock{ RELOCATION_ID(514360, 400517) };
198  return { *allForms, std::ref(*allFormsMapLock) };
199  }
200 
201  [[nodiscard]] static auto GetAllFormsByEditorID()
202  -> std::pair<
204  std::reference_wrapper<BSReadWriteLock>>
205  {
206  static REL::Relocation<BSTHashMap<BSFixedString, TESForm*>**> allFormsByEditorID{ RELOCATION_ID(514352, 400509) };
207  static REL::Relocation<BSReadWriteLock*> allFormsEditorIDMapLock{ RELOCATION_ID(514361, 400518) };
208  return { *allFormsByEditorID, std::ref(*allFormsEditorIDMapLock) };
209  }
210 
211  [[nodiscard]] static TESForm* LookupByID(FormID a_formID)
212  {
213  const auto& [map, lock] = GetAllForms();
214  [[maybe_unused]] const BSReadWriteLock l{ lock };
215  if (map) {
216  const auto it = map->find(a_formID);
217  return it != map->end() ? it->second : nullptr;
218  } else {
219  return nullptr;
220  }
221  }
222 
223  template <class T>
224  [[nodiscard]] static T* LookupByID(FormID a_formID)
225  {
226  const auto form = LookupByID(a_formID);
227  return form ? form->As<T>() : nullptr;
228  }
229 
230  [[nodiscard]] static TESForm* LookupByEditorID(const std::string_view& a_editorID)
231  {
232  const auto& [map, lock] = GetAllFormsByEditorID();
233  [[maybe_unused]] const BSReadWriteLock l{ lock };
234  if (map) {
235  const auto it = map->find(a_editorID);
236  return it != map->end() ? it->second : nullptr;
237  } else {
238  return nullptr;
239  }
240  }
241 
242  template <class T>
243  [[nodiscard]] static T* LookupByEditorID(const std::string_view& a_editorID)
244  {
245  const auto form = LookupByEditorID(a_editorID);
246  return form ? form->As<T>() : nullptr;
247  }
248 
249  template <
250  class T,
251  class = std::enable_if_t<
252  std::negation_v<
253  std::disjunction<
254  std::is_pointer<T>,
255  std::is_reference<T>,
256  std::is_const<T>,
257  std::is_volatile<T>>>>>
258  [[nodiscard]] T* As() noexcept;
259 
260  template <
261  class T,
262  class = std::enable_if_t<
263  std::negation_v<
264  std::disjunction<
265  std::is_pointer<T>,
266  std::is_reference<T>,
267  std::is_const<T>,
268  std::is_volatile<T>>>>>
269  [[nodiscard]] const T* As() const noexcept;
270 
271  [[nodiscard]] TESObjectREFR* AsReference() { return AsReference1(); }
272  [[nodiscard]] const TESObjectREFR* AsReference() const { return AsReference2(); }
273 
274  [[nodiscard]] TESFile* GetFile(std::int32_t a_idx = -1) const
275  {
276  const auto array = sourceFiles.array;
277  if (!array || array->empty()) {
278  return nullptr;
279  }
280 
281  if (a_idx < 0 || static_cast<std::uint32_t>(a_idx) >= array->size()) {
282  return array->back();
283  } else {
284  return (*array)[a_idx];
285  }
286  }
287 
288  [[nodiscard]] std::uint32_t GetFormFlags() const noexcept { return formFlags; }
289  [[nodiscard]] FormID GetFormID() const noexcept { return formID; }
290  [[nodiscard]] FormType GetFormType() const noexcept { return *formType; }
291  [[nodiscard]] std::int32_t GetGoldValue() const;
292 
293  [[nodiscard]] FormID GetLocalFormID()
294  {
295  auto file = GetFile(0);
296 
297  RE::FormID fileIndex = file->compileIndex << (3 * 8);
298  fileIndex += file->smallFileCompileIndex << ((1 * 8) + 4);
299 
300  return formID & ~fileIndex;
301  }
302 
303  [[nodiscard]] const char* GetName() const;
304  [[nodiscard]] float GetWeight() const;
305  [[nodiscard]] bool HasKeywordInArray(const std::vector<BGSKeyword*>& a_keywords, bool a_matchAll) const;
306  [[nodiscard]] bool HasAnyKeywordByEditorID(const std::vector<std::string>& editorIDs) const;
307  [[nodiscard]] bool HasKeywordByEditorID(std::string_view a_editorID);
308  [[nodiscard]] bool HasKeywordInList(BGSListForm* a_keywordList, bool a_matchAll) const;
309  [[nodiscard]] bool HasVMAD() const;
310  [[nodiscard]] bool HasWorldModel() const noexcept;
311  void InitItem() { InitItemImpl(); }
312 
313  [[nodiscard]] bool Is(FormType a_type) const noexcept { return GetFormType() == a_type; }
314 
315  template <class... Args>
316  [[nodiscard]] bool Is(Args... a_args) const noexcept //
317  requires(std::same_as<Args, FormType>&&...)
318  {
319  return (Is(a_args) || ...);
320  }
321 
322  [[nodiscard]] bool IsAmmo() const noexcept { return Is(FormType::Ammo); }
323  [[nodiscard]] bool IsArmor() const noexcept { return Is(FormType::Armor); }
324  [[nodiscard]] bool IsBook() const noexcept { return Is(FormType::Book); }
325  [[nodiscard]] bool IsDeleted() const noexcept { return (GetFormFlags() & RecordFlags::kDeleted) != 0; }
326  [[nodiscard]] bool IsDynamicForm() const noexcept { return GetFormID() >= 0xFF000000; }
327  [[nodiscard]] bool IsGold() const noexcept { return GetFormID() == 0x0000000F; }
328  [[nodiscard]] bool IsIgnored() const noexcept { return (GetFormFlags() & RecordFlags::kIgnored) != 0; }
329  [[nodiscard]] bool IsInventoryObject() const;
330  [[nodiscard]] bool IsInitialized() const noexcept { return (GetFormFlags() & RecordFlags::kInitialized) != 0; }
331  [[nodiscard]] bool IsKey() const noexcept { return Is(FormType::KeyMaster); }
332  [[nodiscard]] bool IsLockpick() const noexcept { return GetFormID() == 0x0000000A; }
333  [[nodiscard]] bool IsNot(FormType a_type) const noexcept { return !Is(a_type); }
334 
335  template <class... Args>
336  [[nodiscard]] bool IsNot(Args... a_args) const noexcept //
337  requires(std::same_as<Args, FormType>&&...)
338  {
339  return (IsNot(a_args) && ...);
340  }
341 
342  [[nodiscard]] bool IsNote() const noexcept { return Is(FormType::Note); }
343  [[nodiscard]] bool IsPlayer() const noexcept { return GetFormID() == 0x00000007; }
344  [[nodiscard]] bool IsPlayerRef() const noexcept { return GetFormID() == 0x00000014; }
345  [[nodiscard]] bool IsSkooma() const noexcept { return (GetFormID() == 0x00057A7A || GetFormID() == 0x0201391D); }
346  [[nodiscard]] bool IsSoulGem() const noexcept { return Is(FormType::SoulGem); }
347  [[nodiscard]] bool IsWeapon() const noexcept { return Is(FormType::Weapon); }
348 
349  void SetPlayerKnows(bool a_known);
350 
351  // members
353  std::uint32_t formFlags; // 10
354  FormID formID; // 14
357  std::uint8_t pad1B; // 1B
358  std::uint32_t pad1C; // 1C
359  };
360  static_assert(sizeof(TESForm) == 0x20);
361 }
#define RELOCATION_ID(SE, AE)
Definition: PCH.h:505
Definition: Relocation.h:210
Definition: BGSListForm.h:11
Definition: BGSLoadFormBuffer.h:11
Definition: BGSSaveFormBuffer.h:8
Definition: BSAtomic.h:112
Definition: BSTArray.h:657
constexpr reference back() noexcept
Definition: BSTArray.h:683
Definition: BSTHashMap.h:21
Definition: BaseFormComponent.h:8
Definition: TESBoundObject.h:24
Definition: TESForm.h:22
Definition: TESForm.h:28
TESFileArray * array
Definition: TESForm.h:31
Definition: TESFile.h:17
Definition: TESForm.h:36
REX::EnumSet< FormType, std::uint8_t > formType
Definition: TESForm.h:356
bool IsLockpick() const noexcept
Definition: TESForm.h:332
virtual void InitItemImpl()
bool HasKeywordByEditorID(std::string_view a_editorID)
virtual void SaveGame(BGSSaveFormBuffer *a_buf)
virtual bool LoadEdit(TESFile *a_mod)
virtual bool IsFormTypeChild(FormType a_type)
virtual void LoadGame(BGSLoadFormBuffer *a_buf)
virtual bool IsBoundObject() const
virtual void SetAltered(bool a_set)
virtual bool QAvailableInGame() const
bool IsNot(Args... a_args) const noexcept requires(std
Definition: TESForm.h:336
virtual void SetFormID(FormID a_id, bool a_updateFile)
void SetPlayerKnows(bool a_known)
virtual const TESObjectREFR * AsReference2() const
static void AddCompileIndex(FormID &a_id, TESFile *a_file)
Definition: TESForm.h:184
virtual const char * GetTextForParsedSubTag(const BSFixedString &a_tag) const
void CopyComponent(BaseFormComponent *a_rhs) override
virtual bool QHasCurrents() const
virtual void InitializeData()
virtual bool GetIgnoredBySandbox() const
virtual bool GetMustUpdate() const
virtual bool GetDangerous() const
static auto GetAllFormsByEditorID() -> std::pair< BSTHashMap< BSFixedString, TESForm * > *, std::reference_wrapper< BSReadWriteLock >>
Definition: TESForm.h:201
virtual bool SetFormEditorID(const char *a_str)
bool HasKeywordInArray(const std::vector< BGSKeyword * > &a_keywords, bool a_matchAll) const
bool IsDeleted() const noexcept
Definition: TESForm.h:325
InGameFormFlag
Definition: TESForm.h:110
std::uint8_t pad1B
Definition: TESForm.h:357
FormID GetLocalFormID()
Definition: TESForm.h:293
bool IsWeapon() const noexcept
Definition: TESForm.h:347
static auto GetAllForms() -> std::pair< BSTHashMap< FormID, TESForm * > *, std::reference_wrapper< BSReadWriteLock >>
Definition: TESForm.h:191
static constexpr auto VTABLE
Definition: TESForm.h:39
virtual bool GetPlayable() const
virtual void SetOnLocalMap(bool a_set)
virtual bool AddChange(std::uint32_t a_changeFlags)
bool HasWorldModel() const noexcept
const TESObjectREFR * AsReference() const
Definition: TESForm.h:272
virtual void Copy(TESForm *a_srcForm)
virtual void RemoveChange(std::uint32_t a_changeFlags)
virtual bool IsParentFormTree()
static T * LookupByEditorID(const std::string_view &a_editorID)
Definition: TESForm.h:243
bool IsInitialized() const noexcept
Definition: TESForm.h:330
virtual void CreateGroupData(FORM *a_form, FORM_GROUP *a_group)
bool IsArmor() const noexcept
Definition: TESForm.h:323
TESObjectREFR * AsReference()
Definition: TESForm.h:271
virtual void InitLoadGame(BGSLoadFormBuffer *a_buf)
FormType GetFormType() const noexcept
Definition: TESForm.h:290
virtual bool IsHeadingMarker() const
virtual bool IsObject() const
virtual void Revert(BGSLoadFormBuffer *a_buf)
virtual void LoadObjectBound(TESFile *a_mod)
static TESForm * LookupByEditorID(const std::string_view &a_editorID)
Definition: TESForm.h:230
static TESForm * LookupByID(FormID a_formID)
Definition: TESForm.h:211
virtual bool IsWater() const
static constexpr auto RTTI
Definition: TESForm.h:38
bool IsAmmo() const noexcept
Definition: TESForm.h:322
virtual void FinishLoadGame(BGSLoadFormBuffer *a_buf)
virtual bool GetRandomAnim() const
virtual bool Activate(TESObjectREFR *a_targetRef, TESObjectREFR *a_activatorRef, std::uint8_t a_arg3, TESBoundObject *a_object, std::int32_t a_targetCount)
const char * GetName() const
virtual const char * GetFormEditorID() const
virtual bool BelongsInGroup(FORM *a_form, bool a_allowParentGroups, bool a_currentOnly)
virtual TESForm * CreateDuplicateForm(bool a_createEditorID, void *a_arg2)
bool HasAnyKeywordByEditorID(const std::vector< std::string > &editorIDs) const
virtual void GetFormDetailedString(char *a_buf, std::uint32_t a_bufLen)
virtual bool IsParentForm()
void ClearDataComponent() override
virtual void SetDelete(bool a_set)
virtual bool CheckSaveGame(BGSSaveFormBuffer *a_buf)
bool IsIgnored() const noexcept
Definition: TESForm.h:328
FormID formID
Definition: TESForm.h:354
virtual std::uint32_t GetRefCount() const
bool IsNot(FormType a_type) const noexcept
Definition: TESForm.h:333
virtual TESFile * GetDescriptionOwnerFile() const
static T * LookupByID(FormID a_formID)
Definition: TESForm.h:224
virtual void ClearData()
FormID GetFormID() const noexcept
Definition: TESForm.h:289
std::uint32_t pad1C
Definition: TESForm.h:358
bool Is(FormType a_type) const noexcept
Definition: TESForm.h:313
std::int32_t GetGoldValue() const
bool IsInventoryObject() const
bool IsPlayerRef() const noexcept
Definition: TESForm.h:344
virtual bool FindInFileFast(TESFile *a_mod)
float GetWeight() const
virtual const char * GetObjectTypeName() const
virtual bool GetKnown() const
REX::EnumSet< InGameFormFlag, std::uint16_t > inGameFormFlags
Definition: TESForm.h:355
virtual void SaveObjectBound()
bool HasVMAD() const
virtual bool GetObstacle() const
virtual bool IsMagicItem() const
virtual bool Load(TESFile *a_mod)
virtual bool QIsLODLandObject() const
bool HasKeywordInList(BGSListForm *a_keywordList, bool a_matchAll) const
bool IsSkooma() const noexcept
Definition: TESForm.h:345
virtual TESObjectREFR * AsReference1()
bool IsDynamicForm() const noexcept
Definition: TESForm.h:326
TESFileContainer sourceFiles
Definition: TESForm.h:352
TESFile * GetFile(std::int32_t a_idx=-1) const
Definition: TESForm.h:274
std::uint32_t GetFormFlags() const noexcept
Definition: TESForm.h:288
void InitItem()
Definition: TESForm.h:311
std::uint32_t formFlags
Definition: TESForm.h:353
static constexpr auto FORMTYPE
Definition: TESForm.h:40
bool IsGold() const noexcept
Definition: TESForm.h:327
virtual FormType GetSavedFormType() const
void InitializeDataComponent() override
bool Is(Args... a_args) const noexcept requires(std
Definition: TESForm.h:316
bool IsSoulGem() const noexcept
Definition: TESForm.h:346
bool IsNote() const noexcept
Definition: TESForm.h:342
T * As() noexcept
Definition: FormTraits.h:146
bool IsPlayer() const noexcept
Definition: TESForm.h:343
bool IsBook() const noexcept
Definition: TESForm.h:324
~TESForm() override
virtual bool LoadPartial(TESFile *a_mod)
virtual bool GetOnLocalMap() const
bool IsKey() const noexcept
Definition: TESForm.h:331
Definition: TESObjectREFR.h:114
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_TESForm
Definition: Offsets_VTABLE.h:12827
constexpr REL::ID RTTI_TESForm(static_cast< std::uint64_t >(513848))
FormType
Definition: FormTypes.h:139
std::uint32_t FormID
Definition: BSCoreTypes.h:5
requires(std::invocable< std::remove_reference_t< EF >>) class scope_exit
Definition: PCH.h:153
Definition: EffectArchetypes.h:65
Definition: FORM.h:20
Definition: FORM.h:6
Definition: TESForm.h:43
ChangeFlag
Definition: TESForm.h:45
@ kCreated
Definition: TESForm.h:46
@ kFlags
Definition: TESForm.h:47
Definition: TESForm.h:52
RecordFlag
Definition: TESForm.h:54
@ kTemporary
Definition: TESForm.h:84
@ kStillLoading
Definition: TESForm.h:90
@ kOnLocalMap
Definition: TESForm.h:73
@ kMaster
Definition: TESForm.h:56
@ kRandomAnim
Definition: TESForm.h:86
@ kResetDestruction
Definition: TESForm.h:82
@ kUsedAsMovingPlatform
Definition: TESForm.h:77
@ kFireOff
Definition: TESForm.h:71
@ kDeleted
Definition: TESForm.h:63
@ kUnlocked
Definition: TESForm.h:57
@ kMustBeVisibleDistant
Definition: TESForm.h:85
@ kReflectedByAutoWater
Definition: TESForm.h:102
@ kInPlaceableWater
Definition: TESForm.h:69
@ kVATSTargetOverride
Definition: TESForm.h:99
@ kDisabled
Definition: TESForm.h:76
@ kNoAIAcquire
Definition: TESForm.h:96
@ kAltered
Definition: TESForm.h:59
@ kIgnoreFriendlyHits
Definition: TESForm.h:89
@ kDisableFade
Definition: TESForm.h:100
@ kFormRetainsID
Definition: TESForm.h:91
@ kShowOnWorldMap
Definition: TESForm.h:103
@ kInitialized
Definition: TESForm.h:61
@ kDangerous
Definition: TESForm.h:87
@ kUnk24
Definition: TESForm.h:94
@ kEmpty
Definition: TESForm.h:81
@ kMustUpdate
Definition: TESForm.h:72
@ kDestructible
Definition: TESForm.h:55
@ kIgnored
Definition: TESForm.h:79
@ kObstacle
Definition: TESForm.h:97
@ kChildCanUse
Definition: TESForm.h:105
@ kHasCurrents
Definition: TESForm.h:88
@ kBorderRegion
Definition: TESForm.h:65
@ kGlobalConstant
Definition: TESForm.h:66
@ kPlayable
Definition: TESForm.h:60
@ kKnown
Definition: TESForm.h:68
@ kPersistent
Definition: TESForm.h:74
@ kDestroyed
Definition: TESForm.h:92
@ kNonOccluder
Definition: TESForm.h:62
@ kHasSpokenFlag
Definition: TESForm.h:67