Please disclose if your mod was created primarily using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
ValheimPerformanceOverhaul
Fps mod for Valheim..
CHANGELOG
Changelog
v3.0.0
Added
- Decor Batching (New Module): Automatically combines meshes of decorative pieces (Misc category, no WearNTear) in a chunk grid to drastically reduce draw calls on large bases. Configurable rebuild cooldown and minimum pieces per chunk.
- In-Game Settings Menu: Added a built-in VPO configuration menu accessible directly from the Main Menu. No longer requires external BepInEx Configuration Manager to tweak settings.
- Network Optimizations (Crossplay Safe!): Brought back and completely rewritten to safely support Game Pass / Crossplay:
- Steam Socket Uncap: Increases P2P data limits (solves lag on huge bases). Safely disables itself if not running on Steam.
- Adaptive Throttling: Intelligently drops ZDO sends to clients with high ping (>400ms) to prevent choking their connection.
- Smart ZDO Sorting: Prioritizes players, portals, and ships over AI during network sync to prevent desyncs.
- Smart Zone Ownership: Automatically transfers AI control to the player with the lowest ping in the zone.
- Piece Sleep Manager: Puts static building pieces (
WearNTear) to sleep after 2 frames of inactivity, saving CPU cycles on massive structures.
Changed / Optimized
- Zero GC Allocations on Hot Paths: Replaced expensive Reflection (
GetValue/SetValue) with compiled Expression delegates. Completely eliminates boxing (float->object) and garbage generation per frame in:LightFlickerPatch(v2.8.0)VegetationPatches(v2.8.1)SmokePatch(v2.9.0)ObjectPoolManager
- O(1) Collection Upgrades: Upgraded
DistanceCullerManager,AIOptimizerManager, andAudioPoolManagerto useHashSetalongsideList. This changes duplicate checking from O(n) to O(1), fixing massive O(n²) lag spikes when loading chunks with thousands of objects. - Smoke Physics Overhaul:
AddForceis now throttled to run once every 3 physics frames. Rigidbodymassupdates are throttled to 0.1s.isKinematicandRigidbodyreferences are now heavily cached. - Tamed Idle Optimizer: Optimized base detection using
LayerMaskdirectly inPhysics.OverlapSphere, avoiding expensiveGetComponentInParenttraversals on hundreds of colliders. - Object Pooling: Optimized
IsInWhitelistto useGetStableHashCode, completely avoiding string allocations (Replace,Trim) on the hot path. Removed unnecessary threadlockstatements since pooling is strictly single-threaded, reducing overhead. - AdvancedLightManager & FrameBudgetGuard: Cached
Comparerdelegates to avoid lambda allocations multiple times per second.
Fixed
- [CRITICAL] Smoke Memory Leak: Fixed a critical vanilla issue (and previous patch oversight) where smoke objects were never destroyed after fading out. Hundreds of invisible smoke objects would accumulate and tick in
FixedUpdate, killing FPS over time. - [CRITICAL] Light Culling Conflict: Fixed a severe conflict where
AdvancedLightManagerandLightLODManagerboth patchedZNetScene.CreateObjectand fought over light states. Registration is now unified. - Zombie Lights Bug: Fixed a bug in
AdvancedLightManagerwhere destroyed lights weren't removed from the_culledLightslist, causing zombie references that permanently broke the active lights limit. - Animator Conflict: Fixed a bug where
AIOptimizerandCharacterAnimatorOptimizerwere fighting overAnimator.cullingModein the same frame. - Support Cache: Added
ZNetScene_OnDestroy_Postfixto clear the invalidation queue on scene unload, preventing null reference errors when changing worlds.
v2.7.1
Added
- mini-update (smokePatch).
v2.7.0
Added
- Light Flicker Optimization — Harmony Prefix on
LightFlicker.CustomUpdatethat fixes light intensity at its base value, eliminating per-frame Shadow Map recalculation for all fires and torches. - Smoke Physics Optimization — Harmony Prefix on
Smoke.CustomUpdatethat replaces the vanilla complex aerodynamics with a lightweight quadratic interpolation + single upward force. - Engine Quality Settings — Forces low-level Unity
QualitySettingsat startup:softParticles = false,softVegetation = false, configurableparticleRaycastBudget. - Skip Intro — Skips Iron Gate and Coffee Stain logo screens on every game launch.
- Frame Budget Guard — Dynamic stutter protection system. Monitors a rolling 120-frame window and lowers
Time.maximumDeltaTimewhen heavy spikes are detected.
Changed
- Config sections renumbered: new modules occupy sections 17–21.
v2.6.4
Added
- Nothing (maintenance release).
v2.6.3
Added
- Welcome screen on main menu launch with clickable Discord link.
v2.6.0
Changed / Fixed
- Removed
NetworkManagerandZDOOptimizertemporarily (crossplay issues). - Fixed
LightLODManagerduplicate scans. DistanceCullerrefactored to centralUpdateloop.AsyncWearInitearly exit when queue is empty.
v2.5.1
- Initial public release.