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.
AutoLodBias
Automatically adjusts Valheim's LOD bias to balance view distance and frame rate, with portal-aware recovery and an optional FPS overlay.
By LEGIOmods
| Last updated | 18 hours ago |
| Total downloads | 37 |
| Total rating | 0 |
| Categories | Mods Tweaks Client-side Utility AI Generated |
| Dependency string | LEGIOmods-AutoLodBias-1.0.0 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2333README
AutoLodBias
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 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 profile, 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 profile 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 display detection. AutoLodBias reads Screen.currentResolution.refreshRateRatio; it never infers refresh rate from measured FPS.
Automatic selection:
- Up to and including 75 Hz: 60 FPS profile
- Above 75 Hz and below 120 Hz: 90 FPS profile
- 120 Hz or higher: 120 FPS profile
- Invalid or unavailable refresh rate: 60 FPS fallback
A positive TargetFPS always selects manual mode. The optimized profiles are:
| Target | Lower | Upper | Severe | Critical |
|---|---|---|---|---|
| 30 | 25 | 29 | 20 | 15 |
| 60 | 50 | 57 | 40 | 30 |
| 90 | 80 | 100 | 60 | 40 |
| 120 | 105 | 125 | 80 | 55 |
Other positive targets such as 45, 75, 100, or 144 are supported. Their thresholds are calculated as 85%, 97%, 67%, and 50% of the target, then 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.
Overlay and hotkeys
The overlay stays on one line and shows the active profile next to the measured FPS:
94 FPS | 90 mode | LOD: 15 | 14:35
Set ShowTargetFPS = false to hide the 90 mode 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 overlayAlt+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 display detection:
[FPS]
TargetFPS = 0
Fixed 60 FPS profile:
[FPS]
TargetFPS = 60
Fixed 90 FPS profile:
[FPS]
TargetFPS = 90
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
- Install BepInExPack for Valheim.
- Copy
AutoLodBias.dlltoBepInEx/plugins/AutoLodBias/. - 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.
- Uses Harmony patches only to detect local standard-portal travel.
- Does not require PortalPreload, QuickTeleport, Jotunn, or ServerSync.
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.