CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
TESTopicInfo.h
Go to the documentation of this file.
1#pragma once
2
4#include "RE/D/DialogueItem.h"
5#include "RE/F/FormTypes.h"
7#include "RE/T/TESCondition.h"
8#include "RE/T/TESForm.h"
9
10namespace RE
11{
12 struct TOPIC_INFO_DATA // ENAM
13 {
15 {
16 kNone = 0,
17 kStartSceneOnEnd = 1 << 0,
18 kRandom = 1 << 1,
19 kSayOnce = 1 << 2,
21 kInfoRefusal = 1 << 4,
22 kRandomEnd = 1 << 5,
23 kEndRunningScene = 1 << 6,
24 kIsForceGreet = 1 << 7,
25 kPlayerAddress = 1 << 8,
26 kForceSubtitle = 1 << 9,
27 kCanMoveWhileGreeting = 1 << 10,
28 kNoLIPFile = 1 << 11,
29 kPostProcess = 1 << 12,
30 kCustomSoundOutput = 1 << 13,
31 kSpendsFavorPoints = 1 << 14
32 };
33
34 [[nodiscard]] float GetResetHours() const;
35
37 std::uint16_t timeUntilReset; // 2 - reset hours as a std::uint16_t
38 };
39 static_assert(sizeof(TOPIC_INFO_DATA) == 0x4);
40
41 class TESTopicInfo : public TESForm
42 {
43 public:
44 inline static constexpr auto RTTI = RTTI_TESTopicInfo;
45 inline static constexpr auto FORMTYPE = FormType::Info;
46
47 enum class FavorLevel // CNAM
48 {
49 kNone = 0,
50 kSmall = 1,
51 kMedium = 2,
52 kLarge = 3
53 };
54
56 {
57 enum ChangeFlag : std::uint32_t
58 {
59 kSaidOnce = (std::uint32_t)1 << 31
60 };
61 };
62
64 {
65 enum RecordFlag : std::uint32_t
66 {
67 kDeleted = 1 << 5,
68 kIgnored = 1 << 12
69 };
70 };
71
72 struct ResponseData // TRDT
73 {
74 enum class EmotionType
75 {
76 kNeutral = 0,
77 kAnger = 1,
78 kDisgust = 2,
79 kFear = 3,
80 kSad = 4,
81 kHappy = 5,
82 kSurprise = 6,
83 kPuzzled = 7
84 };
85
86 enum class Flag
87 {
88 kNone = 0,
90 };
91
94
96
97 // members
99 std::uint32_t emotionValue; // 04
101 std::uint8_t responseNumber; // 10
102 std::uint8_t pad11; // 11
103 std::uint16_t pad12; // 12
104 std::uint32_t pad14; // 14
107 std::uint8_t pad21; // 21
108 std::uint16_t pad22; // 22
109 std::uint32_t pad24; // 24
114 };
115 static_assert(sizeof(ResponseData) == 0x48);
116
117 ~TESTopicInfo() override; // 00
118
119 // override (TESForm)
120 void InitializeData() override; // 04
121 void ClearData() override; // 05
122 bool Load(TESFile* a_mod) override; // 06
123 void LoadGame(BGSLoadFormBuffer* a_buf) override; // 0F
124 void Revert(BGSLoadFormBuffer* a_buf) override; // 12
125 void InitItemImpl() override; // 13
126 void GetFormDetailedString(char* a_buf, std::uint32_t a_bufLen) override; // 16 - { return; }
127 void SetAltered(bool a_set) override; // 24
128 bool BelongsInGroup(FORM* a_form, bool a_allowParentGroups, bool a_currentOnly) override; // 30
129 void CreateGroupData(FORM* a_form, FORM_GROUP* a_group) override; // 31
130
132
133 // members
135 TESTopicInfo* dataInfo; // 28 - PNAM
137 std::uint16_t infoIndex; // 38 - index in infoTopics array of parent topic
138 bool saidOnce; // 3A
140 TOPIC_INFO_DATA data; // 3C - ENAM
141 std::uint32_t fileOffset; // 40
142 std::uint32_t pad44; // 44
143 };
144 static_assert(sizeof(TESTopicInfo) == 0x48);
145}
Definition: Actor.h:125
Definition: BGSSoundDescriptorForm.h:14
Definition: DialogueItem.h:52
Definition: TESCondition.h:987
Definition: TESFile.h:14
Definition: TESForm.h:34
Definition: TESIdleForm.h:35
Definition: TESTopic.h:135
Definition: TESTopicInfo.h:42
DialogueItem GetDialogueData(Actor *a_speaker)
bool BelongsInGroup(FORM *a_form, bool a_allowParentGroups, bool a_currentOnly) override
std::uint32_t pad44
Definition: TESTopicInfo.h:142
TESCondition objConditions
Definition: TESTopicInfo.h:136
TESTopicInfo * dataInfo
Definition: TESTopicInfo.h:135
stl::enumeration< FavorLevel, std::uint8_t > favorLevel
Definition: TESTopicInfo.h:139
void InitItemImpl() override
static constexpr auto FORMTYPE
Definition: TESTopicInfo.h:45
static constexpr auto RTTI
Definition: TESTopicInfo.h:44
std::uint32_t fileOffset
Definition: TESTopicInfo.h:141
~TESTopicInfo() override
bool Load(TESFile *a_mod) override
std::uint16_t infoIndex
Definition: TESTopicInfo.h:137
void InitializeData() override
void ClearData() override
void Revert(BGSLoadFormBuffer *a_buf) override
TOPIC_INFO_DATA data
Definition: TESTopicInfo.h:140
void LoadGame(BGSLoadFormBuffer *a_buf) override
void CreateGroupData(FORM *a_form, FORM_GROUP *a_group) override
FavorLevel
Definition: TESTopicInfo.h:48
bool saidOnce
Definition: TESTopicInfo.h:138
TESTopic * parentTopic
Definition: TESTopicInfo.h:134
void GetFormDetailedString(char *a_buf, std::uint32_t a_bufLen) override
void SetAltered(bool a_set) override
Definition: PCH.h:216
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_TESTopicInfo
Definition: Offsets_RTTI.h:6079
Definition: FORM.h:20
Definition: FORM.h:6
Definition: TESTopicInfo.h:56
ChangeFlag
Definition: TESTopicInfo.h:58
@ kSaidOnce
Definition: TESTopicInfo.h:59
Definition: TESTopicInfo.h:64
RecordFlag
Definition: TESTopicInfo.h:66
@ kIgnored
Definition: TESTopicInfo.h:68
@ kDeleted
Definition: TESTopicInfo.h:67
Definition: TESTopicInfo.h:73
std::uint32_t emotionValue
Definition: TESTopicInfo.h:99
std::uint32_t pad14
Definition: TESTopicInfo.h:104
TESTopic * unk08
Definition: TESTopicInfo.h:100
BSFixedString responseText
Definition: TESTopicInfo.h:110
EmotionType
Definition: TESTopicInfo.h:75
stl::enumeration< EmotionType, std::uint32_t > emotionType
Definition: TESTopicInfo.h:98
BGSSoundDescriptorForm * sound
Definition: TESTopicInfo.h:105
TESIdleForm * listenerIdle
Definition: TESTopicInfo.h:112
TESIdleForm * speakerIdle
Definition: TESTopicInfo.h:111
void PopulateResponseText(TESFile *a_file)
std::uint32_t pad24
Definition: TESTopicInfo.h:109
std::uint16_t pad22
Definition: TESTopicInfo.h:108
ResponseData * next
Definition: TESTopicInfo.h:113
std::uint8_t pad11
Definition: TESTopicInfo.h:102
stl::enumeration< Flag, std::uint8_t > flags
Definition: TESTopicInfo.h:106
std::uint8_t responseNumber
Definition: TESTopicInfo.h:101
std::uint8_t pad21
Definition: TESTopicInfo.h:107
std::uint16_t pad12
Definition: TESTopicInfo.h:103
Flag
Definition: TESTopicInfo.h:87
Definition: TESTopicInfo.h:13
TOPIC_INFO_FLAGS
Definition: TESTopicInfo.h:15
std::uint16_t timeUntilReset
Definition: TESTopicInfo.h:37
stl::enumeration< TOPIC_INFO_FLAGS, std::uint16_t > flags
Definition: TESTopicInfo.h:36
float GetResetHours() const