CommonLibSSE (Parapets fork)
EffectSetting.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/A/ActorValues.h"
4 #include "RE/B/BGSKeywordForm.h"
6 #include "RE/B/BSFixedString.h"
7 #include "RE/B/BSSimpleList.h"
8 #include "RE/B/BSTArray.h"
10 #include "RE/F/FormTypes.h"
11 #include "RE/M/MagicSystem.h"
12 #include "RE/S/SoundLevels.h"
13 #include "RE/T/TESCondition.h"
14 #include "RE/T/TESForm.h"
15 #include "RE/T/TESFullName.h"
16 
17 namespace RE
18 {
19  class EffectSetting :
20  public TESForm, // 000
21  public TESFullName, // 020
22  public BGSMenuDisplayObject, // 030
23  public BGSKeywordForm // 040
24  {
25  public:
26  inline static constexpr auto RTTI = RTTI_EffectSetting;
27 
29  using FilterValidation_t = bool(EffectSetting*, void*);
30  inline static constexpr auto FORMTYPE = FormType::MagicEffect;
31 
32  struct RecordFlags
33  {
34  enum RecordFlag : std::uint32_t
35  {
36  kDeleted = 1 << 5,
37  kIgnored = 1 << 12
38  };
39  };
40 
41  struct EffectSettingData // DATA
42  {
43  public:
44  enum class Flag
45  {
46  kNone = 0,
47  kHostile = 1 << 0,
48  kRecover = 1 << 1,
49  kDetrimental = 1 << 2,
50  kSnapToNavMesh = 1 << 3,
51  kNoHitEvent = 1 << 4,
52  kDispelWithKeywords = 1 << 8,
53  kNoDuration = 1 << 9,
54  kNoMagnitude = 1 << 10,
55  kNoArea = 1 << 11,
56  kFXPersist = 1 << 12,
57  kGoryVisuals = 1 << 14,
58  kHideInUI = 1 << 15,
59  kNoRecast = 1 << 17,
60  kPowerAffectsMagnitude = 1 << 21,
61  kPowerAffectsDuration = 1 << 22,
62  kPainless = 1 << 26,
63  kNoHitEffect = 1 << 27,
64  kNoDeathDispel = 1 << 28
65  };
66 
67  // members
69  float baseCost; // 04
73  std::int16_t numCounterEffects; // 18
74  std::uint16_t pad1A; // 1A
75  std::uint32_t pad1C; // 1C
77  float taperWeight; // 28
78  std::uint32_t pad2C; // 2C
81  std::int32_t minimumSkill; // 40
82  std::int32_t spellmakingArea; // 44
83  float spellmakingChargeTime; // 48
84  float taperCurve; // 4C
85  float taperDuration; // 50
86  float secondAVWeight; // 54
97  float skillUsageMult; // 98
98  std::uint32_t pad9C; // 9C
100  float dualCastScale; // A8
101  std::uint32_t padAC; // AC
107  BGSPerk* perk; // D8
109  float aiScore; // E4
110  float aiDelayTimer; // E8
111  std::uint32_t padEC; // EC
112  };
113  static_assert(sizeof(EffectSettingData) == 0xF0);
114 
115  struct SoundPair // SNDD
116  {
117  public:
118  // members
120  std::uint32_t pad04; // 04
122  };
123  static_assert(sizeof(SoundPair) == 0x10);
124 
125  ~EffectSetting() override; // 00
126 
127  // override (TESForm)
128  void ClearData() override; // 05
129  bool Load(TESFile* a_mod) override; // 06
130  void InitItemImpl() override; // 13
131  void Copy(TESForm* a_srcForm) override; // 2F
132  const char* GetObjectTypeName() const override; // 39
133 
134  // override (BGSKeywordForm)
135  bool HasKeyword(const BGSKeyword* a_keyword) const override; // 04
136 
137  [[nodiscard]] constexpr Archetype GetArchetype() const noexcept { return data.archetype; }
138  [[nodiscard]] constexpr ActorValue GetMagickSkill() const noexcept { return data.associatedSkill; }
139  [[nodiscard]] constexpr std::int32_t GetMinimumSkillLevel() const noexcept { return data.minimumSkill; }
140  [[nodiscard]] constexpr bool HasArchetype(Archetype a_type) const noexcept { return data.archetype == a_type; }
141 
142  // members
144  void* filterValidationItem; // 060
145  EffectSettingData data; // 068 - DATA
149  std::int32_t effectLoadedCount; // 188
150  std::int32_t associatedItemLoadedCount; // 18C
152  };
153  static_assert(sizeof(EffectSetting) == 0x198);
154 }
Definition: BGSArtObject.h:12
Definition: BGSDualCastData.h:31
Definition: BGSExplosion.h:53
Definition: BGSImpactDataSet.h:13
Definition: BGSKeywordForm.h:10
Definition: BGSKeyword.h:10
Definition: BGSMenuDisplayObject.h:10
Definition: BGSPerk.h:31
Definition: BGSProjectile.h:79
Definition: BGSReferenceEffect.h:9
Definition: BGSSoundDescriptorForm.h:14
Definition: BSSimpleList.h:10
Definition: BSTArray.h:377
Definition: EffectSetting.h:24
const char * GetObjectTypeName() const override
BSFixedString magicItemDescription
Definition: EffectSetting.h:148
static constexpr auto RTTI
Definition: EffectSetting.h:26
constexpr Archetype GetArchetype() const noexcept
Definition: EffectSetting.h:137
static constexpr auto FORMTYPE
Definition: EffectSetting.h:30
void ClearData() override
bool(EffectSetting *, void *) FilterValidation_t
Definition: EffectSetting.h:29
EffectSettingData data
Definition: EffectSetting.h:145
TESCondition conditions
Definition: EffectSetting.h:151
bool Load(TESFile *a_mod) override
FilterValidation_t * filterValidationFunction
Definition: EffectSetting.h:143
BSSimpleList< EffectSetting * > counterEffects
Definition: EffectSetting.h:146
constexpr ActorValue GetMagickSkill() const noexcept
Definition: EffectSetting.h:138
~EffectSetting() override
constexpr bool HasArchetype(Archetype a_type) const noexcept
Definition: EffectSetting.h:140
void * filterValidationItem
Definition: EffectSetting.h:144
constexpr std::int32_t GetMinimumSkillLevel() const noexcept
Definition: EffectSetting.h:139
bool HasKeyword(const BGSKeyword *a_keyword) const override
void InitItemImpl() override
std::int32_t associatedItemLoadedCount
Definition: EffectSetting.h:150
BSTArray< SoundPair > effectSounds
Definition: EffectSetting.h:147
void Copy(TESForm *a_srcForm) override
std::int32_t effectLoadedCount
Definition: EffectSetting.h:149
Definition: SpellItem.h:16
Definition: TESCondition.h:989
Definition: TESEffectShader.h:171
Definition: TESFile.h:14
Definition: TESForm.h:34
Definition: TESFullName.h:9
Definition: TESImageSpaceModifier.h:111
Definition: TESObjectLIGH.h:64
SoundID
Definition: MagicSystem.h:50
CastingType
Definition: MagicSystem.h:31
Delivery
Definition: MagicSystem.h:39
Definition: AbsorbEffect.h:6
SOUND_LEVEL
Definition: SoundLevels.h:6
ActorValue
Definition: ActorValues.h:6
constexpr REL::ID RTTI_EffectSetting
Definition: Offsets_RTTI.h:4608
ArchetypeID
Definition: EffectArchetypes.h:11
Definition: EffectSetting.h:42
BGSDualCastData * dualCastData
Definition: EffectSetting.h:99
TESEffectShader * enchantShader
Definition: EffectSetting.h:80
MagicSystem::CastingType castingType
Definition: EffectSetting.h:91
float baseCost
Definition: EffectSetting.h:69
std::uint32_t pad1C
Definition: EffectSetting.h:75
float dualCastScale
Definition: EffectSetting.h:100
std::int16_t numCounterEffects
Definition: EffectSetting.h:73
float taperCurve
Definition: EffectSetting.h:84
BGSExplosion * explosion
Definition: EffectSetting.h:90
float taperWeight
Definition: EffectSetting.h:77
MagicSystem::Delivery delivery
Definition: EffectSetting.h:92
std::int32_t spellmakingArea
Definition: EffectSetting.h:82
std::uint16_t pad1A
Definition: EffectSetting.h:74
Archetype archetype
Definition: EffectSetting.h:87
BGSArtObject * castingArt
Definition: EffectSetting.h:94
TESObjectLIGH * light
Definition: EffectSetting.h:76
float spellmakingChargeTime
Definition: EffectSetting.h:83
ActorValue secondaryAV
Definition: EffectSetting.h:93
SOUND_LEVEL castingSoundLevel
Definition: EffectSetting.h:108
float aiScore
Definition: EffectSetting.h:109
BGSArtObject * hitEffectArt
Definition: EffectSetting.h:95
TESEffectShader * effectShader
Definition: EffectSetting.h:79
BGSProjectile * projectileBase
Definition: EffectSetting.h:89
SpellItem * equipAbility
Definition: EffectSetting.h:105
float secondAVWeight
Definition: EffectSetting.h:86
TESImageSpaceModifier * imageSpaceMod
Definition: EffectSetting.h:106
Flag
Definition: EffectSetting.h:45
std::uint32_t padEC
Definition: EffectSetting.h:111
ActorValue primaryAV
Definition: EffectSetting.h:88
BGSPerk * perk
Definition: EffectSetting.h:107
BGSImpactDataSet * impactDataSet
Definition: EffectSetting.h:96
ActorValue resistVariable
Definition: EffectSetting.h:72
std::int32_t minimumSkill
Definition: EffectSetting.h:81
float skillUsageMult
Definition: EffectSetting.h:97
float taperDuration
Definition: EffectSetting.h:85
stl::enumeration< Flag, std::uint32_t > flags
Definition: EffectSetting.h:68
BGSArtObject * enchantEffectArt
Definition: EffectSetting.h:102
TESForm * associatedForm
Definition: EffectSetting.h:70
BGSReferenceEffect * enchantVisuals
Definition: EffectSetting.h:104
float aiDelayTimer
Definition: EffectSetting.h:110
ActorValue associatedSkill
Definition: EffectSetting.h:71
std::uint32_t pad2C
Definition: EffectSetting.h:78
BGSReferenceEffect * hitVisuals
Definition: EffectSetting.h:103
std::uint32_t padAC
Definition: EffectSetting.h:101
std::uint32_t pad9C
Definition: EffectSetting.h:98
Definition: EffectSetting.h:33
RecordFlag
Definition: EffectSetting.h:35
@ kDeleted
Definition: EffectSetting.h:36
@ kIgnored
Definition: EffectSetting.h:37
Definition: EffectSetting.h:116
MagicSystem::SoundID id
Definition: EffectSetting.h:119
std::uint32_t pad04
Definition: EffectSetting.h:120
BGSSoundDescriptorForm * sound
Definition: EffectSetting.h:121