AutoSortChests

版本 v1.0.2·更新於 2026-09-30

Adds a Sort button to every chest window: merges identical stacks and orders items by type and name.

截圖 共 1 張

模組介紹 作者原文

Valheim Auto Sort Chests

BepInEx mod for Valheim that adds a Sort

button to every container (chest) window, between the game's own "Take all"

and "Place stacks" buttons.

Clicking it:

  • Merges identical item stacks into as few stacks as possible (same rule

the game itself uses to decide if two items can stack).

  • Lays out the remaining items in a consistent order: by item type, then

alphabetically by name.

Unofficial mod. This is a fan-made mod, not affiliated with or endorsed by

Iron Gate. It marks your game as modded (the game shows this in the main menu),

as Iron Gate asks mod authors to do.

Requirements

  • Valheim (tested on 1.0.15)
  • BepInEx 5.4.x

Installation (players)

  • Install BepInEx for Valheim if you haven't already (see link above, or

use r2modman).

  • Download AutoSortChests.dll from the

latest release.

  • Drop it into \BepInEx\plugins\AutoSortChests\.
  • Launch the game and open any chest - you'll see the new "Sort" button.

Upgrading from 0.1.0: the DLL used to be called Mod3-AutoSortChests.dll.

Delete the old BepInEx\plugins\Mod3-AutoSortChests\ folder after installing

the new version (the mod keeps no data there).

Building from source

Requires the.NET 8 SDK (or newer)

and a local Valheim install with BepInEx installed.

git clone

cd valheim-auto-sort-chests

dotnet build -c Release -p:ValheimPath="C:\Path\To\Valheim"

If you don't pass -p:ValheimPath, the build looks for a VALHEIM_PATH

environment variable, then falls back to the default Steam location

(C:\Program Files (x86)\Steam\steamapps\common\Valheim).

The build automatically copies the built DLL into

\BepInEx\plugins\AutoSortChests\ for quick in-game testing.

How it works

A Harmony postfix on InventoryGui.Awake clones the existing "Stack All"

button to create the new "Sort" button (same style, correctly anchored),

positioned between "Take All" and "Stack All". Sorting operates directly on

Inventory.GetAllItems() (the live internal list) and reassigns each item's

grid position - no reflection into private container internals needed beyond

one field lookup for the currently-open container.

Support

All my mods are free and will stay free. If you enjoy them and want to say

thanks, you can leave a voluntary tip via PayPal - it doesn't

unlock anything, it just helps me keep making mods.

License

MIT - see LICENSE.

安裝與使用 安裝:BepInEx 外掛

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

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

前置依賴

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

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
AutoSortChests-1.0.2.zip
檔案大小
47.5 KiB