ValheimAutoSort

版本 v2.4.0·更新於 2026-05-17

Sorts nearby chests on keybind (Alt+R). Spatial ordering, fill-first tagged chests, stack consolidation, safe overflow handling, ground-item duplication fix. Multiplayer compatible.

模組介紹 作者原文

ValheimAutoSort v2.4.0

Sorts nearby chests on demand with a single keypress. Chests infer their own category from

their contents; you can pin a category permanently with the catagory dropdown inside in-game containers.

Multiplayer compatible via ZDO sync.

Features

| Feature | Detail |

|---|---|

| Keybind sort | Press Alt+R (configurable) to sort all chests within ScanRadius |

| Spatial ordering | Chests filled in reading order (top-left → right, then down); same-category chests grouped together |

| Fill-first tagged | Tagged chests of the same category fill completely before spilling to the next |

| Category inference | Chest dominated by Wood items "owns" Wood — no setup needed |

| Tag override | autosort_tag Wood while looking at a chest pins it to Wood permanently |

| Ground suction | Dropped items on the ground are periodically pulled into matching chests |

| Hover tooltip | Shows chest category, tagged/inferred, and the sort keybind reminder |

| Visual effects | Blue highlight + particle VFX on sorted chests (configurable) |

| Multiplayer | MoveItemToThis + ZDO dirty-mark; no server plugin required |

Configuration

Config file location after first launch:

BepInEx/config/com.yourname.valheim.autosort.cfg

Editable in-game via r2modman config editor or any text editor.

1 — General

| Key | Default | Description |

|---|---|---|

| ModEnabled | true | Master switch. Disables everything without uninstalling. |

| LogDebug | false | Verbose BepInEx console logging for troubleshooting. |

2 — Chest Tagging

| Key | Default | Description |

|---|---|---|

| EnableTagOverride | true | Allow autosort_tag to pin chests. Requires relogging to affect existing chests if changed mid-session. |

3 — Sort Pass

| Key | Default | Range | Description |

|---|---|---|---|

| SortKeybind | Alt+R | Any key combo | Keyboard shortcut that triggers a full sort. Configurable via r2modman. |

| ScanRadius | 16 | 4 – 64 m | Radius around the player within which chests are included in a sort pass. |

4 — Ground Items

| Key | Default | Range | Description |

|---|---|---|---|

| EnableGroundSuck | true | — | Pull ground items into matching chests periodically. |

| GroundSuckRadius | 8 | 2 – 32 m | Radius around the player to search for ground items. Independent of ScanRadius. |

| GroundSuckInterval | 5 | 1 – 60 s | Seconds between ground scans. Lower = more responsive, slightly more CPU. |

5 — Effects

| Key | Default | Description |

|---|---|---|

| HighlightContainers | true | Flash chests blue when items are sorted into them. |

| PingContainers | true | Spawn a particle VFX at sorted chests. |

| PingVFX | vfx_Potion_health_medium | VFX prefab name. Leave blank to disable. Browse prefabs |

Usage

Basic (zero setup)

Build chests near each other and put a different type of item in each.

After a few deposits the mod infers each chest's category.

Press Alt+R whenever you want items redistributed.

Tagging a chest manually

Look at the chest, open console (F5):

autosort_tag Stone

Valid categories (case-insensitive):

Stone, Wood, Metal, Ore, Gem, Leather, Bone, Fiber, Seed,

Food, Potion, Fish, Arrow, Weapon, Shield, Armor, Tool,

Magic, Trophy, Furniture, Misc

Clear a tag:

autosort_tag

How It Works

Player presses Alt+R

│

▼

Patch_Player_Update detects SortKeybind.IsDown()

(blocked if inventory / map / store GUI is open)

│

▼

SortEngine.TriggerSortPass()

├─ Sets IsRearrangingItem = true (blocks all AddItem callbacks)

├─ Yields one frame

│

└─ DoSort(playerPosition)

├─ ChestOwnershipResolver.Resolve()

│ ├─ Tagged chests → pinned category, priority 1

│ │ └─ Multiple tagged of same category: rightmost first

│ └─ Inferred chests → dominant item category, priority 2

│

├─ ChestOwnershipResolver.PlanSortFull()

│ ├─ SortInferredByPosition()

│ │ ├─ Pass 1: reading order (top-left → right, then down)

│ │ ├─ Pass 2: find each category's earliest spatial anchor

│ │ └─ Pass 3: cluster same-category chests at their anchor

│ │

│ └─ FindDest() priority chain (m

安裝與使用 安裝:BepInEx 外掛

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

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

前置依賴

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

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
ValheimAutoSort-2.4.0.zip
檔案大小
42.7 KiB