diff --git a/CommonLibF4/include/RE/Bethesda/Actor.h b/CommonLibF4/include/RE/Bethesda/Actor.h index 8c3dda7a..19818d37 100644 --- a/CommonLibF4/include/RE/Bethesda/Actor.h +++ b/CommonLibF4/include/RE/Bethesda/Actor.h @@ -1265,6 +1265,13 @@ namespace RE return func(this, a_refr, a_owner, a_crime); } + void UpdateVoiceTimer(bool a_force) + { + using func_t = decltype(&Actor::UpdateVoiceTimer); + static REL::Relocation func{ REL::ID(2230178) }; + return func(this, a_force); + } + // members NiTFlags niFlags; // 2D0 float updateTargetTimer; // 2D4 diff --git a/CommonLibF4/include/RE/Bethesda/BGSSceneAction.h b/CommonLibF4/include/RE/Bethesda/BGSSceneAction.h index a15ef053..000a63c7 100644 --- a/CommonLibF4/include/RE/Bethesda/BGSSceneAction.h +++ b/CommonLibF4/include/RE/Bethesda/BGSSceneAction.h @@ -76,26 +76,26 @@ namespace RE virtual ~BGSSceneAction(); // 00 // add - virtual void Unk_01(void); // 01 - virtual void Unk_02(void); // 02 - virtual void Unk_03(void); // 03 - virtual void Unk_04(void); // 04 - virtual void Unk_05(void); // 05 + virtual void Load(void); // 01 + virtual void InitItem(void); // 02 + virtual void OnDelete(void); // 03 + virtual void ClearData(void); // 04 + virtual void Copy(void); // 05 virtual bool QIsLooping(void); // 06 virtual bool QFaceHeadTrackTarget(const BGSScene* scene); // 07 virtual SCENE_ACTION_TYPE GetActionType() const = 0; // 08 virtual bool QActionCanEnd(); // 09 virtual bool IsPackageActive(BGSScene* scene, TESPackage* package, Actor* actor); // 0A - virtual void Unk_0B(void); // 0B - virtual void Unk_0C(void); // 0C - virtual void Unk_0D(void); // 0D - virtual void Unk_0E(void); // 0E - virtual void Unk_0F(void); // 0F - virtual void Unk_10(void); // 10 - virtual void Unk_11(void); // 11 + virtual void LoadGame(void); // 0B + virtual void SaveGame(void); // 0C + virtual void Revert(void); // 0D + virtual void InitLoadGame(void); // 0E + virtual void ResetActionData(void); // 0F + virtual void SetInput(void); // 10 + virtual float GetActionPercentDone(const BGSScene* scene); // 11 virtual void StartAction(BGSScene* scene); // 12 virtual void EndAction(BGSScene* scene); // 13 - virtual void CleanUpActionActor(void); // 14 + virtual void CleanUpActionActor(BGSScene* scene); // 14 virtual void UpdateAction(BGSScene* scene); // 14 // members @@ -158,12 +158,32 @@ namespace RE TESTopic* pNPCResponseTopics[4]; // 98 BGSKeyword* pNPCResponseSubtypeKeywords[4]; // B8 TESTopic* pTopic; // D8 - SCENE_ACTION_PLAYER_RESPONSE_TYPE playerInput; // E0 + std::uint32_t playerInput; // E0 + + TESTopicInfo* GetCurrentTopicInfo(BGSScene* a_parentScene, TESObjectREFR* a_target, std::uint32_t a_type) + { + using func_t = decltype(&BGSSceneActionPlayerDialogue::GetCurrentTopicInfo); + static REL::Relocation func{ REL::ID(2196825) }; + return func(this, a_parentScene, a_target, a_type); + } }; static_assert(sizeof(BGSSceneActionPlayerDialogue) == 0xE8); - class __declspec(novtable) BGSSceneActionNPCResponseDialogue : public BGSSceneActionConversationBase - {}; + class __declspec(novtable) BGSSceneActionNPCResponseDialogue : + public BGSSceneActionConversationBase + { + public: + static constexpr auto RTTI{ RTTI::BGSSceneActionNPCResponseDialogue }; + static constexpr auto VTABLE{ VTABLE::BGSSceneActionNPCResponseDialogue }; + + TESTopicInfo* GetCurrentTopicInfo(BGSScene* a_parentScene) + { + using func_t = decltype(&BGSSceneActionNPCResponseDialogue::GetCurrentTopicInfo); + static REL::Relocation func{ REL::ID(2196825) }; + return func(this, a_parentScene); + } + }; + static_assert(sizeof(BGSSceneActionNPCResponseDialogue) == 0x90); class __declspec(novtable) BGSSceneActionStartScene : public BGSSceneAction diff --git a/CommonLibF4/include/RE/Bethesda/BSInputEnableManager.h b/CommonLibF4/include/RE/Bethesda/BSInputEnableManager.h index 1ac67988..d17395fb 100644 --- a/CommonLibF4/include/RE/Bethesda/BSInputEnableManager.h +++ b/CommonLibF4/include/RE/Bethesda/BSInputEnableManager.h @@ -43,7 +43,7 @@ namespace RE [[nodiscard]] std::uint32_t DecRef() const { using func_t = decltype(&BSInputEnableLayer::DecRef); - static REL::Relocation func{ REL::ID(659989) }; + static REL::Relocation func{ REL::ID(2268272) }; return func(this); } @@ -77,14 +77,14 @@ namespace RE [[nodiscard]] static BSInputEnableManager* GetSingleton() { - static REL::Relocation singleton{ REL::ID(781703) }; + static REL::Relocation singleton{ REL::ID(2689007) }; return *singleton; } bool AllocateNewLayer(BSTSmartPointer& a_layer, const char* a_debugName) { using func_t = decltype(&BSInputEnableManager::AllocateNewLayer); - static REL::Relocation func{ REL::ID(537494) }; + static REL::Relocation func{ REL::ID(2268244) }; return func(this, a_layer, a_debugName); } @@ -98,14 +98,14 @@ namespace RE bool EnableUserEvent(std::uint32_t a_layerID, UEFlag a_userEventFlags, bool a_enable, UserEvents::SENDER_ID a_senderID) { using func_t = decltype(&BSInputEnableManager::EnableUserEvent); - static REL::Relocation func{ REL::ID(1432984) }; + static REL::Relocation func{ REL::ID(2268263) }; return func(this, a_layerID, a_userEventFlags, a_enable, a_senderID); } bool EnableOtherEvent(std::uint32_t a_layerID, OEFlag a_otherEventFlags, bool a_enable, UserEvents::SENDER_ID a_senderID) { using func_t = decltype(&BSInputEnableManager::EnableOtherEvent); - static REL::Relocation func{ REL::ID(1419268) }; + static REL::Relocation func{ REL::ID(2268265) }; return func(this, a_layerID, a_otherEventFlags, a_enable, a_senderID); } diff --git a/CommonLibF4/include/RE/Bethesda/BSRandom.h b/CommonLibF4/include/RE/Bethesda/BSRandom.h index 14f34e32..e50ece36 100644 --- a/CommonLibF4/include/RE/Bethesda/BSRandom.h +++ b/CommonLibF4/include/RE/Bethesda/BSRandom.h @@ -10,5 +10,19 @@ namespace RE static REL::Relocation func{ REL::ID(2267950) }; return func(a_min, a_max); } + + inline float Float(float a_min, float a_max) + { + using func_t = decltype(&BSRandom::Float); + static REL::Relocation func{ REL::ID(2267953) }; + return func(a_min, a_max); + } + + inline float Float0To1() + { + using func_t = decltype(&BSRandom::Float0To1); + static REL::Relocation func{ REL::ID(2267954) }; + return func(); + } } } diff --git a/CommonLibF4/include/RE/Bethesda/BSUtilities.h b/CommonLibF4/include/RE/Bethesda/BSUtilities.h index 9c4781e2..1e6010dd 100644 --- a/CommonLibF4/include/RE/Bethesda/BSUtilities.h +++ b/CommonLibF4/include/RE/Bethesda/BSUtilities.h @@ -26,7 +26,7 @@ namespace RE::BSUtilities inline NiAVObject* GetObjectByName(NiAVObject* a_root, const BSFixedString& a_name, bool a_tryInternal, bool a_dontAttach) { using func_t = decltype(&GetObjectByName); - static REL::Relocation func{ REL::ID(843650) }; + static REL::Relocation func{ REL::ID(2274841) }; return func(a_root, a_name, a_tryInternal, a_dontAttach); } } diff --git a/CommonLibF4/include/RE/Bethesda/MagicItems.h b/CommonLibF4/include/RE/Bethesda/MagicItems.h index ae3d3cd5..6a4bebbd 100644 --- a/CommonLibF4/include/RE/Bethesda/MagicItems.h +++ b/CommonLibF4/include/RE/Bethesda/MagicItems.h @@ -31,7 +31,7 @@ namespace RE void GetDescription(BSStringT* a_buffer, const char* a_beginTagFormat, const char* a_endTagFormat, float a_magnitude, float a_duration) { using func_t = decltype(&EffectItem::GetDescription); - static REL::Relocation func{ REL::ID(949839) }; + static REL::Relocation func{ REL::ID(2189612) }; return func(this, a_buffer, a_beginTagFormat, a_endTagFormat, a_magnitude, a_duration); } diff --git a/CommonLibF4/include/RE/Bethesda/MenuControls.h b/CommonLibF4/include/RE/Bethesda/MenuControls.h index 634b087d..67cae373 100644 --- a/CommonLibF4/include/RE/Bethesda/MenuControls.h +++ b/CommonLibF4/include/RE/Bethesda/MenuControls.h @@ -22,7 +22,7 @@ namespace RE public: [[nodiscard]] static MenuControls* GetSingleton() { - static REL::Relocation singleton{ REL::ID(520890) }; + static REL::Relocation singleton{ REL::ID(2689089) }; return *singleton; } diff --git a/CommonLibF4/include/RE/Bethesda/MenuTopicManager.h b/CommonLibF4/include/RE/Bethesda/MenuTopicManager.h index 8984fc26..e57c888c 100644 --- a/CommonLibF4/include/RE/Bethesda/MenuTopicManager.h +++ b/CommonLibF4/include/RE/Bethesda/MenuTopicManager.h @@ -13,7 +13,7 @@ namespace RE [[nodiscard]] static MenuTopicManager* GetSingleton() { - static REL::Relocation singleton{ REL::ID(520890) }; // TODO: Update + static REL::Relocation singleton{ REL::ID(2689089) }; return *singleton; } diff --git a/CommonLibF4/include/RE/Bethesda/MessageMenuManager.h b/CommonLibF4/include/RE/Bethesda/MessageMenuManager.h index d5aaff3a..06cd991f 100644 --- a/CommonLibF4/include/RE/Bethesda/MessageMenuManager.h +++ b/CommonLibF4/include/RE/Bethesda/MessageMenuManager.h @@ -88,7 +88,7 @@ namespace RE public: [[nodiscard]] static MessageMenuManager* GetSingleton() { - static REL::Relocation singleton{ REL::ID(959572) }; + static REL::Relocation singleton{ REL::ID(2689087) }; return *singleton; } @@ -104,7 +104,7 @@ namespace RE bool a_ensureUnique = false) { using func_t = decltype(&MessageMenuManager::Create); - static REL::Relocation func{ REL::ID(89563) }; + static REL::Relocation func{ REL::ID(2249456) }; return func(this, a_headerText, a_bodyText, a_callback, a_warningContext, a_button1Text, a_button2Text, a_button3Text, a_button4Text, a_ensureUnique); } diff --git a/CommonLibF4/include/RE/Bethesda/PipboyManager.h b/CommonLibF4/include/RE/Bethesda/PipboyManager.h index 7c79593b..c1ac0ff4 100644 --- a/CommonLibF4/include/RE/Bethesda/PipboyManager.h +++ b/CommonLibF4/include/RE/Bethesda/PipboyManager.h @@ -62,63 +62,56 @@ namespace RE [[nodiscard]] static PipboyManager* GetSingleton() { - static REL::Relocation singleton{ REL::ID(553234) }; + static REL::Relocation singleton{ REL::ID(2691945) }; return *singleton; } void AddMenuToPipboy(IMenu& a_menu, const NiRect& a_standVP, const NiRect& a_powerVP) { using func_t = decltype(&PipboyManager::AddMenuToPipboy); - static REL::Relocation func{ REL::ID(394568) }; + static REL::Relocation func{ REL::ID(2225453) }; return func(this, a_menu, a_standVP, a_powerVP); } void ClosedownPipboy() { using func_t = decltype(&PipboyManager::ClosedownPipboy); - static REL::Relocation func{ REL::ID(731410) }; - return func(this); - } - - void DisablePipboyShader() - { - using func_t = decltype(&PipboyManager::DisablePipboyShader); - static REL::Relocation func{ REL::ID(662519) }; + static REL::Relocation func{ REL::ID(2225480) }; return func(this); } void EnablePipboyShader() { using func_t = decltype(&PipboyManager::EnablePipboyShader); - static REL::Relocation func{ REL::ID(157921) }; + static REL::Relocation func{ REL::ID(2225484) }; return func(this); } void InitPipboy() { using func_t = decltype(&PipboyManager::InitPipboy); - static REL::Relocation func{ REL::ID(1477369) }; + static REL::Relocation func{ REL::ID(2225479) }; return func(this); } void LowerPipboy(LOWER_REASON a_reason) { using func_t = decltype(&PipboyManager::LowerPipboy); - static REL::Relocation func{ REL::ID(1444875) }; + static REL::Relocation func{ REL::ID(2225454) }; return func(this, a_reason); } void OnPipboyCloseAnim() { using func_t = decltype(&PipboyManager::OnPipboyCloseAnim); - static REL::Relocation func{ REL::ID(1231000) }; + static REL::Relocation func{ REL::ID(2225457) }; return func(this); } void OnPipboyCloseAnimFailed() { using func_t = decltype(&PipboyManager::OnPipboyCloseAnimFailed); - static REL::Relocation func{ REL::ID(1362084) }; + static REL::Relocation func{ REL::ID(2225459) }; return func(this); } diff --git a/CommonLibF4/include/RE/Bethesda/TESForms.h b/CommonLibF4/include/RE/Bethesda/TESForms.h index 94c15f6e..9e88d5fc 100644 --- a/CommonLibF4/include/RE/Bethesda/TESForms.h +++ b/CommonLibF4/include/RE/Bethesda/TESForms.h @@ -1765,12 +1765,12 @@ namespace RE CC_CHALLENGE_COUNT = 0x8, }; - enum CHARISMA_CHALLENGE_SUCCESS : std::uint32_t + enum CHARISMA_CHALLENGE_SUCCESS : int32_t { - CC_SUCCESS_NONE = 0xFFFFFFFF, - CC_SUCCESS_FAIL = 0x0, - CC_SUCCESS_SUCCEED = 0x1, - CC_SUCCESS_COUNT = 0x2, + CC_SUCCESS_FAIL = 0, + CC_SUCCESS_SUCCEED = 1, + CC_SUCCESS_COUNT = 2, + CC_SUCCESS_NONE = -1, }; // Returns nullptr if no parent. @@ -1781,9 +1781,9 @@ namespace RE return func(this); } - CHARISMA_CHALLENGE_DIFFICULTY GetSpeechChallengeLevel() + CHARISMA_CHALLENGE_DIFFICULTY GetChallengeLevel() { - using func_t = decltype(&TESTopicInfo::GetSpeechChallengeLevel); + using func_t = decltype(&TESTopicInfo::GetChallengeLevel); static REL::Relocation func{ REL::ID(2208441) }; return func(this); } @@ -2912,6 +2912,42 @@ namespace RE public IKeywordFormBase // 20 { public: + enum class FLAG + { + kBeginOnQuestStart = 0x0, + kStopQuestOnEnd = 0x1, + kShowAllTextInEditor = 0x2, + kRepeats = 0x3, + kInterruptible = 0x4, + kPlayerDialogue = 0x5, + kNoPlayerExitDialogue = 0x6, + kPlayerRadioStation = 0x7, + kBroadCastScene = 0x8, + kPauseActorsCurrentSceneinDialogue = 0x9, + kLookAhead = 0xA, + kAllowDialogueCamera = 0xB, + kNoFollowerIdleChatter = 0xC, + }; + + enum class BOOL_BITS + { + kActive = 0x1, + kPhaseActionDone = 0x2, + KPauseScene = 0x4, + kSceneScriptFinished = 0x8, + kNeedsToEnd = 0x10, + kRandom = 0x20, + kCombatPause = 0x40, + kDialoguePause = 0x80, + kObserveCombatPause = 0x100, + kPlayerWalkedAway = 0x200, + kNoUpdate = 0x400, + kInheritedPhases = 0x800, + kQueueActive = 0x100000, + kSceneJumpActive = 0x200000, + kGamePause = 0x400000, + }; + static constexpr auto RTTI{ RTTI::BGSScene }; static constexpr auto VTABLE{ VTABLE::BGSScene }; static constexpr auto FORM_ID{ ENUM_FORM_ID::kSCEN }; @@ -2934,6 +2970,20 @@ namespace RE float maxREFDistanceCenter; // D8 ObjectRefHandle targetRef; // DC bool shouldNotRotateToTrack; // E0 + + void ResetAllSceneActions() + { + using func_t = decltype(&BGSScene::ResetAllSceneActions); + static REL::Relocation func{ REL::ID(2206864) }; + return func(this); + } + + void SetSceneActive(bool abFlag) + { + using func_t = decltype(&BGSScene::SetSceneActive); + static REL::Relocation func{ REL::ID(2206845) }; + return func(this, abFlag); + } }; static_assert(sizeof(BGSScene) == 0xE8);