Valheim
Install with App

Details

Latest version
1.1.0
Last Updated
First Uploaded
Downloads
471
Likes
1
Size
177KB
Dependants
ADDatHost Valheim hosting
€1

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 is enabled, AutoLodBias intentionally overrides that menu value with its FPS-based LOD stage. Use the Valheim setting manually after disabling AutoLodBias if you want the game to control display distance by itself.

Overlay and hotkeys

The overlay stays on one line and shows the active target next to the measured FPS:

94 FPS | Ziel: 90 FPS | LOD: 15 | 14:35

Set ShowTargetFPS = false to hide the Ziel: 90 FPS part.

The local real-world clock is shown by default. Configure it in the separate Clock category:

[Clock]
ShowClock = true
Use24HourClock = true

Set Use24HourClock = false for a 12-hour clock, or ShowClock = false to hide it.

  • Alt+F1: toggle the overlay
  • Alt+F2: toggle automatic control

Both left and right Alt are supported. Disabling automatic control cancels portal state, resets the controller, and restores the default LOD of 3.

Configuration examples

Automatic Valheim limiter and display detection:

[FPS]
TargetFPS = 0

Manual 60 FPS target:

[FPS]
TargetFPS = 60

Manual 90 FPS target:

[FPS]
TargetFPS = 90

Manual 110 FPS target for a matching FPS limiter:

[FPS]
TargetFPS = 110

Main settings:

[General]
Enabled = true
DefaultLodBias = 3

[FPS]
TargetFPS = 0
FastSmoothingSeconds = 0.15
SlowSmoothingSeconds = 1.0
LowDuration = 0.25
HighDuration = 1.0
SevereDuration = 0.25
CriticalDuration = 0.25
DownAdjustmentCooldown = 0.25
UpAdjustmentCooldown = 1.0
PostEmergencyIncreaseLock = 1.0

[Portal]
PortalLodBias = 1
PortalRecoveryLodBias = 3
PostArrivalLowDuration = 0.75
PositionJumpThreshold = 50
PortalTimeout = 8
RecoveryTimeout = 3

[Overlay]
ShowOverlay = true
ShowTargetFPS = true
PositionX = 15
PositionY = 15
FontSize = 16
RefreshInterval = 0.25

[Clock]
ShowClock = true
Use24HourClock = true

[Hotkeys]
ToggleOverlayKey = F1
ToggleModKey = F2
RequireAlt = true

Installation

Mod manager

Install AutoLodBias with r2modman or the Thunderstore Mod Manager. BepInEx is installed automatically as a dependency.

Manual

  1. Install BepInExPack for Valheim.
  2. Copy AutoLodBias.dll to BepInEx/plugins/AutoLodBias/.
  3. Start Valheim once. The configuration file is created at BepInEx/config/domen.valheim.autolodbias.cfg.

Compatibility

  • Client-side only; no dedicated-server installation is required.
  • Tested with Valheim 1.0.7, Unity 6000.0.75, and BepInEx 5.4.23.5.
  • Uses Harmony patches only to detect local standard-portal travel.
  • Does not require PortalPreload, QuickTeleport, Jotunn, or ServerSync.
  • PortalPreload compatibility is not claimed without a current isolated combination test.

AI-assisted creation

This mod, its documentation, and its Thunderstore package were partially or fully created with assistance from OpenAI Codex.

License

Licensed under the PolyForm Noncommercial License 1.0.0.

Noncommercial use, modification, and redistribution are permitted. Redistributed or modified versions must include the license and retain this credit notice: AutoLodBias by LEGIOmods, Copyright 2026. Commercial use requires separate permission from LEGIOmods.

DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro