Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
| Last updated | 2 days ago |
| Total downloads | 13799 |
| Total rating | 9 |
| Categories | Mods Tweaks Misc Tools Audio Server-side Client-side Utility Ashlands Update Bog Witch Update AI Generated |
| Dependency string | Skarif-ValheimPerformanceOverhaul-4.0.0 |
| Dependants | 13 other packages depend on this package |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.
Preferred version: 5.4.2202README
β‘ Valheim Performance Overhaul (VPO) - v4.0.0
Valheim is an incredible game, but we have all experienced the dreaded "base lag." Once you build a massive fortress, light up a few dozen torches, tame some wolves, and host a couple of friends, your frames per second can drop into the single digits.
Valheim Performance Overhaul (VPO) is a massive, highly optimized system built from the ground up to eliminate the game's worst CPU, GPU, and memory bottlenecks. Instead of simply turning down settings, VPO uses smart runtime caching, asynchronous processing, and deep engine hooks to make the game run significantly smoother while keeping it beautiful.
π¨ Graphics & Rendering Optimizations
Valheim's rendering engine often chokes on having too many unique draw calls. VPO introduces a complete suite of rendering optimizations:
- π GPU Instancing & Material Deduplication: Forces Unity to use GPU Instancing on highly repetitive world objects like grass, flowers, shrubs, and rocks. It also automatically scans and merges duplicate materials in memory. This allows your graphics card to draw thousands of repetitive assets in a single, ultra-fast batch.
- π³ Asynchronous LOD Generation: Uses a background thread to generate simplified mesh levels (LOD1 at 50% complexity, LOD2 at 15% complexity) using a custom Quadratic Error Metrics (QEM) decimator. The process runs smoothly in the background without causing loading screen freezes.
- πΎ On-Disk Persistent Cache: Saves your generated LOD meshes and processed textures locally in the
BepInEx/cache/VPOfolder. The cache is automatically invalidated when either the mod or the game updates. - π° Static Batching per Sector: Scans and combines unique static geometry (dungeon details, ruins, POIs, cliffs) per world sector using Unity's native
StaticBatchingUtility. It runs on a configurable "settle" cooldown after you enter a sector to ensure stability. - πΌοΈ Runtime Texture Downscaler & Compressor: Downscales secondary object textures and compresses them to save VRAM. It safely bypasses Unity's write protection by rendering through an off-screen RenderTexture, saving raw bytes to the disk cache.
- π Mesh Decimation: For simple objects that do not need a full LOD group, this creates a single, highly optimized mesh (-60% poly count) and swaps it in directly, saving precious rendering cycles.
π‘ Lighting & Shadows Optimizations
Point lights and dynamic shadows are the absolute biggest killers of GPU performance in Valheim. VPO rewrites how the game handles illumination:
- π¦ Advanced Light Culling: Limits active point lights around you to a configurable maximum (default: 15). Lights outside this limit are disabled.
- π Light LOD System: Transitions lights through multiple levels based on distance:
- Full: Standard lighting with shadows.
- No Shadows: Shadows are disabled, leaving only light.
- Emissive: The light source mesh glows, but does not cast actual light.
- Billboard: The light is replaced by a lightweight 2D glow sprite.
- Disabled: Completely turned off.
- π―οΈ Light Flicker Optimization: Fixes fire and torch light intensity to its base value. This prevents Unity from constantly rebuilding shadow maps every frame, resulting in major GPU performance gains.
- βοΈ Dynamic Priority Sorting: Uses a fast $O(N)$ selection algorithm to dynamically prioritize which lights should stay on (e.g., players, portals, and hearths are prioritized over common torches).
- πΆοΈ Distance Shadow Culling: Automatically disables shadow casting on lights beyond a set distance (default: 30 meters).
π οΈ Building & Base Optimizations
Building is the core of Valheim, but structures can choke your CPU with continuous stability and rendering updates:
- π¦ Decor Batching: Combines the meshes of static, non-structural decorations (Misc category) in a 32x32 grid to drastically lower draw calls on detailed bases.
- π€ Piece Sleep Manager: Puts static building pieces (
WearNTear) to sleep after 2 frames of inactivity, freeing up CPU cycles on large, settled bases. - β³ Asynchronous WearNTear Loading: Spreads out the loading of building block scripts on scene load (default: 20 per frame) to prevent massive freezing when loading into a large base.
- π‘οΈ Structural Support Cache: Caches structural integrity calculations (
GetSupport()) with a configurable lifetime, and processes neighbor invalidation asynchronously (maximum of 5 blocks per frame) to prevent base collapses from freezing your game. - π§οΈ Weather Decay Control: Optionally disables rain and water rot damage for wooden structures, saving CPU cycles on continuous decay calculations.
π§ AI, Physics & Animals
- π Tamed Idle Optimizer: Puts idle, tamed animals inside player bases into a low-power mode, disabling their AI, Animators, Rigidbody movement, and Colliders. It safely restores colliders first when they wake up to prevent them from clipping through floors.
- π«οΈ Smoke Physics Overhaul: Replaces complex vanilla smoke aerodynamics with a simple, lightweight approximation. It also fixes a critical vanilla memory leak where faded smoke objects would never get destroyed, slowly piling up in the background.
AddForceandmasscalculations are heavily throttled for maximum CPU savings. - π€ AI Throttling: Monsters beyond 60 meters update their AI only every 5 seconds instead of every frame, and physics updates are staggered.
- ποΈ Line of Sight (LOS) Caching: Caches monster line-of-sight checks per-target with a 0.5-second timeout, completely bypassing heavy raycast operations on the hot path.
- π§ Pathfinding Scheduler: Restricts the number of active pathfinding searches per frame based on your hardware class (Weak: 3, Medium: 5, Strong: 8), keeping game performance smooth even if a raid spawns a massive wave of enemies.
π Audio & Particle System Pooling
Creating and destroying Unity objects at runtime causes micro-stutters. VPO reuses existing objects using high-performance pools:
- π Audio Pooling: Reuses
AudioSourcecomponents for standard spatial 3D effects (excluding loops, UI, music, and long ambient clips). - π Native FMOD Optimization: Only copies expensive 3D audio parameters if the sound is actually spatialized, saving hundreds of costly C# to C++ (FMOD) native boundary transitions.
- π₯ VFX Object Pooling: Pools high-frequency combat effects (blood splatters, spark hits, arrow impacts) to eliminate instantiation stutter during fights.
- πΎ Component Caching: Caches all component references (
Rigidbody,ParticleSystem,AudioSource,TrailRenderer,ZNetView,Projectile) inside a custom wrapper to bypassGetComponentcalls during reuse. - π¬οΈ Particle System Culling: Automatically pauses and resumes particle systems based on distance from the player, completely skipping simulation for off-screen effects.
- π―οΈ Torch Optimizer: Reduces the lifetime of torch and brazier particles and optimizes their gravity modifiers, saving rendering cycles on active lights.
π Network & Multiplayer Sync (Crossplay Safe!)
VPO completely rewrites several core network handlers to keep multiplayer gameplay fluid:
- π Steam Socket Uncap: Increases P2P data transfer limits (SendRateMin/Max and Receive Buffers) to solve network lag and desyncs on large bases. It safely detects your platform and disables itself gracefully on non-Steam (Game Pass) builds to prevent crashes.
- π Adaptive Throttling: Intelligently reduces network updates to players experiencing high ping (>400ms) to avoid choking their connection.
- π― Smart ZDO Sorting: Prioritizes players, portals, and ships during network synchronization to ensure smooth movement under load.
- π Smart Zone Ownership: Automatically transfers AI control to the player with the lowest ping in the sector, preventing laggy mob movement.
β³ Core Engine & Memory Tweaks
- π§ GC Control: Blocks Unity's Garbage Collector from running while you are moving, swimming, or in combat, shifting memory cleanup to idle moments. A safety timer forces collection if you remain in combat for too long to prevent Out-Of-Memory (OOM) crashes.
- β‘ JIT Warm-up: Pre-compiles heavy game methods (like combat calculations, building hovers, and inventory UI) on first spawn to eliminate action-based micro-stutters.
- π Frame Budget Guard: Monitors your 1% Low frame times. If a heavy freeze is detected, it dynamically lowers
Time.maximumDeltaTimeto prevent the physics engine from entering a "death spiral" of lag (lag -> over-simulation -> freeze). - β© Skip Intro: Skips the logo screens on launch, getting you to the main menu 5 to 10 seconds faster.
- βοΈ Engine Tweaks: Disables soft particles and soft vegetation, optimizes animation skin weights per vertex (1, 2, or 4 bones), and disables
Physics.autoSyncTransformsfor massive physics CPU savings.
βοΈ In-Game Configuration
VPO features a beautiful, built-in settings menu accessible directly from the Main Menu. You can toggle every single optimization module, adjust distances, change limits, and tweak settings on the fly without ever leaving the game or editing raw text files!
π Complete Configuration Guide
To help you configure the mod to perfectly fit your hardware and server setup, here are the descriptions and default values of all available configuration parameters.
βοΈ General & Engine Settings
These settings control the core optimizations, JIT compiler pre-warming, Garbage Collection, and frame budget protections.
| Section | Parameter Name | Default Value | Acceptable Range | Description |
|---|---|---|---|---|
| 1. General | Enable Debug Logging | false |
true / false | Enables highly detailed diagnostic logs. Keep off unless debugging. |
| 2. GC Control | Enabled | true |
true / false | Prevents Garbage Collector sweeps during movement, swimming, or combat. |
| 5. JIT Warm-up | Enabled | true |
true / false | Pre-compiles critical methods on player spawn to avoid first-use stutter. |
| 19. Engine Quality Settings | Enabled | true |
true / false | Activates low-level Unity tweaks (disables soft vegetation/particles, optimizes bone weights). |
| 19. Engine Quality Settings | Particle Raycast Budget | 1024 |
64 - 4096 | Limits maximum physics raycasts allocated for particle systems. |
| 20. Skip Intro | Enabled | true |
true / false | Skips the startup developer logos to get you to the main menu faster. |
| 21. Frame Budget Guard | Enabled | true |
true / false | Dynamically limits maximumDeltaTime during frame spikes to avoid freeze cascades. |
| 21. Frame Budget Guard | Freeze Threshold (ms) | 28f |
16f - 100f | Frame duration threshold representing a freeze (e.g., 28ms is approx 35 FPS). |
| 21. Frame Budget Guard | Throttled MaxDeltaTime | 0.045f |
0.02f - 0.1f | Physics delta time threshold applied during active stutters. |
| 21. Frame Budget Guard | Normal MaxDeltaTime | 0.07f |
0.03f - 0.2f | Standard physics delta limit applied during smooth gameplay. |
π¨ Graphics & Rendering Settings
Configure the custom GPU Instancing, background LOD generation, static batching, and high-performance texture compression.
| Section | Parameter Name | Default Value | Acceptable Range | Description |
|---|---|---|---|---|
| 8. Graphics Settings | Enabled | true |
true / false | Enables custom overrides for shadows, reflections, and skin weights. |
| 8. Graphics Settings | Shadow Distance | 50f |
20f - 150f | Maximum rendering range for game shadows. |
| 8. Graphics Settings | Shadow Resolution | 512 |
512, 1024, 2048, 4096 | Resolution of the main shadow map. |
| 8. Graphics Settings | Shadow Cascades | 1 |
0 - 4 | Number of shadow splits across distances. Lower values save GPU power. |
| 8. Graphics Settings | Terrain Quality Multiplier | 0.7f |
0.1f - 2.0f | Precision multiplier for heightmap terrain error. |
| 8. Graphics Settings | Enable Reflections | false |
true / false | Enables screen-space reflections on water and surfaces. |
| 8. Graphics Settings | Enable Bloom | false |
true / false | Enables bloom post-processing glow effects. |
| 8. Graphics Settings | Skin Weights (Bones) | 2 |
1, 2, 4 | Dynamic bones calculated per vertex. 4 is vanilla, 2 is optimal, 1 is max FPS. |
| 22. GPU Instancing | Enabled | true |
true / false | Enables instancing on highly repetitive world structures (flora, rocks). |
| 22. GPU Instancing | Deduplicate Materials | true |
true / false | Merges duplicate materials to maximize GPU instancing batch sizes. |
| 23. LOD Generation | Enabled | true |
true / false | Enables background runtime creation of LOD groups for high-poly objects. |
| 23. LOD Generation | LOD1 Mesh Quality | 0.5f |
0.1f - 0.9f | Vertex reduction target for LOD1 (0.5 means a 50% target). |
| 23. LOD Generation | LOD2 Mesh Quality | 0.15f |
0.05f - 0.5f | Vertex reduction target for LOD2 (0.15 means a 15% target). |
| 23. LOD Generation | Min Vertex Count | 300 |
150 - 5000 | Minimum vertex threshold of a mesh to qualify for LOD generation. |
| 24. Static Batching | Enabled | true |
true / false | Combines static geometry (dungeons, POI, cliffs) inside active sectors. |
| 24. Static Batching | Settle Cooldown (seconds) | 2.0f |
0.5f - 10.0f | Wait time after the last object spawns in a sector before combining them. |
| 27. Texture Optimization | Enabled | false |
true / false | Activates background texture downscaling and GPU compression to save VRAM. |
| 27. Texture Optimization | Downscale Multiplier | 0.5f |
0.1f - 1.0f | Texture scale factor (0.5 halving width/height cuts VRAM footprint by 75%). |
| 27. Texture Optimization | Min Texture Size to Process | 512 |
128 - 2048 | Minimum resolution of a texture required to qualify for processing. |
π‘ Culling, Bases & AI Settings
Fine-tune the distance culling limits, structural integrity caching, and the low-power states of monsters and pets.
| Section | Parameter Name | Default Value | Acceptable Range | Description |
|---|---|---|---|---|
| 3. Distance Culler | Enabled | true |
true / false | Puts distant game objects and entities to sleep. |
| 3. Distance Culler | Creature Cull Distance | 80f |
40f - 200f | Distance at which non-player creatures pause their update logic. |
| 3. Distance Culler | Piece Cull Distance | 100f |
50f - 300f | Distance at which static base pieces pause their update logic. |
| 3. Distance Culler | Enable AI Throttling | true |
true / false | Staggers physics and slows update frequencies for far-away monsters. |
| 3. Distance Culler | Exclusions | TombStone,portal_wood |
String (CSV) | Comma-separated list of prefab names to never cull under any condition. |
| 4. Object Pooling | Enabled | true |
true / false | Enables pooling for combat VFX to eliminate spawning stutters. |
| 6. Light Culling | Enabled | true |
true / false | Actively disables far-away light sources. |
| 6. Light Culling | Max Active Lights | 15 |
5 - 50 | Maximum number of point lights allowed to cast light simultaneously. |
| 6. Light Culling | Light Cull Distance | 60f |
20f - 150f | Absolute distance beyond which lights are turned off. |
| 6. Light Culling | Max Shadow Casters | 5 |
0 - 15 | Maximum number of active shadow-casting lights allowed near you. |
| 6. Light Culling | Shadow Cull Distance | 30f |
10f - 80f | Distance beyond which active lights have their shadow casting disabled. |
| 6. Light Culling | Enable Light LOD System | true |
true / false | Enables multi-stage Level of Detail (LOD) handling for lights. |
| 7. Audio Optimization | Enabled | true |
true / false | Enables caching and pooling for standard sound effect playbacks. |
| 7. Audio Optimization | Total Pool Size | 32 |
16 - 128 | Total number of pooled AudioSource instances. |
| 9. AI Optimization | Path Cache Distance | 2.0f |
0.5f - 8.0f | Distance threshold for caching pathfinding routes. |
| 10. Piece Optimization | Enabled | true |
true / false | Activates structural support caching and sleeping. |
| 10. Piece Optimization | Support Cache Duration (seconds) | 5.0f |
1.0f - 30.0f | Time-to-live (TTL) for cached structural support values. |
| 10. Piece Optimization | Smart Cache Invalidation | false |
true / false | Instantly invalidates support cache of adjacent structures on collapse. |
| 10. Piece Optimization | Disable Rain Damage | false |
true / false | Completely disables rot and decay on wooden pieces from rain and water. |
| 11. Particle Optimization | Enabled | true |
true / false | Activates distance culling and lifetime tweaks for particle systems. |
| 11. Particle Optimization | Particle Cull Distance | 50f |
20f - 100f | Distance beyond which active particle systems are paused. |
| 11. Particle Optimization | Max Active Particle Systems | 30 |
10 - 100 | Limit on simultaneously simulating particle systems. |
| 11. Particle Optimization | Torch Particle Lifetime | 0.8f |
0.2f - 2.0f | Reduces lifetime of fire particles to save GPU load. |
| 12. Vegetation Optimization | Enabled | true |
true / false | Enables adjustments for grass density and detail objects. |
| 12. Vegetation Optimization | Grass Render Distance | 60f |
30f - 120f | Draw distance of grass details. |
| 12. Vegetation Optimization | Grass Density Multiplier | 0.7f |
0.3f - 1.0f | Multiplier for grass density (0.7 means 70% density). |
| 12. Vegetation Optimization | Detail Object Distance | 80f |
40f - 150f | Draw distance of minor detail meshes (twigs, small rocks). |
| 12. Vegetation Optimization | Detail Density | 0.7f |
0.3f - 1.0f | Multiplier for detail mesh density. |
| 12. Vegetation Optimization | Terrain Max LOD | 1 |
0 - 2 | Maximum LOD level of heightmap terrain. Higher values are lower poly. |
| 13. Animator Optimization | Enabled | true |
true / false | Adjusts Animator culling modes on characters based on player range. |
| 14. Minimap Optimization | Enabled | true |
true / false | Throttles minimap coordinate updates when closed. |
| 16. Tamed Mob Idle Optimization | Enabled | true |
true / false | Enables low-power state for idle, safe, tamed animals. |
| 16. Tamed Mob Idle Optimization | Idle Distance From Combat | 5f |
3f - 30f | Distance from the nearest combat threat to allow sleep mode. |
| 16. Tamed Mob Idle Optimization | Base Detection Radius | 30f |
15f - 60f | Search radius around the animal to detect a player base (ward/shelter). |
| 17. Light Flicker Optimization | Enabled | true |
true / false | Disables flickering calculations, fixing light values to save GPU. |
| 18. Smoke Physics Optimization | Enabled | true |
true / false | Replaces heavy aerodynamics simulation on smoke and fixes memory leak. |
| 18. Smoke Physics Optimization | Smoke Lift Force | 3.5f |
1f - 10f | Vertical lifting force applied to smoke particles. |
π Network & Sync Settings
Network tweaks, Steam uncap, adaptive throttling, and zone management. Safely supports crossplay servers.
| Section | Parameter Name | Default Value | Acceptable Range | Description |
|---|---|---|---|---|
| 14. Network Optimization | Enabled | true |
true / false | Activates the network optimization suite (crossplay safe). |
| 14. Network Optimization | Uncap Steam Socket | true |
true / false | Boosts Steam P2P rate limits. Automatically disables on non-Steam builds. |
| 14. Network Optimization | Steam Send Rate Min (KB) | 256 |
Integer | Minimum allocated bandwidth rate (vanilla is 153). |
| 14. Network Optimization | Steam Send Rate Max (KB) | 2048 |
Integer | Maximum allocated bandwidth rate (vanilla is 153). |
| 14. Network Optimization | Smart ZDO Sorting | true |
true / false | Prioritizes players, portals, and ships during network synchronization. |
| 14. Network Optimization | Adaptive Throttling | true |
true / false | Intelligently drops updates to clients with poor connections to prevent choke. |
| 14. Network Optimization | Smart Zone Ownership | false |
true / false | [Server Only] Transfers sector AI control to player with the lowest ping. |
| 14. Network Optimization | Zone Ping Threshold (ms) | 120 |
50 - 500 | Ping latency threshold required to trigger owner evaluation. |
| 14. Network Optimization | Zone Ping Hysteresis (ms) | 30 |
10 - 100 | Latency difference required to transfer possession to prevent flickering. |
| 14. Network Optimization | Zone Update Interval (sec) | 5f |
2f - 20f | Evaluator tick interval for checking ping latency across active sectors. |
π₯ Installation
Automatic (Recommended)
- Install BepInExPack Valheim.
- Install Valheim Performance Overhaul via your mod manager of choice.
Manual
- Extract the BepInEx archive into your Valheim installation folder.
- Place the
ValheimPerformanceOverhaul.dllinside theValheim/BepInEx/plugins/directory. - Start the game.
π What to Expect (FPS Impact)
Performance gains depend heavily on your hardware and your base complexity. On average, you can expect:
- Open world, exploring: ~5% to 15% FPS increase, smoother frame times.
- Medium base (50 to 100 pieces): ~15% to 25% FPS increase, much fewer micro-stutters.
- Massive base (500+ pieces, many torches, tamed animals): ~30% to 60% FPS increase, major reduction in heavy lag spikes.
π€ Compatibility
- Fully compatible with JΓΆtunn and content expansion mods (Epic Loot, RtD, etc.).
- Fully compatible with crossplay (Steam and Game Pass players can play together safely).
- If you prefer the visual flicker of torches, you can disable Light Flicker Optimization in the settings.