From 4d3375a3412c48cdde88f222aba99aa3b7516dfb Mon Sep 17 00:00:00 2001 From: Flenarn Date: Fri, 31 Jul 2026 22:55:07 +0200 Subject: [PATCH 01/18] chore: Library update. --- include/RE/E/ExtraLinkedRef.h | 31 +++++++++++++++++++++++++++++++ include/RE/F/FastTravelCommand.h | 19 +++++++++++++++++++ include/RE/IDs.h | 7 +++++++ include/RE/M/MapMarker.h | 12 ++++++++++++ include/RE/P/PipboyMapData.h | 7 +++++++ include/RE/P/PlayerCharacter.h | 7 +++++++ include/RE/T/TESWorldSpace.h | 7 +++++++ 7 files changed, 90 insertions(+) create mode 100644 include/RE/E/ExtraLinkedRef.h create mode 100644 include/RE/F/FastTravelCommand.h create mode 100644 include/RE/M/MapMarker.h diff --git a/include/RE/E/ExtraLinkedRef.h b/include/RE/E/ExtraLinkedRef.h new file mode 100644 index 000000000..142e3168c --- /dev/null +++ b/include/RE/E/ExtraLinkedRef.h @@ -0,0 +1,31 @@ +#pragma once + +#include "RE/B/BSExtraData.h" +#include "RE/B/BSTArray.h" + +namespace RE +{ + class BGSKeyword; + class TESObjectREFR; + + class __declspec(novtable) ExtraLinkedRef : + public BSExtraData // 00 + { + public: + static constexpr auto RTTI{ RTTI::ExtraLinkedRef }; + static constexpr auto VTABLE{ VTABLE::ExtraLinkedRef }; + static constexpr auto TYPE{ EXTRA_DATA_TYPE::kLinkedRef }; + + class LinkedRef + { + public: + BGSKeyword* keyword; // 00 + TESObjectREFR* REFR; // 08 + }; + + // members + BSTSmallArray linkedRefs; // 018 + bool transientRefs; // 038 + }; + static_assert(sizeof(ExtraLinkedRef) == 0x40); +} diff --git a/include/RE/F/FastTravelCommand.h b/include/RE/F/FastTravelCommand.h new file mode 100644 index 000000000..dab9addf2 --- /dev/null +++ b/include/RE/F/FastTravelCommand.h @@ -0,0 +1,19 @@ +#pragma once + +#include "RE/P/PipboyCommand.h" + +namespace RE +{ + class __declspec(novtable) FastTravelCommand : + public PipboyCommand // 000 + { + public: + static constexpr auto RTTI{ RTTI::FastTravelCommand }; + static constexpr auto VTABLE{ VTABLE::FastTravelCommand }; + + // members + uint32_t markerId; // 028 + }; + static_assert(sizeof(FastTravelCommand) == 0x30); + +} diff --git a/include/RE/IDs.h b/include/RE/IDs.h index efd5c3839..bc122780e 100644 --- a/include/RE/IDs.h +++ b/include/RE/IDs.h @@ -1683,6 +1683,11 @@ namespace RE::ID inline constexpr REL::ID UpdateCursorConstraint{ 2225488 }; } + namespace PipboyMapData + { + inline constexpr REL::ID GetTravelLocationRefr{ 2225515 }; + } + namespace PipboyMapMenu { inline constexpr REL::ID UpdateData{ 2224074 }; @@ -1807,6 +1812,7 @@ namespace RE::ID inline constexpr REL::ID HasLOSToTarget{ 2233004 }; inline constexpr REL::ID TryUnlockObject{ 2233040 }; inline constexpr REL::ID EnableRadio{ 2233211 }; + inline constexpr REL::ID UpdateAnimation{ 2233005 }; } namespace PlayerControls @@ -2332,6 +2338,7 @@ namespace RE::ID { inline constexpr REL::ID DefaultWater{ 4799138 }; inline constexpr REL::ID GetSkyCell{ 2202924 }; + inline constexpr REL::ID AdjustMapMarkerCoord{ 2202880 }; } namespace UI diff --git a/include/RE/M/MapMarker.h b/include/RE/M/MapMarker.h new file mode 100644 index 000000000..cd39f657e --- /dev/null +++ b/include/RE/M/MapMarker.h @@ -0,0 +1,12 @@ +#pragma once +namespace RE +{ + namespace MapMarker + { + enum class MARKER_SCOPE + { + kWorld = 0x0, + kLocal = 0x1 + }; + } +} diff --git a/include/RE/P/PipboyMapData.h b/include/RE/P/PipboyMapData.h index 0eeb634a7..c171568f0 100644 --- a/include/RE/P/PipboyMapData.h +++ b/include/RE/P/PipboyMapData.h @@ -84,6 +84,13 @@ namespace RE virtual void DoClearData() override; // 0C virtual void DoClearSink() override; // 0D + ObjectRefHandle GetTravelLocationRefr(ObjectRefHandle* a_result, std::uint32_t a_markerId) + { + using func_t = decltype(&PipboyMapData::GetTravelLocationRefr); + static REL::Relocation func{ ID::PipboyMapData::GetTravelLocationRefr }; + return func(this, a_result, a_markerId); + } + // members PipboyObject* mapObject; // E8 BSTHashMap travelLocationsMarkers; // F0 diff --git a/include/RE/P/PlayerCharacter.h b/include/RE/P/PlayerCharacter.h index 5b29c1b74..c97ec7bfc 100644 --- a/include/RE/P/PlayerCharacter.h +++ b/include/RE/P/PlayerCharacter.h @@ -320,6 +320,13 @@ namespace RE return func(this, a_enable); } + void UpdateAnimation(float a_delta) + { + using func_t = decltype(&PlayerCharacter::UpdateAnimation); + static REL::Relocation func{ ID::PlayerCharacter::UpdateAnimation }; + return func(this, a_delta); + } + // members BSSpinLock actorToDisplayOnHUDLock; // 628 BSSpinLock questTargetLock; // 630 diff --git a/include/RE/T/TESWorldSpace.h b/include/RE/T/TESWorldSpace.h index 9c63ac819..bce070dbb 100644 --- a/include/RE/T/TESWorldSpace.h +++ b/include/RE/T/TESWorldSpace.h @@ -91,6 +91,13 @@ namespace RE } } + [[nodiscard]] void AdjustMapMarkerCoord(NiPoint3* a_mapCoord, bool a_inverse) + { + using func_t = decltype(&TESWorldSpace::AdjustMapMarkerCoord); + static REL::Relocation func{ ID::TESWorldSpace::AdjustMapMarkerCoord }; + return func(this, a_mapCoord, a_inverse) + } + // members BSTHashMap cellMap; // 0x040 TESObjectCELL* persistentCell; // 0x070 From 360d71324bee888d1d07821175a52e779673d4aa Mon Sep 17 00:00:00 2001 From: FlenarnDev Date: Fri, 31 Jul 2026 20:55:39 +0000 Subject: [PATCH 02/18] maintenance --- include/RE/Fallout.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/RE/Fallout.h b/include/RE/Fallout.h index 02ab25f99..14cfd788a 100644 --- a/include/RE/Fallout.h +++ b/include/RE/Fallout.h @@ -667,6 +667,7 @@ #include "RE/E/ExtraInstanceData.h" #include "RE/E/ExtraLeveledCreature.h" #include "RE/E/ExtraLight.h" +#include "RE/E/ExtraLinkedRef.h" #include "RE/E/ExtraLocation.h" #include "RE/E/ExtraLock.h" #include "RE/E/ExtraMapMarker.h" @@ -694,6 +695,7 @@ #include "RE/F/FORM.h" #include "RE/F/FORM_ENUM_STRING.h" #include "RE/F/FUNCTION_DATA.h" +#include "RE/F/FastTravelCommand.h" #include "RE/F/FatmanDeaths.h" #include "RE/F/FavoriteMgr_Events.h" #include "RE/F/FavoritesManager.h" @@ -952,6 +954,7 @@ #include "RE/M/MagicTarget.h" #include "RE/M/Main.h" #include "RE/M/MainMenu.h" +#include "RE/M/MapMarker.h" #include "RE/M/MapMarkerData.h" #include "RE/M/MarkerIconTypes.h" #include "RE/M/MeleeThrowHandler.h" From 432feb41181268488919842c51e74d310dc8f0b1 Mon Sep 17 00:00:00 2001 From: Flenarn Date: Fri, 31 Jul 2026 23:00:00 +0200 Subject: [PATCH 03/18] chore: Fix compile and missed file. --- include/RE/E/EXTRA_DATA_TYPE.h | 2 +- include/RE/T/TESWorldSpace.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/RE/E/EXTRA_DATA_TYPE.h b/include/RE/E/EXTRA_DATA_TYPE.h index 139ecb2e8..db6b2417e 100644 --- a/include/RE/E/EXTRA_DATA_TYPE.h +++ b/include/RE/E/EXTRA_DATA_TYPE.h @@ -84,7 +84,7 @@ namespace RE kNoRumors, // kSound, // kTerminalState, // - kLinkedRef, // + kLinkedRef, // ExtraLinkedRef kLinkedRefChildren, // kActivateRef, // kActivateRefChildren, // diff --git a/include/RE/T/TESWorldSpace.h b/include/RE/T/TESWorldSpace.h index bce070dbb..564a51889 100644 --- a/include/RE/T/TESWorldSpace.h +++ b/include/RE/T/TESWorldSpace.h @@ -96,7 +96,7 @@ namespace RE using func_t = decltype(&TESWorldSpace::AdjustMapMarkerCoord); static REL::Relocation func{ ID::TESWorldSpace::AdjustMapMarkerCoord }; return func(this, a_mapCoord, a_inverse) - } + }; // members BSTHashMap cellMap; // 0x040 From 564fec7617f01850c52ec00f0204e74db18f26db Mon Sep 17 00:00:00 2001 From: Flenarn Date: Fri, 31 Jul 2026 23:02:25 +0200 Subject: [PATCH 04/18] fix --- include/RE/T/TESWorldSpace.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/RE/T/TESWorldSpace.h b/include/RE/T/TESWorldSpace.h index 564a51889..520eeacd2 100644 --- a/include/RE/T/TESWorldSpace.h +++ b/include/RE/T/TESWorldSpace.h @@ -95,8 +95,8 @@ namespace RE { using func_t = decltype(&TESWorldSpace::AdjustMapMarkerCoord); static REL::Relocation func{ ID::TESWorldSpace::AdjustMapMarkerCoord }; - return func(this, a_mapCoord, a_inverse) - }; + return func(this, a_mapCoord, a_inverse); + } // members BSTHashMap cellMap; // 0x040 From 1efad3d996509cf60d431b37389781aa971f91da Mon Sep 17 00:00:00 2001 From: Flenarn Date: Sat, 1 Aug 2026 00:10:02 +0200 Subject: [PATCH 05/18] feat: More ExtraData. --- include/RE/E/ExtraCellSkyRegion.h | 20 +++++++++++++++++ include/RE/E/ExtraLinkedRefChildren.h | 31 +++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 include/RE/E/ExtraCellSkyRegion.h create mode 100644 include/RE/E/ExtraLinkedRefChildren.h diff --git a/include/RE/E/ExtraCellSkyRegion.h b/include/RE/E/ExtraCellSkyRegion.h new file mode 100644 index 000000000..7c3654d4b --- /dev/null +++ b/include/RE/E/ExtraCellSkyRegion.h @@ -0,0 +1,20 @@ +#pragma once + +#include "RE/B/BSExtraData.h" + +namespace RE +{ + class TESRegion; + + class __declspec(novtable) ExtraCellSkyRegion : + public BSExtraData // 00 + { + static constexpr auto RTTI{ RTTI::ExtraCellSkyRegion }; + static constexpr auto VTABLE{ VTABLE::ExtraCellSkyRegion }; + static constexpr auto TYPE{ EXTRA_DATA_TYPE::kSkyRegion }; + + // members + TESRegion* skyRegion; // 18 + }; + static_assert(sizeof(ExtraCellSkyRegion) == 0x20); +} diff --git a/include/RE/E/ExtraLinkedRefChildren.h b/include/RE/E/ExtraLinkedRefChildren.h new file mode 100644 index 000000000..a248cfc04 --- /dev/null +++ b/include/RE/E/ExtraLinkedRefChildren.h @@ -0,0 +1,31 @@ +#pragma once + +#include "RE/B/BSExtraData.h" +#include "RE/B/BSPointerHandle.h" +#include "RE/B/BSTArray.h" + +namespace RE +{ + class BGSKeyword; + class TESObjectREFR; + + class __declspec(novtable) ExtraLinkedRefChildren : + public BSExtraData // 00 + { + public: + static constexpr auto RTTI{ RTTI::ExtraLinkedRefChildren }; + static constexpr auto VTABLE{ VTABLE::ExtraLinkedRefChildren }; + static constexpr auto TYPE{ EXTRA_DATA_TYPE::kLinkedRefChildren }; + + class LinkedRefChild + { + public: + BGSKeyword* keyword; // 00 + ObjectRefHandle REFR; // 08 + }; + + // members + BSTSmallArray linkedChildren; // 018 + }; + static_assert(sizeof(ExtraLinkedRefChildren) == 0x38); +} From 2c840a402d2af4c254ade8b624d18bdd576e3daa Mon Sep 17 00:00:00 2001 From: FlenarnDev Date: Fri, 31 Jul 2026 22:10:31 +0000 Subject: [PATCH 06/18] maintenance --- include/RE/E/ExtraCellSkyRegion.h | 4 ++-- include/RE/E/ExtraLinkedRefChildren.h | 4 ++-- include/RE/Fallout.h | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/RE/E/ExtraCellSkyRegion.h b/include/RE/E/ExtraCellSkyRegion.h index 7c3654d4b..fb1ddda6e 100644 --- a/include/RE/E/ExtraCellSkyRegion.h +++ b/include/RE/E/ExtraCellSkyRegion.h @@ -7,14 +7,14 @@ namespace RE class TESRegion; class __declspec(novtable) ExtraCellSkyRegion : - public BSExtraData // 00 + public BSExtraData // 00 { static constexpr auto RTTI{ RTTI::ExtraCellSkyRegion }; static constexpr auto VTABLE{ VTABLE::ExtraCellSkyRegion }; static constexpr auto TYPE{ EXTRA_DATA_TYPE::kSkyRegion }; // members - TESRegion* skyRegion; // 18 + TESRegion* skyRegion; // 18 }; static_assert(sizeof(ExtraCellSkyRegion) == 0x20); } diff --git a/include/RE/E/ExtraLinkedRefChildren.h b/include/RE/E/ExtraLinkedRefChildren.h index a248cfc04..1e1e30f23 100644 --- a/include/RE/E/ExtraLinkedRefChildren.h +++ b/include/RE/E/ExtraLinkedRefChildren.h @@ -10,7 +10,7 @@ namespace RE class TESObjectREFR; class __declspec(novtable) ExtraLinkedRefChildren : - public BSExtraData // 00 + public BSExtraData // 00 { public: static constexpr auto RTTI{ RTTI::ExtraLinkedRefChildren }; @@ -25,7 +25,7 @@ namespace RE }; // members - BSTSmallArray linkedChildren; // 018 + BSTSmallArray linkedChildren; // 018 }; static_assert(sizeof(ExtraLinkedRefChildren) == 0x38); } diff --git a/include/RE/Fallout.h b/include/RE/Fallout.h index 14cfd788a..e4c0c5ff8 100644 --- a/include/RE/Fallout.h +++ b/include/RE/Fallout.h @@ -657,6 +657,7 @@ #include "RE/E/ExtraAliasInstanceArray.h" #include "RE/E/ExtraAmmo.h" #include "RE/E/ExtraBendableSplineParams.h" +#include "RE/E/ExtraCellSkyRegion.h" #include "RE/E/ExtraCellWaterType.h" #include "RE/E/ExtraCharge.h" #include "RE/E/ExtraDataList.h" @@ -668,6 +669,7 @@ #include "RE/E/ExtraLeveledCreature.h" #include "RE/E/ExtraLight.h" #include "RE/E/ExtraLinkedRef.h" +#include "RE/E/ExtraLinkedRefChildren.h" #include "RE/E/ExtraLocation.h" #include "RE/E/ExtraLock.h" #include "RE/E/ExtraMapMarker.h" From dcdaba7b7124121f30969e69f3d8dace78faf0c6 Mon Sep 17 00:00:00 2001 From: Flenarn Date: Sat, 1 Aug 2026 20:00:03 +0200 Subject: [PATCH 07/18] fix: Cleanup. --- include/RE/E/EXTRA_DATA_TYPE.h | 6 +++--- include/RE/T/TESWorldSpace.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/RE/E/EXTRA_DATA_TYPE.h b/include/RE/E/EXTRA_DATA_TYPE.h index db6b2417e..3225a8188 100644 --- a/include/RE/E/EXTRA_DATA_TYPE.h +++ b/include/RE/E/EXTRA_DATA_TYPE.h @@ -12,7 +12,7 @@ namespace RE kSeenData, // kEditorID, // ExtraEditorID kCellMusicType, // - kSkyRegion, // + kSkyRegion, // ExtraCellSkyRegion kCellMidLowProcess, // kCellDetachTime, // kPersistentCell, // @@ -48,7 +48,7 @@ namespace RE kLight, // ExtraLight kLock, // ExtraLock kTeleport, // ExtraTeleport - kMapMarker, // + kMapMarker, // ExtraMapMarker kLeveledCreature, // ExtraLeveledCreature kLevelItem, // kScale, // @@ -85,7 +85,7 @@ namespace RE kSound, // kTerminalState, // kLinkedRef, // ExtraLinkedRef - kLinkedRefChildren, // + kLinkedRefChildren, // ExtraLinkedRefChildren kActivateRef, // kActivateRefChildren, // kTalkToPlayer, // diff --git a/include/RE/T/TESWorldSpace.h b/include/RE/T/TESWorldSpace.h index 520eeacd2..b899cce5f 100644 --- a/include/RE/T/TESWorldSpace.h +++ b/include/RE/T/TESWorldSpace.h @@ -91,7 +91,7 @@ namespace RE } } - [[nodiscard]] void AdjustMapMarkerCoord(NiPoint3* a_mapCoord, bool a_inverse) + void AdjustMapMarkerCoord(NiPoint3* a_mapCoord, bool a_inverse) { using func_t = decltype(&TESWorldSpace::AdjustMapMarkerCoord); static REL::Relocation func{ ID::TESWorldSpace::AdjustMapMarkerCoord }; From f7ce347bec7b802f16d356eb9ff400309aa49378 Mon Sep 17 00:00:00 2001 From: Flenarn Date: Sun, 2 Aug 2026 09:05:18 +0200 Subject: [PATCH 08/18] feat: HandlePositionPlayerRequest --- include/RE/IDs.h | 1 + include/RE/P/PlayerCharacter.h | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/RE/IDs.h b/include/RE/IDs.h index bc122780e..eecd2b5fd 100644 --- a/include/RE/IDs.h +++ b/include/RE/IDs.h @@ -1813,6 +1813,7 @@ namespace RE::ID inline constexpr REL::ID TryUnlockObject{ 2233040 }; inline constexpr REL::ID EnableRadio{ 2233211 }; inline constexpr REL::ID UpdateAnimation{ 2233005 }; + inline constexpr REL::ID HandlePositionPlayerRequest{ 2232905 }; } namespace PlayerControls diff --git a/include/RE/P/PlayerCharacter.h b/include/RE/P/PlayerCharacter.h index c97ec7bfc..b04ee798e 100644 --- a/include/RE/P/PlayerCharacter.h +++ b/include/RE/P/PlayerCharacter.h @@ -327,6 +327,13 @@ namespace RE return func(this, a_delta); } + char HandlePositionPlayerRequest() + { + using func_t = decltype(&PlayerCharacter::HandlePositionPlayerRequest); + static REL::Relocation func{ ID::PlayerCharacter::HandlePositionPlayerRequest }; + return func(this); + } + // members BSSpinLock actorToDisplayOnHUDLock; // 628 BSSpinLock questTargetLock; // 630 From e9bc99d93949b02fbe43a9ca9b079e2dbe4e37b5 Mon Sep 17 00:00:00 2001 From: Flenarn Date: Sun, 2 Aug 2026 09:59:51 +0200 Subject: [PATCH 09/18] chore: Update CommonLib-Shared --- lib/commonlib-shared | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/commonlib-shared b/lib/commonlib-shared index 710b88dc6..af93af74e 160000 --- a/lib/commonlib-shared +++ b/lib/commonlib-shared @@ -1 +1 @@ -Subproject commit 710b88dc65308680ca0803b7775aac6e477b4b0f +Subproject commit af93af74e9a572aa2af9b10ea9fdd73bf80b3c9c From cdbef9819144465b527f80f3e7010be8a580e172 Mon Sep 17 00:00:00 2001 From: Flenarn Date: Sun, 2 Aug 2026 10:02:31 +0200 Subject: [PATCH 10/18] chore: Update CommonLib-Shared. --- lib/commonlib-shared | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/commonlib-shared b/lib/commonlib-shared index af93af74e..710b88dc6 160000 --- a/lib/commonlib-shared +++ b/lib/commonlib-shared @@ -1 +1 @@ -Subproject commit af93af74e9a572aa2af9b10ea9fdd73bf80b3c9c +Subproject commit 710b88dc65308680ca0803b7775aac6e477b4b0f From 9c8938457e434d6a30be3f33d984c651ddaff2e1 Mon Sep 17 00:00:00 2001 From: Flenarn Date: Sun, 2 Aug 2026 13:51:20 +0200 Subject: [PATCH 11/18] chore: Misc. RE work. --- include/RE/B/BGSTerrainManager.h | 79 ++++++++++++++++++++++++++++++++ include/RE/Fallout.h | 1 + include/RE/IDs.h | 21 +++++++++ include/RE/M/Main.h | 16 ++++++- include/RE/N/NiCullingProcess.h | 9 ++++ include/RE/N/NiFrustum.h | 12 ++--- include/RE/T/TES.h | 8 ++++ 7 files changed, 138 insertions(+), 8 deletions(-) create mode 100644 include/RE/B/BGSTerrainManager.h diff --git a/include/RE/B/BGSTerrainManager.h b/include/RE/B/BGSTerrainManager.h new file mode 100644 index 000000000..3122563b5 --- /dev/null +++ b/include/RE/B/BGSTerrainManager.h @@ -0,0 +1,79 @@ +#pragma once + +#include "RE/B/BSSpinLock.h" +#include "RE/B/BSTArray.h" +#include "RE/N/NiPoint2.h" +#include "RE/N/NiPoint3.h" + +namespace RE +{ + class BGSTerrainNode; + class NiCamera; + class TESWorldSpace; + + class BGSTerrainManager + { + public: + class CullState + { + public: + bool cullRoot; // 00 + bool cullLand; // 01 + bool cullTrees; // 02 + bool cullObjects; // 03 + bool cullInstanced; // 04 + }; + + class QuickCullDAta + { + public: + NiPoint2 frustNearLeft; // 000 + NiPoint2 frustFarLeft; // 008 + NiPoint2 frustNearRight; // 010 + NiPoint2 frustFarRight; // 018 + }; + + void RecomputeQuickCullData(const NiCamera* a_camera) + { + using func_t = decltype(&BGSTerrainManager::RecomputeQuickCullData); + static REL::Relocation func{ ID::BGSTerrainManager::RecomputeQuickCullData }; + return func(this, a_camera); + } + + // members + bool mapMode; // 000 + TESWorldSpace* world; // 008 + BGSTerrainNode* rootNode; // 010 + std::int16_t minCellX; // 018 + std::int16_t minCellY; // 01A + std::uint32_t maxLevel; // 01C + std::uint32_t minLevel; // 020 + std::uint32_t rootLevel; // 024 + std::uint32_t segmentedBlockLevel; // 028 + std::uint32_t treeLevel; // 02C + CullState savedCullState; // 030 + CullState activeCullState; // 035 + bool cullActive; // 03A + bool needsImmediateUpdate; // 03B + bool initialUpdateDone; // 03C + bool hasLOD; // 03D + QuickCullDAta cullData; // 040 + bool staticDataLoaded; // 060 + BSTArray updateUpdates; // 068 + std::uint32_t nextUpdateNode; // 080 + BSTArray immediateUpdates; // 088 + BSSpinLock immediateUpdateLock; // 0A0 + bool lockedLOD; // 0A8 + std::uint32_t lockedTerrainLOD; // 0AC + std::uint32_t lockedObjectLOD; // 0B0 + std::uint32_t totalChildNodes; // 0B4 + std::uint8_t* childNodeBufferStart; // 0B8 + std::uint8_t* childNodeBufferCurr; // 0C0 + std::uint8_t* childNodeBufferEnd; // 0C8 + std::uint32_t nodeCount; // 0D0 + std::uint32_t loadedRectUpdateDelay; // 0D4 + NiPoint3 interiorAdjustedOffset; // 0D8 + BSTArray fadeNodeA; // 0E8 + }; + static_assert(sizeof(BGSTerrainManager) == 0x100); +} diff --git a/include/RE/Fallout.h b/include/RE/Fallout.h index 38e8374a2..03c13219b 100644 --- a/include/RE/Fallout.h +++ b/include/RE/Fallout.h @@ -490,6 +490,7 @@ #include "RE/B/BSTempEffectUtil.h" #include "RE/B/BSTempEffectWeaponBlood.h" #include "RE/B/BSTerrainEffect.h" +#include "RE/B/BGSTerrainManager.h" #include "RE/B/BSTextureDB.h" #include "RE/B/BSTextureSet.h" #include "RE/B/BSTextureStreamer.h" diff --git a/include/RE/IDs.h b/include/RE/IDs.h index ae08f78c6..0e2a4be6a 100644 --- a/include/RE/IDs.h +++ b/include/RE/IDs.h @@ -432,6 +432,11 @@ namespace RE::ID inline constexpr REL::ID Activate{ 2197778 }; } + namespace BGSTerrainManager + { + inline constexpr REL::ID RecomputeQuickCullData{ 2213622 }; + } + namespace bhkCharacterController { inline constexpr REL::ID Jump{ 2278191 }; @@ -517,6 +522,13 @@ namespace RE::ID inline constexpr REL::ID Singleton{ 2255115 }; } + namespace BSCullingProcess + { + inline constexpr REL::ID Process1{ 2275931 }; + inline constexpr REL::ID Process2{ 2275932 }; + } + + namespace BSGFxDisplayObject { inline constexpr REL::ID RemoveChild{ 2287327 }; @@ -1460,6 +1472,9 @@ namespace RE::ID inline constexpr REL::ID QGameSystemsShouldUpdate{ 2698031 }; inline constexpr REL::ID QGameDataLoaded{ 2698032 }; inline constexpr REL::ID SetCameraFOV{ 2228973 }; + inline constexpr REL::ID LandLODRoot{ 2698035 }; + inline constexpr REL::ID ObjectLODRoot{ 2698036 }; + inline constexpr REL::ID WorldRootNode{ 2698065 }; } namespace MapMarkerData @@ -1557,6 +1572,11 @@ namespace RE::ID inline constexpr REL::ID Activate{ 2271861 }; } + namespace NiCullingProcess + { + inline constexpr REL::ID SetFrustum{ 2270782 }; + } + namespace NiMatrix3 { inline constexpr REL::ID ToEulerAnglesXYZ{ 2269806 }; @@ -2015,6 +2035,7 @@ namespace RE::ID namespace TES { inline constexpr REL::ID Singleton{ 2698044 }; + inline constexpr REL::ID UpdateMultiBoundVisibility{ 2192134 }; } namespace TESActivateEvent diff --git a/include/RE/M/Main.h b/include/RE/M/Main.h index 82eaa50a4..b77bb971f 100644 --- a/include/RE/M/Main.h +++ b/include/RE/M/Main.h @@ -38,9 +38,9 @@ namespace RE return func(); } - [[nodiscard]] static SceneGraph* WorldRootNode() + [[nodiscard]] static SceneGraph* GetWorldRootNode() { - static REL::Relocation*> nodePtr{ ID::Main::WorldRootCamera }; + static REL::Relocation*> nodePtr{ ID::Main::WorldRootNode }; return nodePtr->get(); } @@ -63,6 +63,18 @@ namespace RE return func(this, a_fov); } + inline static NiNode* GetLandLODRoot() + { + static REL::Relocation value{ ID::Main::LandLODRoot }; + return value.get(); + } + + inline static NiNode* GetObjectLODRoot() + { + static REL::Relocation value{ ID::Main::ObjectLODRoot }; + return value.get(); + } + // members BSTArray> sortedVisibleHighActors; // 08 std::uint32_t localMapRenderDelay; // 20 diff --git a/include/RE/N/NiCullingProcess.h b/include/RE/N/NiCullingProcess.h index a73a457f6..1c553f044 100644 --- a/include/RE/N/NiCullingProcess.h +++ b/include/RE/N/NiCullingProcess.h @@ -4,6 +4,8 @@ namespace RE { + class NiFrustum; + class __declspec(novtable) NiCullingProcess { public: @@ -41,6 +43,13 @@ namespace RE virtual void Process(const NiCamera* a_camera, NiAVObject* a_scene, NiVisibleArray* a_visibleSet); // 1A virtual void AppendVirtual(BSGeometry* a_visible); // 1B + void SetFrustum(const NiFrustum* a_frustum) + { + using func_t = decltype(&NiCullingProcess::SetFrustum); + static REL::Relocation func{ ID::NiCullingProcess::SetFrustum }; + return func(this, a_frustum); + } + // members bool useVirtualAppend; // 08 NiVisibleArray* visibleSet; // 10 diff --git a/include/RE/N/NiFrustum.h b/include/RE/N/NiFrustum.h index 59bce8579..ffe4520ba 100644 --- a/include/RE/N/NiFrustum.h +++ b/include/RE/N/NiFrustum.h @@ -5,12 +5,12 @@ namespace RE class NiFrustum { public: - float left; // 00 - float right; // 04 - float top; // 08 - float bottom; // 0C - float near; // 10 - float far; // 14 + float fLeft; // 00 + float fRight; // 04 + float fTop; // 08 + float fBottom; // 0C + float fNear; // 10 + float fFar; // 14 bool ortho; // 18 }; static_assert(sizeof(NiFrustum) == 0x1C); diff --git a/include/RE/T/TES.h b/include/RE/T/TES.h index 9993fa99d..710e370d3 100644 --- a/include/RE/T/TES.h +++ b/include/RE/T/TES.h @@ -9,6 +9,7 @@ namespace RE { + class BSCullingProcess; class GridCellArray; class GridDistantArray; class ImageSpaceModifierInstance; @@ -107,6 +108,13 @@ namespace RE void ForEachReferenceInRange(const NiPoint3& a_origin, const float a_radius, std::function a_callback); void ForEachReferenceInRange(const TESObjectREFR* a_ref, const float a_radius, std::function a_callback); + void UpdateMultiBoundVisibility(BSCullingProcess* a_cullingProcess) + { + using func_t = decltype(&TES::UpdateMultiBoundVisibility); + static REL::Relocation func{ ID::TES::UpdateMultiBoundVisibility }; + return func(this, a_cullingProcess); + } + // members GridDistantArray* gridDistant; // 010 GridCellArray* gridCells; // 018 From d231b7359c65d7b588b54ba6c8d3a4eb2ff0da7d Mon Sep 17 00:00:00 2001 From: Flenarn Date: Sun, 2 Aug 2026 13:52:34 +0200 Subject: [PATCH 12/18] fix: Remove duplicate ID entry. --- include/RE/IDs.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/RE/IDs.h b/include/RE/IDs.h index 0e2a4be6a..5c6b8918b 100644 --- a/include/RE/IDs.h +++ b/include/RE/IDs.h @@ -1474,7 +1474,6 @@ namespace RE::ID inline constexpr REL::ID SetCameraFOV{ 2228973 }; inline constexpr REL::ID LandLODRoot{ 2698035 }; inline constexpr REL::ID ObjectLODRoot{ 2698036 }; - inline constexpr REL::ID WorldRootNode{ 2698065 }; } namespace MapMarkerData From adef562c84e44525fea8cfb66e42ff49cdcd8d16 Mon Sep 17 00:00:00 2001 From: FlenarnDev Date: Sun, 2 Aug 2026 14:08:30 +0000 Subject: [PATCH 13/18] maintenance --- include/RE/Fallout.h | 2 +- include/RE/IDs.h | 1 - include/RE/N/NiFrustum.h | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/RE/Fallout.h b/include/RE/Fallout.h index 03c13219b..7681dd3e5 100644 --- a/include/RE/Fallout.h +++ b/include/RE/Fallout.h @@ -230,6 +230,7 @@ #include "RE/B/BGSSynchronizedAnimationManager.h" #include "RE/B/BGSTalkingActivator.h" #include "RE/B/BGSTerminal.h" +#include "RE/B/BGSTerrainManager.h" #include "RE/B/BGSTextureModel.h" #include "RE/B/BGSTextureSet.h" #include "RE/B/BGSTopicSubtypeUnion.h" @@ -490,7 +491,6 @@ #include "RE/B/BSTempEffectUtil.h" #include "RE/B/BSTempEffectWeaponBlood.h" #include "RE/B/BSTerrainEffect.h" -#include "RE/B/BGSTerrainManager.h" #include "RE/B/BSTextureDB.h" #include "RE/B/BSTextureSet.h" #include "RE/B/BSTextureStreamer.h" diff --git a/include/RE/IDs.h b/include/RE/IDs.h index 5c6b8918b..5a5fd067e 100644 --- a/include/RE/IDs.h +++ b/include/RE/IDs.h @@ -528,7 +528,6 @@ namespace RE::ID inline constexpr REL::ID Process2{ 2275932 }; } - namespace BSGFxDisplayObject { inline constexpr REL::ID RemoveChild{ 2287327 }; diff --git a/include/RE/N/NiFrustum.h b/include/RE/N/NiFrustum.h index ffe4520ba..20f2a4f1f 100644 --- a/include/RE/N/NiFrustum.h +++ b/include/RE/N/NiFrustum.h @@ -11,7 +11,7 @@ namespace RE float fBottom; // 0C float fNear; // 10 float fFar; // 14 - bool ortho; // 18 + bool ortho; // 18 }; static_assert(sizeof(NiFrustum) == 0x1C); } From a6526c056eeb21430c4b518ce02ba8890a247394 Mon Sep 17 00:00:00 2001 From: Flenarn Date: Sun, 2 Aug 2026 17:49:33 +0200 Subject: [PATCH 14/18] fix: SetLinkedRef declaration. --- include/RE/T/TESObjectREFR.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/RE/T/TESObjectREFR.h b/include/RE/T/TESObjectREFR.h index 2baab0030..fefea4c64 100644 --- a/include/RE/T/TESObjectREFR.h +++ b/include/RE/T/TESObjectREFR.h @@ -494,11 +494,11 @@ namespace RE return func(this, a_point); } - void SetLinkedRef(Actor* a_actor, BGSKeyword* a_keyword) + void SetLinkedRef(TESObjectREFR* a_ref, BGSKeyword* a_keyword) { using func_t = decltype(&TESObjectREFR::SetLinkedRef); static REL::Relocation func{ ID::TESObjectREFR::SetLinkedRef }; - return func(this, a_actor, a_keyword); + return func(this, a_ref, a_keyword); } void SetLocationOnReference(const NiPoint3& a_point) From 8a45bab400efa87a814f5669305f35e56f064f66 Mon Sep 17 00:00:00 2001 From: Flenarn Date: Wed, 5 Aug 2026 14:17:39 +0200 Subject: [PATCH 15/18] fix: Corrections from review. --- include/RE/M/MapMarker.h | 1 + include/RE/N/NiFrustum.h | 14 +++++++------- include/RE/P/PlayerCharacter.h | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/RE/M/MapMarker.h b/include/RE/M/MapMarker.h index cd39f657e..996a5822b 100644 --- a/include/RE/M/MapMarker.h +++ b/include/RE/M/MapMarker.h @@ -1,4 +1,5 @@ #pragma once + namespace RE { namespace MapMarker diff --git a/include/RE/N/NiFrustum.h b/include/RE/N/NiFrustum.h index 20f2a4f1f..59bce8579 100644 --- a/include/RE/N/NiFrustum.h +++ b/include/RE/N/NiFrustum.h @@ -5,13 +5,13 @@ namespace RE class NiFrustum { public: - float fLeft; // 00 - float fRight; // 04 - float fTop; // 08 - float fBottom; // 0C - float fNear; // 10 - float fFar; // 14 - bool ortho; // 18 + float left; // 00 + float right; // 04 + float top; // 08 + float bottom; // 0C + float near; // 10 + float far; // 14 + bool ortho; // 18 }; static_assert(sizeof(NiFrustum) == 0x1C); } diff --git a/include/RE/P/PlayerCharacter.h b/include/RE/P/PlayerCharacter.h index b04ee798e..38b847633 100644 --- a/include/RE/P/PlayerCharacter.h +++ b/include/RE/P/PlayerCharacter.h @@ -327,7 +327,7 @@ namespace RE return func(this, a_delta); } - char HandlePositionPlayerRequest() + bool HandlePositionPlayerRequest() { using func_t = decltype(&PlayerCharacter::HandlePositionPlayerRequest); static REL::Relocation func{ ID::PlayerCharacter::HandlePositionPlayerRequest }; From bbd4c67fb0c7bec28e27212472ef4f9ffb2246db Mon Sep 17 00:00:00 2001 From: Flenarn Date: Fri, 7 Aug 2026 09:26:49 +0200 Subject: [PATCH 16/18] fix: SceneGraph members now public. chore: NiCamera ctor ID. --- include/RE/IDs.h | 1 + include/RE/S/SceneGraph.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/RE/IDs.h b/include/RE/IDs.h index 5a5fd067e..72eddd7c7 100644 --- a/include/RE/IDs.h +++ b/include/RE/IDs.h @@ -1557,6 +1557,7 @@ namespace RE::ID inline constexpr REL::ID BoundInFrustum{ 2194525 }; inline constexpr REL::ID WorldPtToScreenPt3{ 2270344 }; inline constexpr REL::ID ViewPointToRay{ 2270338 }; + inline constexpr REL::ID ctor{ 2270332 }; } namespace NiControllerManager diff --git a/include/RE/S/SceneGraph.h b/include/RE/S/SceneGraph.h index 046f6d71d..93b2abb4f 100644 --- a/include/RE/S/SceneGraph.h +++ b/include/RE/S/SceneGraph.h @@ -5,6 +5,7 @@ namespace RE class __declspec(novtable) SceneGraph : public BSSceneGraph // 000 { + public: static constexpr auto RTTI{ RTTI::SceneGraph }; static constexpr auto VTABLE{ VTABLE::SceneGraph }; static constexpr auto Ni_RTTI{ Ni_RTTI::SceneGraph }; From 5216ec64952c830dfe5e735aba67d502051eebc9 Mon Sep 17 00:00:00 2001 From: Flenarn Date: Sat, 22 Aug 2026 12:11:53 +0200 Subject: [PATCH 17/18] feat: Runtime support for 1.11.240. --- include/F4SE/Version.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/F4SE/Version.h b/include/F4SE/Version.h index 67c0b446e..0dcb6e286 100644 --- a/include/F4SE/Version.h +++ b/include/F4SE/Version.h @@ -59,6 +59,7 @@ namespace F4SE inline constexpr REL::Version RUNTIME_1_11_169{ 1, 11, 169, 0 }; inline constexpr REL::Version RUNTIME_1_11_191{ 1, 11, 191, 0 }; inline constexpr REL::Version RUNTIME_1_11_221{ 1, 11, 221, 0 }; + inline constexpr REL::Version RUNTIME_1_11_240{ 1, 11, 240, 0 }; - inline constexpr auto RUNTIME_LATEST = RUNTIME_1_11_221; + inline constexpr auto RUNTIME_LATEST = RUNTIME_1_11_240; } From ab53ab2770395cd464c0e06c57e090df6795ed91 Mon Sep 17 00:00:00 2001 From: Flenarn Date: Sat, 22 Aug 2026 14:06:35 +0200 Subject: [PATCH 18/18] fix: Missing EMPLACE_VTABLEs --- include/RE/P/PipboyPrimitiveValue.h | 8 ++++++-- include/RE/P/PipboyValue.h | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/include/RE/P/PipboyPrimitiveValue.h b/include/RE/P/PipboyPrimitiveValue.h index a51cf15d4..6d75e1a04 100644 --- a/include/RE/P/PipboyPrimitiveValue.h +++ b/include/RE/P/PipboyPrimitiveValue.h @@ -17,7 +17,9 @@ namespace RE PipboyPrimitiveValue(std::uint32_t a_value, PipboyValue* a_parent) : PipboyValue(a_parent), m_value(a_value) - {} + { + REX::EMPLACE_VTABLE(this); + } // override virtual void CleanDirtyToGame() override {} // 00 @@ -52,7 +54,9 @@ namespace RE PipboyPrimitiveValue(bool a_value, PipboyValue* a_parent) : PipboyValue(a_parent), m_value(a_value) - {} + { + REX::EMPLACE_VTABLE(this); + } // override virtual void CleanDirtyToGame() override {} // 00 diff --git a/include/RE/P/PipboyValue.h b/include/RE/P/PipboyValue.h index b8faaf238..cee2b92ec 100644 --- a/include/RE/P/PipboyValue.h +++ b/include/RE/P/PipboyValue.h @@ -1,5 +1,7 @@ #pragma once +#include "RE/M/MemoryManager.h" + namespace Json { class Value; @@ -48,6 +50,8 @@ namespace RE func(this, a_parent); } + F4_HEAP_REDEFINE_NEW(PipboyValue) + // members std::uint32_t m_id; // 0x08 bool m_isDirtyGame; // 0x0C