CommonLibSSE (powerof3)
FormTypes.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace RE
4 {
5  class TESForm;
6  class BGSKeyword;
7  class BGSLocationRefType;
8  class BGSAction;
9  class BGSTextureSet;
10  class BGSMenuIcon;
11  class TESGlobal;
12  class TESClass;
13  class TESFaction;
14  class BGSHeadPart;
15  class TESEyes;
16  class TESRace;
17  class TESSound;
18  class BGSAcousticSpace;
19  class EffectSetting;
20  class Script;
21  class TESLandTexture;
22  class EnchantmentItem;
23  class SpellItem;
24  class ScrollItem;
25  class TESObjectACTI;
26  class BGSTalkingActivator;
27  class TESObjectARMO;
28  class TESObjectBOOK;
29  class TESObjectCONT;
30  class TESObjectDOOR;
31  class IngredientItem;
32  class TESObjectLIGH;
33  class TESObjectMISC;
34  class BGSApparatus;
35  class TESObjectSTAT;
36  class BGSStaticCollection;
37  class BGSMovableStatic;
38  class TESGrass;
39  class TESObjectTREE;
40  class TESFlora;
41  class TESFurniture;
42  class TESObjectWEAP;
43  class TESAmmo;
44  class TESNPC;
45  class TESLevCharacter;
46  class TESKey;
47  class AlchemyItem;
48  class BGSIdleMarker;
49  class BGSNote;
50  class BGSConstructibleObject;
51  class BGSProjectile;
52  class BGSHazard;
53  class TESSoulGem;
54  class TESLevItem;
55  class TESWeather;
56  class TESClimate;
57  class BGSShaderParticleGeometryData;
58  class BGSReferenceEffect;
59  class TESRegion;
60  class NavMeshInfoMap;
61  class TESObjectCELL;
62  class TESObjectREFR;
63  class Actor;
64  class Character;
65  class PlayerCharacter;
66  class MissileProjectile;
67  class ArrowProjectile;
68  class GrenadeProjectile;
69  class BeamProjectile;
70  class FlameProjectile;
71  class ConeProjectile;
72  class BarrierProjectile;
73  class Hazard;
74  class TESWorldSpace;
75  class TESObjectLAND;
76  class NavMesh;
77  class TESTopic;
78  class TESTopicInfo;
79  class TESQuest;
80  class TESIdleForm;
81  class TESPackage;
82  class DialoguePackage;
83  class TESCombatStyle;
84  class TESLoadScreen;
85  class TESLevSpell;
86  class TESObjectANIO;
87  class TESWaterForm;
88  class TESEffectShader;
89  class BGSExplosion;
90  class BGSDebris;
91  class TESImageSpace;
92  class TESImageSpaceModifier;
93  class BGSListForm;
94  class BGSPerk;
95  class BGSBodyPartData;
96  class BGSAddonNode;
97  class ActorValueInfo;
98  class BGSCameraShot;
99  class BGSCameraPath;
100  class BGSVoiceType;
101  class BGSMaterialType;
102  class BGSImpactData;
103  class BGSImpactDataSet;
104  class TESObjectARMA;
105  class BGSEncounterZone;
106  class BGSLocation;
107  class BGSMessage;
108  class BGSRagdoll;
109  class BGSDefaultObjectManager;
110  class BGSLightingTemplate;
111  class BGSMusicType;
112  class BGSFootstep;
113  class BGSFootstepSet;
114  class BGSStoryManagerBranchNode;
115  class BGSStoryManagerQuestNode;
116  class BGSStoryManagerEventNode;
117  class BGSDialogueBranch;
118  class BGSMusicTrackFormWrapper;
119  class TESWordOfPower;
120  class TESShout;
121  class BGSEquipSlot;
122  class BGSRelationship;
123  class BGSScene;
124  class BGSAssociationType;
125  class BGSOutfit;
126  class BGSArtObject;
127  class BGSMaterialObject;
128  class BGSMovementType;
129  class BGSSoundDescriptorForm;
130  class BGSDualCastData;
131  class BGSSoundCategory;
132  class BGSSoundOutput;
133  class BGSCollisionLayer;
134  class BGSColorForm;
135  class BGSReverbParameters;
136  class BGSLensFlare;
137 
138  enum class FormType
139  {
140  None = 0, // 00 NONE TESForm
141  PluginInfo, // 01 TES4
142  FormGroup, // 02 GRUP
143  GameSetting, // 03 GMST
144  Keyword, // 04 KYWD BGSKeyword
145  LocationRefType, // 05 LCRT BGSLocationRefType
146  Action, // 06 AACT BGSAction
147  TextureSet, // 07 TXST BGSTextureSet
148  MenuIcon, // 08 MICN BGSMenuIcon
149  Global, // 09 GLOB TESGlobal
150  Class, // 0A CLAS TESClass
151  Faction, // 0B FACT TESFaction
152  HeadPart, // 0C HDPT BGSHeadPart
153  Eyes, // 0D EYES TESEyes
154  Race, // 0E RACE TESRace
155  Sound, // 0F SOUN TESSound
156  AcousticSpace, // 10 ASPC BGSAcousticSpace
157  Skill, // 11 SKIL
158  MagicEffect, // 12 MGEF EffectSetting
159  Script, // 13 SCPT Script
160  LandTexture, // 14 LTEX TESLandTexture
161  Enchantment, // 15 ENCH EnchantmentItem
162  Spell, // 16 SPEL SpellItem
163  Scroll, // 17 SCRL ScrollItem
164  Activator, // 18 ACTI TESObjectACTI
165  TalkingActivator, // 19 TACT BGSTalkingActivator
166  Armor, // 1A ARMO TESObjectARMO
167  Book, // 1B BOOK TESObjectBOOK
168  Container, // 1C CONT TESObjectCONT
169  Door, // 1D DOOR TESObjectDOOR
170  Ingredient, // 1E INGR IngredientItem
171  Light, // 1F LIGH TESObjectLIGH
172  Misc, // 20 MISC TESObjectMISC
173  Apparatus, // 21 APPA BGSApparatus
174  Static, // 22 STAT TESObjectSTAT
175  StaticCollection, // 23 SCOL BGSStaticCollection
176  MovableStatic, // 24 MSTT BGSMovableStatic
177  Grass, // 25 GRAS TESGrass
178  Tree, // 26 TREE TESObjectTREE
179  Flora, // 27 FLOR TESFlora
180  Furniture, // 28 FURN TESFurniture
181  Weapon, // 29 WEAP TESObjectWEAP
182  Ammo, // 2A AMMO TESAmmo
183  NPC, // 2B NPC_ TESNPC
184  LeveledNPC, // 2C LVLN TESLevCharacter
185  KeyMaster, // 2D KEYM TESKey
186  AlchemyItem, // 2E ALCH AlchemyItem
187  IdleMarker, // 2F IDLM BGSIdleMarker
188  Note, // 30 NOTE BGSNote
189  ConstructibleObject, // 31 COBJ BGSConstructibleObject
190  Projectile, // 32 PROJ BGSProjectile
191  Hazard, // 33 HAZD BGSHazard
192  SoulGem, // 34 SLGM TESSoulGem
193  LeveledItem, // 35 LVLI TESLevItem
194  Weather, // 36 WTHR TESWeather
195  Climate, // 37 CLMT TESClimate
196  ShaderParticleGeometryData, // 38 SPGD BGSShaderParticleGeometryData
197  ReferenceEffect, // 39 RFCT BGSReferenceEffect
198  Region, // 3A REGN TESRegion
199  Navigation, // 3B NAVI NavMeshInfoMap
200  Cell, // 3C CELL TESObjectCELL
201  Reference, // 3D REFR TESObjectREFR
202  ActorCharacter, // 3E ACHR Actor / Character / PlayerCharacter
203  ProjectileMissile, // 3F PMIS MissileProjectile
204  ProjectileArrow, // 40 PARW ArrowProjectile
205  ProjectileGrenade, // 41 PGRE GrenadeProjectile
206  ProjectileBeam, // 42 PBEA BeamProjectile
207  ProjectileFlame, // 43 PFLA FlameProjectile
208  ProjectileCone, // 44 PCON ConeProjectile
209  ProjectileBarrier, // 45 PBAR BarrierProjectile
210  PlacedHazard, // 46 PHZD Hazard
211  WorldSpace, // 47 WRLD TESWorldSpace
212  Land, // 48 LAND TESObjectLAND
213  NavMesh, // 49 NAVM NavMesh
214  TLOD, // 4A TLOD
215  Dialogue, // 4B DIAL TESTopic
216  Info, // 4C INFO TESTopicInfo
217  Quest, // 4D QUST TESQuest
218  Idle, // 4E IDLE TESIdleForm
219  Package, // 4F PACK TESPackage / DialoguePackage
220  CombatStyle, // 50 CSTY TESCombatStyle
221  LoadScreen, // 51 LSCR TESLoadScreen
222  LeveledSpell, // 52 LVSP TESLevSpell
223  AnimatedObject, // 53 ANIO TESObjectANIO
224  Water, // 54 WATR TESWaterForm
225  EffectShader, // 55 EFSH TESEffectShader
226  TOFT, // 56 TOFT
227  Explosion, // 57 EXPL BGSExplosion
228  Debris, // 58 DEBR BGSDebris
229  ImageSpace, // 59 IMGS TESImageSpace
230  ImageAdapter, // 5A IMAD TESImageSpaceModifier
231  FormList, // 5B FLST BGSListForm
232  Perk, // 5C PERK BGSPerk
233  BodyPartData, // 5D BPTD BGSBodyPartData
234  AddonNode, // 5E ADDN BGSAddonNode
235  ActorValueInfo, // 5F AVIF ActorValueInfo
236  CameraShot, // 60 CAMS BGSCameraShot
237  CameraPath, // 61 CPTH BGSCameraPath
238  VoiceType, // 62 VTYP BGSVoiceType
239  MaterialType, // 63 MATT BGSMaterialType
240  Impact, // 64 IPCT BGSImpactData
241  ImpactDataSet, // 65 IPDS BGSImpactDataSet
242  Armature, // 66 ARMA TESObjectARMA
243  EncounterZone, // 67 ECZN BGSEncounterZone
244  Location, // 68 LCTN BGSLocation
245  Message, // 69 MESG BGSMessage
246  Ragdoll, // 6A RGDL BGSRagdoll
247  DefaultObject, // 6B DOBJ BGSDefaultObjectManager
248  LightingMaster, // 6C LGTM BGSLightingTemplate
249  MusicType, // 6D MUSC BGSMusicType
250  Footstep, // 6E FSTP BGSFootstep
251  FootstepSet, // 6F FSTS BGSFootstepSet
252  StoryManagerBranchNode, // 70 SMBN BGSStoryManagerBranchNode
253  StoryManagerQuestNode, // 71 SMQN BGSStoryManagerQuestNode
254  StoryManagerEventNode, // 72 SMEN BGSStoryManagerEventNode
255  DialogueBranch, // 73 DLBR BGSDialogueBranch
256  MusicTrack, // 74 MUST BGSMusicTrackFormWrapper
257  DialogueView, // 75 DLVW
258  WordOfPower, // 76 WOOP TESWordOfPower
259  Shout, // 77 SHOU TESShout
260  EquipSlot, // 78 EQUP BGSEquipSlot
261  Relationship, // 79 RELA BGSRelationship
262  Scene, // 7A SCEN BGSScene
263  AssociationType, // 7B ASTP BGSAssociationType
264  Outfit, // 7C OTFT BGSOutfit
265  ArtObject, // 7D ARTO BGSArtObject
266  MaterialObject, // 7E MATO BGSMaterialObject
267  MovementType, // 7F MOVT BGSMovementType
268  SoundRecord, // 80 SNDR BGSSoundDescriptorForm
269  DualCastData, // 81 DUAL BGSDualCastData
270  SoundCategory, // 82 SNCT BGSSoundCategory
271  SoundOutputModel, // 83 SOPM BGSSoundOutput
272  CollisionLayer, // 84 COLL BGSCollisionLayer
273  ColorForm, // 85 CLFM BGSColorForm
274  ReverbParam, // 86 REVB BGSReverbParameters
275  LensFlare, // 87 LENS BGSLensFlare
276  LensSprite, // 88 LSPR
277  VolumetricLighting, // 89 VOLI BGSVolumetricLighting
278 
279  Max // 8A
280  };
281 
282  [[nodiscard]] std::string_view FormTypeToString(FormType a_formType) noexcept;
283  [[nodiscard]] FormType StringToFormType(std::string_view a_formType);
284 }
285 
286 namespace std
287 {
288  [[nodiscard]] inline std::string to_string(RE::FormType a_formType)
289  {
290  return RE::FormTypeToString(a_formType).data();
291  }
292 }
293 
294 #ifdef FMT_VERSION
295 namespace fmt
296 {
297  template <>
298  struct formatter<RE::FormType>
299  {
300  template <class ParseContext>
301  constexpr auto parse(ParseContext& a_ctx)
302  {
303  return a_ctx.begin();
304  }
305 
306  template <class FormatContext>
307  auto format(const RE::FormType& a_formType, FormatContext& a_ctx)
308  {
309  return fmt::format_to(a_ctx.out(), "{}", RE::FormTypeToString(a_formType));
310  }
311  };
312 }
313 #endif
314 
315 #ifdef __cpp_lib_format
316 namespace std
317 {
318  template <class CharT>
319  struct formatter<RE::FormType, CharT> : std::formatter<std::string_view, CharT>
320  {
321  template <class FormatContext>
322  auto format(RE::FormType a_formType, FormatContext& a_ctx)
323  {
324  return formatter<std::string_view, CharT>::format(RE::FormTypeToString(a_formType), a_ctx);
325  }
326  };
327 }
328 #endif
Definition: AbsorbEffect.h:6
FormType StringToFormType(std::string_view a_formType)
std::string_view FormTypeToString(FormType a_formType) noexcept
FormType
Definition: FormTypes.h:139
@ StoryManagerBranchNode
@ ShaderParticleGeometryData
string(const CharT(&)[N]) -> string< CharT, N - 1 >
Definition: EffectArchetypes.h:65
std::string to_string(RE::EffectArchetype a_archetype)
Definition: EffectArchetypes.h:66