UnifiedAutoSaveInterval

版本 v1.0.0·更新於 2026-09-19

Configurable combat-aware Valheim autosave interval for hosted worlds and local characters.

模組介紹 作者原文

Unified Auto Save Interval

A tiny BepInEx plugin that changes Valheim's own built-in autosave interval and

can postpone autosaves briefly while players are in combat.

Default normal interval: 600 seconds / 10 minutes.

Default maximum combat delay: 120 seconds / 2 minutes.

The mod does not implement a separate save system and does not create custom

save files. It only adjusts Valheim's existing Game.m_saveInterval.

Why

Valheim officially exposes -saveinterval for the dedicated server executable,

but not as an in-game setting for normal clients or worlds hosted through

Valheim's Start Server option.

Frequent autosaves reduce progress loss after crashes, but an autosave can also

cause a noticeable hitch. The combat protection therefore allows the normal

autosave to wait briefly when somebody is actively fighting.

Behaviour

In-game host / Start Server

The host process owns the world, so the normal interval applies to:

  • the hosted world;
  • the host's local character.

With ProtectAllPlayersWhenHosting = true, the host checks all connected

players. If a creature is targeting any of them when the autosave becomes due,

the save may be postponed.

Joining client

A joining client does not own the server world. The configured interval applies

to that client's local character save.

Combat protection only watches that local player on a joining client.

Maximum delay

Combat never disables saving indefinitely.

Example with the defaults:

  • normal autosave: 600 seconds;
  • maximum combat delay: 120 seconds;
  • hard maximum interval while combat remains active: 720 seconds.

If combat ends earlier, the normal 600-second threshold is restored. If the

normal save is already overdue, Valheim's own autosave runs immediately after

the short combat-clear window.

Combat detection

Combat is considered active when a creature's Valheim BaseAI currently

targets a protected player.

A short clear window keeps combat active for a few seconds after the last target

disappears so retargeting does not rapidly toggle the save threshold.

The default clear window is 5 seconds.

Configuration

After first launch:

BepInEx/config/daishi11.valheim.unifiedautosaveinterval.cfg

Defaults:

[General]

SaveIntervalSeconds = 600

[Combat]

AvoidSavingDuringCombat = true

MaxCombatDelaySeconds = 120

CombatClearSeconds = 5

ProtectAllPlayersWhenHosting = true

Useful normal intervals:

  • 600 = 10 minutes
  • 480 = 8 minutes
  • 300 = 5 minutes
  • 60 = 1 minute for short testing

Allowed normal interval: 60 to 3600 seconds.

Allowed maximum combat delay: 0 to 600 seconds.

The settings can also be changed through compatible BepInEx configuration UIs.

Compatibility

  • No Harmony patches.
  • No custom save format.
  • No custom backup system.
  • No Jotunn dependency.
  • Uses Valheim's existing autosave timer and save routines.

Tested for the Valheim 1.0.x modpack using BepInExPack Valheim 5.4.2350.

Recommended setup

For normal play:

SaveIntervalSeconds = 600

AvoidSavingDuringCombat = true

MaxCombatDelaySeconds = 120

CombatClearSeconds = 5

ProtectAllPlayersWhenHosting = true

For a quick combat test:

SaveIntervalSeconds = 60

MaxCombatDelaySeconds = 30

Stay in combat across the one-minute save point. The log should report combat

protection and the save should either run shortly after combat clears or at the

90-second hard maximum.

License

MIT.

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
UnifiedAutoSaveInterval-1.0.0.zip
檔案大小
10.9 KiB
SHA-256
5efe9897af1e9453986e175ea307459bd167c92457dc73c07e8e6cb8c3c006fb
入庫時間
2026-10-10 18:27