CommonLibVR
TESTopicInfo.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSFixedString.h"
4 #include "RE/D/DialogueItem.h"
5 #include "RE/F/FormTypes.h"
6 #include "RE/M/MemoryManager.h"
7 #include "RE/T/TESCondition.h"
8 #include "RE/T/TESForm.h"
9 
10 namespace RE
11 {
12  struct TOPIC_INFO_DATA // ENAM
13  {
14  enum class TOPIC_INFO_FLAGS
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 VTABLE = VTABLE_TESTopicInfo;
46  inline static constexpr auto FORMTYPE = FormType::Info;
47 
48  enum class FavorLevel // CNAM
49  {
50  kNone = 0,
51  kSmall = 1,
52  kMedium = 2,
53  kLarge = 3
54  };
55 
56  struct ChangeFlags
57  {
58  enum ChangeFlag : std::uint32_t
59  {
60  kSaidOnce = (std::uint32_t)1 << 31
61  };
62  };
63 
64  struct RecordFlags
65  {
66  enum RecordFlag : std::uint32_t
67  {
68  kDeleted = 1 << 5,
69  kIgnored = 1 << 12
70  };
71  };
72 
73  struct ResponseData // TRDT
74  {
75  enum class EmotionType
76  {
77  kNeutral = 0,
78  kAnger = 1,
79  kDisgust = 2,
80  kFear = 3,
81  kSad = 4,
82  kHappy = 5,
83  kSurprise = 6,
84  kPuzzled = 7
85  };
86 
87  enum class Flag
88  {
89  kNone = 0,
90  kUseEmotionAnimation = 1 << 0
91  };
92 
95 
97 
98  // members
100  std::uint32_t emotionValue; // 04
101  TESTopic* unk08; // 08
102  std::uint8_t responseNumber; // 10
103  std::uint8_t pad11; // 11
104  std::uint16_t pad12; // 12
105  std::uint32_t pad14; // 14
108  std::uint8_t pad21; // 21
109  std::uint16_t pad22; // 22
110  std::uint32_t pad24; // 24
115  };
116  static_assert(sizeof(ResponseData) == 0x48);
117 
118  ~TESTopicInfo() override; // 00
119 
120  // override (TESForm)
121  void InitializeData() override; // 04
122  void ClearData() override; // 05
123  bool Load(TESFile* a_mod) override; // 06
124  void LoadGame(BGSLoadFormBuffer* a_buf) override; // 0F
125  void Revert(BGSLoadFormBuffer* a_buf) override; // 12
126  void InitItemImpl() override; // 13
127  void GetFormDetailedString(char* a_buf, std::uint32_t a_bufLen) override; // 16 - { return; }
128  void SetAltered(bool a_set) override; // 24
129  bool BelongsInGroup(FORM* a_form, bool a_allowParentGroups, bool a_currentOnly) override; // 30
130  void CreateGroupData(FORM* a_form, FORM_GROUP* a_group) override; // 31
131 
133 
134  // members
136  TESTopicInfo* dataInfo; // 28 - PNAM
138  std::uint16_t infoIndex; // 38 - index in infoTopics array of parent topic
139  bool saidOnce; // 3A
141  TOPIC_INFO_DATA data; // 3C - ENAM
142  std::uint32_t fileOffset; // 40
143  std::uint32_t pad44; // 44
144  private:
145  KEEP_FOR_RE()
146  };
147  static_assert(sizeof(TESTopicInfo) == 0x48);
148 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: BGSLoadFormBuffer.h:11
Definition: BGSSoundDescriptorForm.h:14
Definition: DialogueItem.h:43
Definition: TESCondition.h:992
Definition: TESFile.h:17
Definition: TESForm.h:40
Definition: TESIdleForm.h:37
Definition: TESObjectREFR.h:113
Definition: TESTopicInfo.h:42
bool BelongsInGroup(FORM *a_form, bool a_allowParentGroups, bool a_currentOnly) override
std::uint32_t pad44
Definition: TESTopicInfo.h:143
TESCondition objConditions
Definition: TESTopicInfo.h:137
TESTopicInfo * dataInfo
Definition: TESTopicInfo.h:136
stl::enumeration< FavorLevel, std::uint8_t > favorLevel
Definition: TESTopicInfo.h:140
void InitItemImpl() override
static constexpr auto FORMTYPE
Definition: TESTopicInfo.h:46
static constexpr auto RTTI
Definition: TESTopicInfo.h:44
std::uint32_t fileOffset
Definition: TESTopicInfo.h:142
~TESTopicInfo() override
bool Load(TESFile *a_mod) override
std::uint16_t infoIndex
Definition: TESTopicInfo.h:138
DialogueItem GetDialogueData(TESObjectREFR *a_speaker)
void InitializeData() override
void ClearData() override
void Revert(BGSLoadFormBuffer *a_buf) override
TOPIC_INFO_DATA data
Definition: TESTopicInfo.h:141
void LoadGame(BGSLoadFormBuffer *a_buf) override
void CreateGroupData(FORM *a_form, FORM_GROUP *a_group) override
FavorLevel
Definition: TESTopicInfo.h:49
bool saidOnce
Definition: TESTopicInfo.h:139
static constexpr auto VTABLE
Definition: TESTopicInfo.h:45
TESTopic * parentTopic
Definition: TESTopicInfo.h:135
void GetFormDetailedString(char *a_buf, std::uint32_t a_bufLen) override
void SetAltered(bool a_set) override
Definition: TESTopic.h:135
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_TESTopicInfo(static_cast< std::uint64_t >(513903))
constexpr std::array< REL::ID, 1 > VTABLE_TESTopicInfo
Definition: Offsets_VTABLE.h:12907
Definition: FORM.h:20
Definition: FORM.h:6
Definition: TESTopicInfo.h:57
ChangeFlag
Definition: TESTopicInfo.h:59
@ kSaidOnce
Definition: TESTopicInfo.h:60
Definition: TESTopicInfo.h:65
RecordFlag
Definition: TESTopicInfo.h:67
@ kIgnored
Definition: TESTopicInfo.h:69
@ kDeleted
Definition: TESTopicInfo.h:68
Definition: TESTopicInfo.h:74
std::uint32_t emotionValue
Definition: TESTopicInfo.h:100
std::uint32_t pad14
Definition: TESTopicInfo.h:105
TESTopic * unk08
Definition: TESTopicInfo.h:101
BSFixedString responseText
Definition: TESTopicInfo.h:111
EmotionType
Definition: TESTopicInfo.h:76
stl::enumeration< EmotionType, std::uint32_t > emotionType
Definition: TESTopicInfo.h:99
BGSSoundDescriptorForm * sound
Definition: TESTopicInfo.h:106
TESIdleForm * listenerIdle
Definition: TESTopicInfo.h:113
TESIdleForm * speakerIdle
Definition: TESTopicInfo.h:112
void PopulateResponseText(TESFile *a_file)
std::uint32_t pad24
Definition: TESTopicInfo.h:110
std::uint16_t pad22
Definition: TESTopicInfo.h:109
ResponseData * next
Definition: TESTopicInfo.h:114
std::uint8_t pad11
Definition: TESTopicInfo.h:103
stl::enumeration< Flag, std::uint8_t > flags
Definition: TESTopicInfo.h:107
std::uint8_t responseNumber
Definition: TESTopicInfo.h:102
std::uint8_t pad21
Definition: TESTopicInfo.h:108
std::uint16_t pad12
Definition: TESTopicInfo.h:104
Flag
Definition: TESTopicInfo.h:88
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