CommonLibSSE NG
Loading...
Searching...
No Matches
TESTopic.h
Go to the documentation of this file.
1#pragma once
2
5#include "RE/F/FormTypes.h"
6#include "RE/T/TESForm.h"
7#include "RE/T/TESFullName.h"
8
9namespace RE
10{
11 struct DIALOGUE_DATA // DATA
12 {
13 enum class TopicFlag
14 {
15 kNone = 0,
17 };
18
19 enum class Subtype
20 {
21 kCustom = 0,
22 kForceGreet = 1,
23 kRumors = 2,
24 kUnk3 = 3, // custom?
25 kIntimidate = 4,
26 kFlatter = 5,
27 kBribe = 6,
28 kAskGift = 7,
29 kGift = 8,
30 kAskFavor = 9,
31 kFavor = 10,
33 kFollow = 12,
34 kReject = 13,
35 kScene = 14,
36 kShow = 15,
37 kAgree = 16,
38 kRefuse = 17,
39 kExitFavorState = 18,
40 kMoralRefusal = 19,
47 kAttack = 26,
48 kPowerAttack = 27,
49 kBash = 28,
50 kHit = 29,
51 kFlee = 30,
52 kBleedout = 31,
53 kAvoidThreat = 32,
54 kDeath = 33,
55 kGroupStrategy = 34,
56 kBlock = 35,
57 kTaunt = 36,
58 kAllyKilled = 37,
59 kSteal = 38,
60 kYield = 39,
61 kAcceptYield = 40,
63 kAssault = 42,
64 kMurder = 43,
65 kAssaultNPC = 44,
66 kMurderNPC = 45,
67 kPickpocketNPC = 46,
68 kStealFromNPC = 47,
70 kTrespass = 49,
76 kAlertIdle = 55,
77 kLostIdle = 56,
78 kNormalToAlert = 57,
79 kAlertToCombat = 58,
80 kNormalToCombat = 59,
81 kAlertToNormal = 60,
82 kCombatToNormal = 61,
83 kCombatToLost = 62,
84 kLostToNormal = 63,
85 kLostToCombat = 64,
87 kServiceRefusal = 66,
88 kRepair = 67,
89 kTravel = 68,
90 kTraining = 69,
91 kBarterExit = 70,
92 kRepairExit = 71,
93 kRecharge = 72,
94 kRechargeExit = 73,
95 kTrainingExit = 74,
96 kObserveCombat = 75,
97 kNoticeCorpse = 76,
98 kTimeToGo = 77,
99 kGoodBye = 78,
100 kHello = 79,
102 kShootBow = 81,
103 kZKeyObject = 82,
104 kJump = 83,
105 kKnockOverObject = 84,
106 kDestroyObject = 85,
108 kLockedObject = 87,
109 kPickpocketTopic = 88,
110 kPursueIdleTopic = 89,
111 kSharedInfo = 90,
114 kPlayerShout = 93,
115 kIdle = 94,
121 kOutofBreath = 100,
122 kCombatGrunt = 101,
124 };
125
129 };
130 static_assert(sizeof(DIALOGUE_DATA) == 0x4);
131
132 class TESTopic :
133 public TESForm, // 00
134 public TESFullName // 20
135 {
136 public:
137 inline static constexpr auto RTTI = RTTI_TESTopic;
138 inline static constexpr auto VTABLE = VTABLE_TESTopic;
139 inline static constexpr auto FORMTYPE = FormType::Dialogue;
140
142 {
143 enum RecordFlag : std::uint32_t
144 {
145 kDeleted = 1 << 5,
146 kIgnored = 1 << 12
147 };
148 };
149
150 ~TESTopic() override; // 00
151
152 // override (TESForm)
153 bool Load(TESFile* a_mod) override; // 06
154 void InitItemImpl() override; // 13
155 const char* GetFormEditorID() const override; // 32 - { return formEditorID.c_str(); }
156 bool SetFormEditorID(const char* a_str) override; // 33 - { bool result = formEditorID == a_str; formEditorID = a_str; return result; }
157 bool IsParentForm() override; // 34 - { return true; }
158 bool IsFormTypeChild(FormType a_type) override; // 36 - { return a_type == FormType::Info }
159
160 // override (TESFullName)
161 [[nodiscard]] std::uint32_t GetFullNameLength() const override; // 04
162 [[nodiscard]] const char* GetFullName() const override; // 05
163
164 [[nodiscard]] float GetPriority() const;
165
166 // members
167 DIALOGUE_DATA data; // 30 - DATA
168 std::uint32_t priorityAndJournalIndex; // 34 - PNAM
170 TESQuest* ownerQuest; // 40 - QNAM
171 TESTopicInfo** topicInfos; // 48 - infoTopics[infoCount]
172 std::uint32_t numTopicInfos; // 50 - TIFC
173 std::uint32_t firstFileOffset; // 54
175 };
176 static_assert(sizeof(TESTopic) == 0x60);
177}
Definition BGSDialogueBranch.h:10
Definition TESFile.h:15
Definition TESForm.h:35
Definition TESFullName.h:9
Definition TESQuest.h:189
Definition TESTopic.h:135
const char * GetFullName() const override
TESQuest * ownerQuest
Definition TESTopic.h:170
std::uint32_t priorityAndJournalIndex
Definition TESTopic.h:168
bool IsFormTypeChild(FormType a_type) override
static constexpr auto RTTI
Definition TESTopic.h:137
static constexpr auto FORMTYPE
Definition TESTopic.h:139
TESTopicInfo ** topicInfos
Definition TESTopic.h:171
DIALOGUE_DATA data
Definition TESTopic.h:167
std::uint32_t numTopicInfos
Definition TESTopic.h:172
BGSDialogueBranch * ownerBranch
Definition TESTopic.h:169
float GetPriority() const
~TESTopic() override
bool IsParentForm() override
std::uint32_t GetFullNameLength() const override
void InitItemImpl() override
bool Load(TESFile *a_mod) override
const char * GetFormEditorID() const override
BSFixedString formEditorID
Definition TESTopic.h:174
bool SetFormEditorID(const char *a_str) override
std::uint32_t firstFileOffset
Definition TESTopic.h:173
static constexpr auto VTABLE
Definition TESTopic.h:138
Definition TESTopicInfo.h:42
Definition PCH.h:223
Definition AbsorbEffect.h:6
FormType
Definition FormTypes.h:139
constexpr REL::VariantID RTTI_TESTopic(513904, 392442, 0x1ed9778)
constexpr std::array< REL::VariantID, 2 > VTABLE_TESTopic
Definition Offsets_VTABLE.h:948
Definition TESTopic.h:12
stl::enumeration< Subtype, std::uint16_t > subtype
Definition TESTopic.h:128
TopicFlag
Definition TESTopic.h:14
Subtype
Definition TESTopic.h:20
stl::enumeration< TopicFlag, std::uint8_t > topicFlags
Definition TESTopic.h:126
stl::enumeration< DIALOGUE_TYPE, std::uint8_t > type
Definition TESTopic.h:127
Definition TESTopic.h:142
RecordFlag
Definition TESTopic.h:144
@ kDeleted
Definition TESTopic.h:145
@ kIgnored
Definition TESTopic.h:146