AutoLodBias
Automatically adjusts Valheim's LOD bias around the active FPS limit, with portal recovery and an FPS, target, LOD, and clock overlay.
模組介紹 作者原文
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
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: