AutoLodBias
Automatically adjusts Valheim's LOD bias around the active FPS limit, with portal recovery and an FPS, target, LOD, and clock overlay.
About this mod Author’s original text
AutoLodBias
Current release: 1.1.0
AutoLodBias adjusts Unity's QualitySettings.lodBias from measured frame rate. It reacts quickly when performance drops and raises visual distance more cautiously when performance remains stable.
This is a client-side mod. It only changes visual detail and the overlay for the player who installs it; servers and other players do not need the mod.
The mod works with standard Valheim portals and has no dependency on PortalPreload or QuickTeleport. Those mods are compatibility cases only.
Features
- Automatically balances view distance against current frame rate.
- Uses fast reductions and cautious increases to avoid repeated large FPS drops.
- Includes emergency LOD reductions during severe performance drops.
- Detects Valheim's in-game FPS limiter, falls back to the display refresh rate, or accepts a fixed target FPS.
- Lowers LOD during portal travel and restores automatic control after arrival.
- Provides a configurable FPS, target, LOD, and clock overlay.
- Provides configurable hotkeys for the overlay and automatic control.
LOD stages
Automatic control uses only these stages:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 50, 75, 100
When another mod or a manual change supplies an intermediate value, a reduction selects the next lower valid stage and an increase selects the next higher valid stage.
FPS control
Reductions use a fast exponential FPS average. By default, the average must remain below the active lower threshold for 0.25 seconds. The controller then moves down one stage and applies a 0.25-second downward cooldown.
Increases use a slower FPS average. The average must remain above the active upper threshold for 1 second. Below LOD 10, an increase adds two while stopping at 10. At LOD 10 or above, it advances by one table stage. The upward cooldown is 1 second, after which the high-FPS condition must be satisfied again.
Reductions always take priority. FPS measurement continues during cooldowns.
Performance drops
Each FPS target supplies severe and critical thresholds:
- Below the severe threshold for 0.25 seconds, LOD switches directly to 3 when the current value is higher.
- Below the critical threshold for 0.25 seconds, LOD switches directly to 1.
- After either event, increases remain blocked for 1 second. Further reductions remain available.
Target FPS and display detection
TargetFPS = 0 enables automatic target detection. AutoLodBias first reads Valheim's active in-game FPS limiter. If the limiter is unavailable or set to unlimited, it reads Screen.currentResolution.refreshRateRatio, rounds it to the nearest whole FPS, and uses that value as the target. Invalid or unavailable display data falls back to 60 FPS. Changing Valheim's FPS limiter in the graphics menu refreshes the automatic target.
A positive TargetFPS always selects manual mode and uses that exact value as the FPS target. Use this when Valheim or a graphics driver has an FPS limiter. For example, set TargetFPS = 110 for a 110 FPS limit.
All targets use the same threshold calculation: 85%, 97%, 67%, and 50% of the target for Lower, Upper, Severe, and Critical. Values are corrected if necessary to preserve:
Critical < Severe < Lower < Upper
Calculated runtime thresholds do not overwrite the configuration file.
Portal behavior
TeleportWorld.Teleport(Player) provides an early start signal for the local player. AutoLodBias immediately sets LOD 1 and pauses FPS control.
Arrival is detected primarily from a horizontal position jump. After arrival, LOD remains at 1 for 0.75 seconds, then returns to 3 and all FPS averages and timers restart. Portal and recovery timeouts prevent LOD from remaining at 1 indefinitely.
AutoLodBias does not teleport the player, skip loading checks, call PortalPreload or QuickTeleport APIs, or declare dependencies on those mods.
Valheim display distance
Valheim's Display Distance graphics setting controls the same Unity LOD bias value used by AutoLodBias. When automatic control
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: