ValheimBuildOptimization
A Valheim BepInEx optimization plugin for large builds, featuring spatial renderer batching, fire and light culling, optional wear-and-tear calculation bypasses, and built-in performance diagnostics.
About this mod Author’s original text
Valheim Build Optimization
Valheim Build Optimization is a BepInEx client-side performance mod for bases.
During testing on a 24,000-instance base, average FPS increased from around 20 FPS to around 55 FPS.
That is an average gain of about 35 FPS, or roughly a 175% increase over the original average.
Results will vary depending on hardware, base layout, active effects, mod configuration, and other installed mods.
If you encounter any issues or have suggestions, please don’t hesitate to DM me on Discord: draco_alias
Its main job is to reduce the rendering, lighting, particle, structural, and optional diagnostic work caused by thousands of loaded build pieces. The mod is designed around targeted optimizations. Expensive systems are changed only when the mod can identify a reasonably safe case, and experimental systems have separate switches so they can remain completely dormant during normal play.
The project began as a build-piece profiler, so it also includes an optional in-game diagnostics window for measuring scene, rendering, physics, fire, batching, collider, script, and network activity.
Special thanks to u/keepoursxnity for providing detailed testing feedback and designing the mod icon! I also want to thank the Valheim community for the support, suggestions, and encouragement.
Requirements
- Valheim
- BepInEx 5
- A client running the mod
Install ValheimBuildOptimization.dll in:
Valheim/BepInEx/plugins/
Configuration is created in:
Valheim/BepInEx/config/valheim.buildpieceprofiler.cfg
The BepInEx Configuration Manager mod is recommended, but not required.
Recommended Starting Configuration
For ordinary use:
- Enable fire optimization.
- Use StaticLight fire mode.
- Enable outside-camera and behind-geometry fire culling.
- Enable clustered fire proxy lights.
- Enable renderer batching for large static bases.
- Enable wear-and-tear optimization only if you intentionally want support and weather wear disabled.
- Leave shadow optimization, static component sleeping, collider clustering, network diagnostics, and automatic profiler polling off until testing them deliberately.
Existing configuration files keep their previous values after an update. Use Configuration Manager's Reset button if you want a setting to return to its new default.
Fire Optimization
Fire optimization works on supported fireplaces, torches, sconces, braziers, hearths, bonfires, and similar fire pieces.
Banana Explanation
If monkey put fire sticks in banana house, banana house warm, banana house pretty, monkey happy.
But monkey put many fire sticks. Maybe too many fire sticks. Fire sticks not lazy. Fire sticks wiggle flame, throw sparkle, make light, think about shadow, do tiny fire dance. Fire sticks eat FPS banana.
If monkey looking at fire, okay. Fire doing fire job. Monkey see pretty fire.
But if monkey not looking at fire, fire still working. Monkey on other side of house staring at stone wall, but fire sticks still dance like monkey watching. Computer still work. FPS banana still disappear.
Mod says, "Why fire work? Monkey no see fire."
So hidden fire goes sleepy. Big expensive light takes nap. Tiny cheap banana glow stays awake so room still look warm and not dead.
When monkey look back, fire wakes up fast. Fire wiggle again. Fire sparkle again. Fire says, "I was working. Promise."
Same banana house. Same pretty fire when monkey see it. Less invisible fire work when monkey no see it. More FPS banana for monkey.
Technical Explanation
The fire system discovers only Fireplace components whose piece names match a configurable known-fire allowlist and which contain both lights and particle systems. This avoids treating unrelated decorative effects as fire.
Each candidate is evaluated at a configurable interval rather than every frame. Visibility is determined using the main camera frustum. Optional occlusion testing uses budgeted non-allocating raycasts or spherecasts from the camera to the fire. Occlusion results are cached a
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.
Install these first, or the mod will not work: