From 0738ecfd7cfd8a7fd2e0de8f6e84a0ffeabe15de Mon Sep 17 00:00:00 2001 From: ozooma10 <98544147+ozooma10@users.noreply.github.com> Date: Fri, 26 Jun 2026 14:06:46 -0400 Subject: [PATCH 1/4] add HideSubtitleEvent ShowSubtitleEvent ids. define ShowSubtitleEvent fields --- include/RE/E/Events.h | 5 +++++ include/RE/IDs.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/RE/E/Events.h b/include/RE/E/Events.h index edb998a6..5252cd16 100644 --- a/include/RE/E/Events.h +++ b/include/RE/E/Events.h @@ -3034,7 +3034,12 @@ namespace RE static REL::Relocation func{ ID::ShowSubtitleEvent::Event::GetEventSource }; return func(); } + + const char* subtitleText{ nullptr }; // 00 + const char* speakerName{ nullptr }; // 08 + bool isPlayer{ false }; // 10 }; + static_assert(sizeof(Event) == 0x18); }; struct SkillsMenu_Accept diff --git a/include/RE/IDs.h b/include/RE/IDs.h index 00495a2f..368ac68f 100644 --- a/include/RE/IDs.h +++ b/include/RE/IDs.h @@ -963,7 +963,7 @@ namespace RE::ID namespace HideSubtitleEvent::Event { - inline constexpr REL::ID GetEventSource{ 0 }; // 133630 + inline constexpr REL::ID GetEventSource{ 86875 }; } namespace HourPassed::Event @@ -1888,7 +1888,7 @@ namespace RE::ID namespace ShowSubtitleEvent::Event { - inline constexpr REL::ID GetEventSource{ 0 }; // 133631 + inline constexpr REL::ID GetEventSource{ 86874 }; } namespace SkillsMenu_Accept From 1ee60fb2870063f4fb093b6e5eeee73c0c0e1bb4 Mon Sep 17 00:00:00 2001 From: ozooma10 <98544147+ozooma10@users.noreply.github.com> Date: Fri, 26 Jun 2026 14:13:52 -0400 Subject: [PATCH 2/4] update BSTEventSource::Notify --- include/RE/B/BSTEvent.h | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/include/RE/B/BSTEvent.h b/include/RE/B/BSTEvent.h index 04290bae..878cb023 100644 --- a/include/RE/B/BSTEvent.h +++ b/include/RE/B/BSTEvent.h @@ -51,11 +51,12 @@ namespace RE public: ~BSTEventSource() override = default; // 00 - void Notify(void* a_event) + void Notify(const Event& a_event) { - using func_t = decltype(&BSTEventSource::Notify); + NotifyVisitor visitor{ &a_event, this }; + using func_t = void (*)(BSTEventSource*, void*); static REL::Relocation func{ ID::BSTEventSource::Notify }; - return func(this, a_event); + func(this, &visitor); } void RegisterSink(BSTEventSink* a_sink) @@ -78,6 +79,25 @@ namespace RE std::uint32_t unk1C; // 1C std::uint32_t unk20; // 20 std::uint32_t unk24; // 24 + + private: + struct NotifyVisitor + { + NotifyVisitor(const Event* a_event, BSTEventSource* a_source) noexcept : event(a_event), source(a_source) {} + + virtual ~NotifyVisitor() = default; // 00 + virtual void Unk01() {} // 01 + + virtual BSEventNotifyControl Invoke(BSTEventDetail::SinkBase* a_sink) // 02 + { + return static_cast*>(a_sink)->ProcessEvent(*event, source); + } + + // members + const Event* event; // 08 + BSTEventSource* source; // 10 + }; + }; static_assert(sizeof(BSTEventSource) == 0x28); From 58afbadd40f734e879c4e861262a5d64982ec4c5 Mon Sep 17 00:00:00 2001 From: ozooma10 <98544147+ozooma10@users.noreply.github.com> Date: Fri, 26 Jun 2026 14:19:19 -0400 Subject: [PATCH 3/4] BSPointerHandle.h GetSmartPointer retyped and update id --- include/RE/B/BSPointerHandle.h | 5 +++-- include/RE/IDs.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/RE/B/BSPointerHandle.h b/include/RE/B/BSPointerHandle.h index 77577005..c41da791 100644 --- a/include/RE/B/BSPointerHandle.h +++ b/include/RE/B/BSPointerHandle.h @@ -136,9 +136,10 @@ namespace RE public: static bool GetSmartPointer(const BSPointerHandle& a_in, NiPointer& a_out) { - using func_t = bool (*)(const BSPointerHandle& a_in, NiPointer& a_out); + using func_t = NiPointer& (*)(NiPointer& a_out, const BSPointerHandle& a_in); static REL::Relocation func{ ID::BSPointerHandleManagerInterface::GetSmartPointer }; - return func(a_in, a_out); + func(a_out, a_in); + return static_cast(a_out); } static NiPointer GetSmartPointer(const BSPointerHandle& a_in) diff --git a/include/RE/IDs.h b/include/RE/IDs.h index 368ac68f..e57103cb 100644 --- a/include/RE/IDs.h +++ b/include/RE/IDs.h @@ -278,7 +278,7 @@ namespace RE::ID namespace BSPointerHandleManagerInterface { - inline constexpr REL::ID GetSmartPointer{ 0 }; // 72432 + inline constexpr REL::ID GetSmartPointer{ 35638 }; } namespace BSReadWriteLock From c01ac7e2cd7a058ffc0e4f201eb4a3a4ad7bc802 Mon Sep 17 00:00:00 2001 From: ozooma10 <98544147+ozooma10@users.noreply.github.com> Date: Fri, 26 Jun 2026 14:22:49 -0400 Subject: [PATCH 4/4] Add SetCameraState and ToggleFreeCameraMode --- include/RE/IDs.h | 11 ++++++++++- include/RE/P/PlayerCamera.h | 7 +++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/RE/IDs.h b/include/RE/IDs.h index e57103cb..47ea2df3 100644 --- a/include/RE/IDs.h +++ b/include/RE/IDs.h @@ -926,6 +926,14 @@ namespace RE::ID inline constexpr REL::ID GetForForm{ 47393 }; // generic form-component lookup helper } + namespace FreeCameraInputContext + { + inline constexpr REL::ID Manager{ 938003 }; + inline constexpr REL::ID Descriptor{ 894502 }; + inline constexpr REL::ID PushContext{ 124144 }; + inline constexpr REL::ID PopContext{ 124143 }; + } + namespace GameMenuBase { inline constexpr REL::ID ctor{ 0 }; // 130577 @@ -1457,7 +1465,8 @@ namespace RE::ID inline constexpr REL::ID Singleton{ 937788 }; inline constexpr REL::ID ForceFirstPerson{ 113397 }; inline constexpr REL::ID ForceThirdPerson{ 113398 }; - inline constexpr REL::ID SetCameraState{ 0 }; // 166078 + inline constexpr REL::ID SetCameraState{ 113375 }; + inline constexpr REL::ID ToggleFreeCameraMode{ 113409 }; inline constexpr REL::ID QCameraEquals{ 0 }; // 166081 } diff --git a/include/RE/P/PlayerCamera.h b/include/RE/P/PlayerCamera.h index b30e91a5..787937b8 100644 --- a/include/RE/P/PlayerCamera.h +++ b/include/RE/P/PlayerCamera.h @@ -111,6 +111,13 @@ namespace RE return func(this, a_cameraState); } + void ToggleFreeCameraMode(std::uint32_t a_cameraStateIndex, bool a_flag) + { + using func_t = decltype(&PlayerCamera::ToggleFreeCameraMode); + static REL::Relocation func{ ID::PlayerCamera::ToggleFreeCameraMode }; + return func(this, a_cameraStateIndex, a_flag); + } + bool QCameraEquals(CameraState a_cameraState) const { return (currentState == cameraStates[a_cameraState]);