ChunkedSaveFix

版本 v0.2.0·更新於 2026-06-29

Server-side Valheim public-test 0.221.13 fix for chunked-save stale chunks and duplicate ZDO repair.

模組介紹 作者原文

ChunkedSaveFix

Server-side BepInEx plugin for Valheim public-test chunked-save worlds.

This plugin was created to mitigate a Valheim public-test 0.221.13 chunked-save issue where stale chunk mappings could remain in the.chunks manifest and cause duplicated world objects after reloads.

Status

Public beta.

Use it carefully and keep backups. The repair tools were tested against the public-test 0.221.13 chunked-save format.

What it does

Preventive fix

By default, the plugin removes stale chunk mappings marked as sizeChanged before the.chunks manifest is written.

This is controlled by:

[Fixes]

RemoveSizeChangedChunks = true

Repair tools

The plugin can also scan and repair exact duplicate ZDO save clones.

Repair is disabled by default for public safety.

[Repair]

RepairMode = Disabled

ForceFullRepairSave = false

Supported repair modes:

  • Disabled: no duplicate scan or repair.
  • ScanOnly: logs duplicate save clones but does not remove anything.
  • FilterSaveExact: removes exact duplicate ZDO save clones from the save output before chunk files are written.

Important safety notes

Back up the full world folder before enabling repair modes.

Do not enable ForceFullRepairSave permanently. It is a one-shot repair tool. Turn it off after the repaired world has loaded correctly.

This plugin is server-side. Clients do not need to install it.

Recommended safe default

[General]

Enabled = true

[Fixes]

RemoveSizeChangedChunks = true

[Repair]

RepairMode = Disabled

ForceFullRepairSave = false

PruneManifestToFullRepairChunks = true

RepairIncludePortals = false

PositionPrecision = 100

RotationPrecision = 10000

MaxRemovalsPerSave = 0

TopGroupsToLog = 10

[Diagnostics]

Verbose = false

TopChunksToLog = 0

LogManifestOverlaps = false

One-shot full repair flow

Use this only if your world already has duplicated objects.

  • Stop the server.
  • Back up the world folder.
  • Start the server with the plugin once so the config file is generated.
  • Stop the server again.
  • Edit the config:

[Repair]

RepairMode = FilterSaveExact

ForceFullRepairSave = true

PruneManifestToFullRepairChunks = true

RepairIncludePortals = false

MaxRemovalsPerSave = 0

  • Start the server and let it save once.
  • Restart the server.
  • Verify the world visually and check the logs.
  • Turn off the full repair flag:

[Repair]

ForceFullRepairSave = false

You may keep this afterward as a preventive belt-and-suspenders mode:

[Repair]

RepairMode = FilterSaveExact

ForceFullRepairSave = false

Or disable duplicate filtering completely:

[Repair]

RepairMode = Disabled

ForceFullRepairSave = false

Logs to look for

During a full repair you should see messages like:

[FullRepair] ForceFullRepairSave active

[DedupeSave] Mode=FilterSaveExact

[DedupeSave] Removed X duplicate ZDO save clone(s)

[FullRepair] Pruned X stale manifest chunk(s)

After the world is repaired and ForceFullRepairSave=false, healthy saves should show no large duplicate removal.

Install

Copy the plugin DLL into your server BepInEx plugins folder:

BepInEx/plugins/FixSave.dll

Restart the server.

Build from source

This project is intended to be built with Docker. You do not need to install.NET locally.

  • Build the Valheim mod builder image

From the repository root:

docker buildx bake --no-cache --load \

--set default.args.VALHEIM_BRANCH=public-test \

--set default.args.VALHEIM_BETA_PASSWORD=yesimadebackups

This prepares the local valheim-mod-builder:dev image with the public-test Valheim assemblies and BepInEx dependencies required by the Cake build.

  • Build the plugin

From the repository root:

docker run --rm -it \

-v "$PWD:/work" \

-w /work \

valheim-mod-builder:dev \./build.sh --configuration=Release

The compiled DLL is written to:

output/FixSave.dll

  • What build.sh does

build.sh runs inside the valheim-mod-builder:dev container. It should not start another Docker container.

Expected content:!/usr/bin/env bash

set -euo pipefail

cd "$(dirname "${BASH_SOURCE[0]}")"

export DOTNET_SKIP_

安裝與使用 安裝:BepInEx 外掛

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

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

前置依賴

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

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
ChunkedSaveFix-0.2.0.zip
檔案大小
89.4 KiB