CommonLibSSE NG
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 FORMTYPE = FormType::None;
40 
41  struct ChangeFlags
42  {
43  enum ChangeFlag : std::uint32_t
44  {
45  kCreated = 0,
46  kFlags = 1 << 0
47  };
48  };
49 
50  struct RecordFlags
51  {
52  enum RecordFlag : std::uint32_t
53  {
54  kDestructible = 1 << 0,
55  kMaster = 1 << 0,
56  kUnlocked = 1 << 0,
57 
58  kAltered = 1 << 1,
59  kPlayable = 1 << 2,
60  kInitialized = 1 << 3,
61  kNonOccluder = 1 << 4,
62  kDeleted = 1 << 5,
63 
64  kBorderRegion = 1 << 6,
65  kGlobalConstant = 1 << 6,
66  kHasSpokenFlag = 1 << 6,
67  kKnown = 1 << 6,
69 
70  kFireOff = 1 << 7,
71  kMustUpdate = 1 << 8,
72  kOnLocalMap = 1 << 9,
73  kPersistent = 1 << 10,
74 
75  kDisabled = 1 << 11,
77 
78  kIgnored = 1 << 12,
79 
80  kEmpty = 1 << 13,
81  kResetDestruction = 1 << 13,
82 
83  kTemporary = 1 << 14,
85  kRandomAnim = 1 << 16,
86  kDangerous = 1 << 17,
87  kHasCurrents = 1 << 19,
89  kStillLoading = 1 << 21,
90  kFormRetainsID = 1 << 22,
91  kDestroyed = 1 << 23,
92 
93  kUnk24 = 1 << 24,
94 
95  kNoAIAcquire = 1 << 25,
96  kObstacle = 1 << 25,
97 
99  kDisableFade = 1 << 27,
100 
102  kShowOnWorldMap = 1 << 28,
103 
104  kChildCanUse = 1 << 29
105  };
106  };
107 
108  enum class InGameFormFlag
109  {
110  kNone = 0,
111  kWantsDelete = 1 << 0,
112  kForcedPersistent = 1 << 1,
113  kNoFavorAllowed = 1 << 4,
114  kIsSkyObject = 1 << 5,
115  kRefOriginalPersistent = 1 << 6,
116  kRefPermanentlyDeleted = 1 << 7
117  };
118 
119  ~TESForm() override; // 00
120 
121  // override (BaseFormComponent)
122  void InitializeDataComponent() override; // 01 - { return; }
123  void ClearDataComponent() override; // 02 - { SetEditorID(""); }
124  void CopyComponent(BaseFormComponent* a_rhs) override; // 03
125 
126  // add
127  virtual void InitializeData(); // 04 - { return; }
128  virtual void ClearData(); // 05 - { return; }
129  virtual bool Load(TESFile* a_mod); // 06 - { return true; }
130  virtual bool LoadPartial(TESFile* a_mod); // 07 - { return true; }
131  virtual bool LoadEdit(TESFile* a_mod); // 08 - { return Load(a_mod); }
132  virtual TESForm* CreateDuplicateForm(bool a_createEditorID, void* a_arg2); // 09
133  virtual bool AddChange(std::uint32_t a_changeFlags); // 0A
134  virtual void RemoveChange(std::uint32_t a_changeFlags); // 0B
135  virtual bool FindInFileFast(TESFile* a_mod); // 0C - { return false; }
136  virtual bool CheckSaveGame(BGSSaveFormBuffer* a_buf); // 0D - { return true; }
137  virtual void SaveGame(BGSSaveFormBuffer* a_buf); // 0E
138  virtual void LoadGame(BGSLoadFormBuffer* a_buf); // 0F
139  virtual void InitLoadGame(BGSLoadFormBuffer* a_buf); // 10 - { return; }
140  virtual void FinishLoadGame(BGSLoadFormBuffer* a_buf); // 11 - { return; }
141  virtual void Revert(BGSLoadFormBuffer* a_buf); // 12 - { return; }
142  virtual void InitItemImpl(); // 13 - { return; }
143  [[nodiscard]] virtual TESFile* GetDescriptionOwnerFile() const; // 14 - returns the file that last modified this form
144  [[nodiscard]] virtual FormType GetSavedFormType() const; // 15 - { return formType; }
145  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); }
146  [[nodiscard]] virtual bool GetKnown() const; // 17 - { return (flags >> 6 ) & 1; }
147  [[nodiscard]] virtual bool GetRandomAnim() const; // 18 - { return (flags >> 16) & 1; }
148  [[nodiscard]] virtual bool GetPlayable() const; // 19 - { return (flags >> 2) & 1; }
149  [[nodiscard]] virtual bool IsHeadingMarker() const; // 1A - { return false; }
150  [[nodiscard]] virtual bool GetDangerous() const; // 1B - { return (flags >> 17) & 1; }
151  [[nodiscard]] virtual bool QHasCurrents() const; // 1C - { return (flags >> 19) & 1; }
152  [[nodiscard]] virtual bool GetObstacle() const; // 1D - { return (flags >> 25) & 1; }
153  [[nodiscard]] virtual bool QIsLODLandObject() const; // 1E - { return false; }
154  [[nodiscard]] virtual bool GetOnLocalMap() const; // 1F - { return (flags >> 9) & 1; }
155  [[nodiscard]] virtual bool GetMustUpdate() const; // 20 - { return (flags >> 8) & 1; }
156  virtual void SetOnLocalMap(bool a_set); // 21 - { if (a_set) flags &= 0xFFFFFDFF; else flags |= 0x200; }
157  [[nodiscard]] virtual bool GetIgnoredBySandbox() const; // 22 - { return false; }
158  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; }
159  virtual void SetAltered(bool a_set); // 24
160  virtual void SaveObjectBound(); // 25 - { return; }
161  virtual void LoadObjectBound(TESFile* a_mod); // 26 - { return; }
162  [[nodiscard]] virtual bool IsBoundObject() const; // 27 - { return false; }
163  [[nodiscard]] virtual bool IsObject() const; // 28 - { return false; }
164  [[nodiscard]] virtual bool IsMagicItem() const; // 29 - { return false; }
165  [[nodiscard]] virtual bool IsWater() const; // 2A - { return false; }
166  virtual TESObjectREFR* AsReference1(); // 2B - { return 0; }
167  [[nodiscard]] virtual const TESObjectREFR* AsReference2() const; // 2C - { return 0; }
168  [[nodiscard]] virtual std::uint32_t GetRefCount() const; // 2D - { return 0; }
169  [[nodiscard]] virtual const char* GetTextForParsedSubTag(const BSFixedString& a_tag) const; // 2E
170  virtual void Copy(TESForm* a_srcForm); // 2F - { return; }
171  virtual bool BelongsInGroup(FORM* a_form, bool a_allowParentGroups, bool a_currentOnly); // 30
172  virtual void CreateGroupData(FORM* a_form, FORM_GROUP* a_group); // 31
173  [[nodiscard]] virtual const char* GetFormEditorID() const; // 32 - { return ""; }
174  virtual bool SetFormEditorID(const char* a_str); // 33 - { return true; }
175  virtual bool IsParentForm(); // 34 - { return false; }
176  virtual bool IsParentFormTree(); // 35 - { return false; }
177  virtual bool IsFormTypeChild(FormType a_type); // 36 - { return false; }
178  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; }
179  virtual void SetFormID(FormID a_id, bool a_updateFile); // 38
180  [[nodiscard]] virtual const char* GetObjectTypeName() const; // 39 - { return ""; }
181  [[nodiscard]] virtual bool QAvailableInGame() const; // 3A - { return true; }
182 
183  static void AddCompileIndex(FormID& a_id, TESFile* a_file)
184  {
185  using func_t = decltype(&TESForm::AddCompileIndex);
186  REL::Relocation<func_t> func{ RELOCATION_ID(14509, 14667) };
187  func(a_id, a_file);
188  }
189 
190  [[nodiscard]] static auto GetAllForms()
191  -> std::pair<
193  std::reference_wrapper<BSReadWriteLock>>
194  {
195  REL::Relocation<BSTHashMap<FormID, TESForm*>**> allForms{ RELOCATION_ID(514351, 400507) };
196  REL::Relocation<BSReadWriteLock*> allFormsMapLock{ RELOCATION_ID(514360, 400517) };
197  return { *allForms, std::ref(*allFormsMapLock) };
198  }
199 
200  [[nodiscard]] static auto GetAllFormsByEditorID()
201  -> std::pair<
203  std::reference_wrapper<BSReadWriteLock>>
204  {
205  REL::Relocation<BSTHashMap<BSFixedString, TESForm*>**> allFormsByEditorID{ RELOCATION_ID(514352, 400509) };
206  REL::Relocation<BSReadWriteLock*> allFormsEditorIDMapLock{ RELOCATION_ID(514361, 400518) };
207  return { *allFormsByEditorID, std::ref(*allFormsEditorIDMapLock) };
208  }
209 
210  [[nodiscard]] static TESForm* LookupByID(FormID a_formID)
211  {
212  const auto& [map, lock] = GetAllForms();
213  [[maybe_unused]] const BSReadWriteLock l{ lock };
214  if (map) {
215  const auto it = map->find(a_formID);
216  return it != map->end() ? it->second : nullptr;
217  } else {
218  return nullptr;
219  }
220  }
221 
222  template <class T>
223  [[nodiscard]] static T* LookupByID(FormID a_formID)
224  {
225  const auto form = LookupByID(a_formID);
226  return form ? form->As<T>() : nullptr;
227  }
228 
229  [[nodiscard]] static TESForm* LookupByEditorID(const std::string_view& a_editorID)
230  {
231  const auto& [map, lock] = GetAllFormsByEditorID();
232  [[maybe_unused]] const BSReadWriteLock l{ lock };
233  if (map) {
234  const auto it = map->find(a_editorID);
235  return it != map->end() ? it->second : nullptr;
236  } else {
237  return nullptr;
238  }
239  }
240 
241  template <class T>
242  [[nodiscard]] static T* LookupByEditorID(const std::string_view& a_editorID)
243  {
244  const auto form = LookupByEditorID(a_editorID);
245  return form ? form->As<T>() : nullptr;
246  }
247 
248  template <
249  class T,
250  class = std::enable_if_t<
251  std::negation_v<
252  std::disjunction<
253  std::is_pointer<T>,
254  std::is_reference<T>,
255  std::is_const<T>,
256  std::is_volatile<T>>>>>
257  [[nodiscard]] T* As() noexcept;
258 
259  template <
260  class T,
261  class = std::enable_if_t<
262  std::negation_v<
263  std::disjunction<
264  std::is_pointer<T>,
265  std::is_reference<T>,
266  std::is_const<T>,
267  std::is_volatile<T>>>>>
268  [[nodiscard]] const T* As() const noexcept;
269 
270  [[nodiscard]] TESObjectREFR* AsReference() { return AsReference1(); }
271  [[nodiscard]] const TESObjectREFR* AsReference() const { return AsReference2(); }
272 
273  [[nodiscard]] TESFile* GetFile(std::int32_t a_idx = -1) const
274  {
275  const auto array = sourceFiles.array;
276  if (!array || array->empty()) {
277  return nullptr;
278  }
279 
280  if (a_idx < 0 || static_cast<std::uint32_t>(a_idx) >= array->size()) {
281  return array->back();
282  } else {
283  return (*array)[a_idx];
284  }
285  }
286 
287  [[nodiscard]] std::uint32_t GetFormFlags() const noexcept { return formFlags; }
288  [[nodiscard]] FormID GetFormID() const noexcept { return formID; }
289  [[nodiscard]] FormType GetFormType() const noexcept { return *formType; }
290  [[nodiscard]] std::int32_t GetGoldValue() const;
291 
292  [[nodiscard]] FormID GetRawFormID() const;
293  [[nodiscard]] FormID GetLocalFormID() const
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(a_se, a_ae)
Definition: PCH.h:724
Definition: Relocation.h:204
Definition: BGSListForm.h:11
Definition: BGSLoadFormBuffer.h:11
Definition: BGSSaveFormBuffer.h:8
Definition: BSAtomic.h:71
Definition: BSTArray.h:656
constexpr reference back() noexcept
Definition: BSTArray.h:682
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
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:183
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:200
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:109
std::uint8_t pad1B
Definition: TESForm.h:357
bool IsWeapon() const noexcept
Definition: TESForm.h:347
static auto GetAllForms() -> std::pair< BSTHashMap< FormID, TESForm * > *, std::reference_wrapper< BSReadWriteLock >>
Definition: TESForm.h:190
virtual bool GetPlayable() const
virtual void SetOnLocalMap(bool a_set)
virtual bool AddChange(std::uint32_t a_changeFlags)
bool HasWorldModel() const noexcept
stl::enumeration< FormType, std::uint8_t > formType
Definition: TESForm.h:356
FormID GetLocalFormID() const
Definition: TESForm.h:293
const TESObjectREFR * AsReference() const
Definition: TESForm.h:271
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:242
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:270
virtual void InitLoadGame(BGSLoadFormBuffer *a_buf)
FormType GetFormType() const noexcept
Definition: TESForm.h:289
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:229
static TESForm * LookupByID(FormID a_formID)
Definition: TESForm.h:210
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)
stl::enumeration< InGameFormFlag, std::uint16_t > inGameFormFlags
Definition: TESForm.h:355
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:223
virtual void ClearData()
FormID GetFormID() const noexcept
Definition: TESForm.h:288
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
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:273
std::uint32_t GetFormFlags() const noexcept
Definition: TESForm.h:287
void InitItem()
Definition: TESForm.h:311
FormID GetRawFormID() const
std::uint32_t formFlags
Definition: TESForm.h:353
static constexpr auto FORMTYPE
Definition: TESForm.h:39
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:113
requires(is_builtin_convertible_v< T >) struct GetRawType< T >
Definition: PackUnpack.h:30
Definition: AbsorbEffect.h:6
FormType
Definition: FormTypes.h:139
std::uint32_t FormID
Definition: BSCoreTypes.h:5
constexpr REL::VariantID RTTI_TESForm(513848, 392216, 0x1ed6d20)
Definition: ActorValueList.h:28
Definition: FORM.h:20
Definition: FORM.h:6
Definition: TESForm.h:42
ChangeFlag
Definition: TESForm.h:44
@ kCreated
Definition: TESForm.h:45
@ kFlags
Definition: TESForm.h:46
Definition: TESForm.h:51
RecordFlag
Definition: TESForm.h:53
@ kTemporary
Definition: TESForm.h:83
@ kStillLoading
Definition: TESForm.h:89
@ kOnLocalMap
Definition: TESForm.h:72
@ kMaster
Definition: TESForm.h:55
@ kRandomAnim
Definition: TESForm.h:85
@ kResetDestruction
Definition: TESForm.h:81
@ kUsedAsMovingPlatform
Definition: TESForm.h:76
@ kFireOff
Definition: TESForm.h:70
@ kDeleted
Definition: TESForm.h:62
@ kUnlocked
Definition: TESForm.h:56
@ kMustBeVisibleDistant
Definition: TESForm.h:84
@ kReflectedByAutoWater
Definition: TESForm.h:101
@ kInPlaceableWater
Definition: TESForm.h:68
@ kVATSTargetOverride
Definition: TESForm.h:98
@ kDisabled
Definition: TESForm.h:75
@ kNoAIAcquire
Definition: TESForm.h:95
@ kAltered
Definition: TESForm.h:58
@ kIgnoreFriendlyHits
Definition: TESForm.h:88
@ kDisableFade
Definition: TESForm.h:99
@ kFormRetainsID
Definition: TESForm.h:90
@ kShowOnWorldMap
Definition: TESForm.h:102
@ kInitialized
Definition: TESForm.h:60
@ kDangerous
Definition: TESForm.h:86
@ kUnk24
Definition: TESForm.h:93
@ kEmpty
Definition: TESForm.h:80
@ kMustUpdate
Definition: TESForm.h:71
@ kDestructible
Definition: TESForm.h:54
@ kIgnored
Definition: TESForm.h:78
@ kObstacle
Definition: TESForm.h:96
@ kChildCanUse
Definition: TESForm.h:104
@ kHasCurrents
Definition: TESForm.h:87
@ kBorderRegion
Definition: TESForm.h:64
@ kGlobalConstant
Definition: TESForm.h:65
@ kPlayable
Definition: TESForm.h:59
@ kKnown
Definition: TESForm.h:67
@ kPersistent
Definition: TESForm.h:73
@ kDestroyed
Definition: TESForm.h:91
@ kNonOccluder
Definition: TESForm.h:61
@ kHasSpokenFlag
Definition: TESForm.h:66