balrond better build

v0.1.1·Updated 2026-09-09

Reworked Building Integrity System

About this mod Author’s original text

🏗️ Balrond Better Build

Balrond Better Build is an experimental performance and scalability mod for Valheim's structural integrity system.

Valheim normally recalculates structural support by repeatedly scanning nearby physics colliders for individual WearNTear objects. Balrond Better Build builds a cached, event-driven structural graph and updates only the parts of a construction affected by placement, destruction, terrain changes, streaming, teleportation, or ownership changes.

The mod is intended to reduce the CPU cost of large buildings and heavily populated generated locations while keeping Valheim-compatible support behavior.

Important: Structural replacement is a low-level gameplay change. Back up important worlds before testing a new version. Start with VanillaCompatible, keep the safety options enabled, and test large constructions on a copied world first.

Features

  • Event-driven cached structural graph
  • Supports player buildings, vanilla generated locations, and modded WearNTear prefabs
  • Budgeted work spread across frames
  • Active-area lifecycle management for travel and teleportation
  • Safe fallback to Valheim while a node is not ready
  • Session circuit breaker on replacement errors
  • Server-synchronized gameplay configuration
  • Optional Observe mode for comparing the graph against Valheim
  • Optional profiling of WearNTear.UpdateSupport and WearNTearUpdater.Update
  • Bounded list pools to reduce GC without permanently retaining unlimited memory
  • Anchor input-link compression for terrain- and world-supported pieces
  • Separate budgeted ownership and ZDO maintenance outside the replacement hot path
  • Optional delayed vanilla support-cache release with cooldown and per-frame limits
  • Information logging and runtime diagnostics can be completely disabled

How It Works

Each managed WearNTear object becomes a graph node.

The graph stores:

  • Structural colliders
  • Cached bounds
  • Direct support contacts
  • Reverse dependent links
  • Terrain or static-world anchor state
  • Material support properties
  • Last committed graph support

A normal replacement lookup is intentionally small:

  • Find the node by Unity instance ID
  • Verify that its cached result is ready and valid
  • Return the committed support value

Physics scans, topology rebuilding, ownership checks, ZDO writes, cache release, and island solving are performed by separate budgeted queues. They are not performed on every successful UpdateSupport lookup.

Anchored nodes

A piece directly supported by terrain or eligible static world geometry always resolves to its material's maximum support. Version 0.3.7 stops scanning the remaining colliders after a valid anchor is found and removes unnecessary inbound support links from that anchored node. The piece still keeps its outgoing dependent relationships, so it can support the rest of the structure normally.

Active areas

On a client or local host, nodes outside Valheim's active area are removed from the active graph. Returning to the location registers and rebuilds them again. This prevents previously visited bases and ruins from remaining in the local structural graph indefinitely.

Dedicated servers do not prune the world using one player's reference position. They rely primarily on runtime object lifecycle events and low-frequency safety reconciliation.

Installation

Compiled release

  • Install BepInEx for Valheim.
  • Place the compiled BalrondBetterBuild.dll in:

BepInEx/plugins/BalrondBetterBuild/

  • Start the game once to generate the configuration file.
  • Edit:

BepInEx/config/balrond.astafaraios.BalrondBetterBuild.cfg

Building the included source project

  • Open BalrondBetterBuild.sln in Visual Studio.
  • Add or copy the required references into Libs.
  • Select:

Release | Any CPU

  • Rebuild the solution.
  • Copy the resulting DLL to the BepInEx plugins folder.

ServerSync.d is included as a project. Config file is provided

Integrity Modes

| Mode | Behavior | Recommended use |

|---|---|---|

| Vanil

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. 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.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. 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.

File & checksum

Filename
balrond_better_build-0.1.1.zip
File size
181.6 KiB