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