You are viewing a potentially older version of this package. View all versions.
Muindor-TidyChests-1.3.0 icon

TidyChests

Quick stack into nearby chests, a hotkey to find where an item is stored, Ctrl+O to search everything in the chests around you, and recipes that unlock from your team mates' materials. Client-side; a server can optionally enforce its config.

Date uploaded 3 days ago
Version 1.3.0
Download link Muindor-TidyChests-1.3.0.zip
Downloads 1126
Dependency string Muindor-TidyChests-1.3.0

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2350 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2350

README

Tidy Chests

Terraria-style quick stack for Valheim 1.0. A Stash button in the inventory moves your materials, food, ammo and trophies into the nearby chests that already hold that kind of item (10 m by default). Equipment, tools, weapons, equipped items, quest items and the slots of your quick slot mod stay where they are. And when you wonder where you put something, point at it in the inventory and press T: the inventory closes and every chest in range that holds it lights up, with an arrow and the count on screen. Ctrl+O lists everything the chests around you hold, with a search box. And in co-op, the materials your team mates drop in those chests unlock their recipes for you, without hunting down every new stack to touch it.

Client-side: install it on every player's game that should use it. Nothing is needed on the server, and players without the mod can play on the same server.

Source, issues and releases: github.com/egor-muindor/ValheimMods.

Features

  • Stash button: every stackable regular item in the inventory goes to the nearest chest within the radius that already contains an item with the same name. Existing stacks are topped up first, then empty slots are used, and what is left continues to the next chest. Chests, reinforced and black metal chests, carts and ship cargo all count. A chest that holds none of your items is never touched, so your sorting stays yours.
  • What stays: equipped items; tools, weapons, armour and other equipment; quest items; the hotbar (optional); quick, equipment, food, ammo and misc slots of Extra Slots, every slot of EquipmentAndQuickSlots, the quiver rows of Better Archery; anything in the blacklist; locked items and slots; item types not in the allowed list.
  • Locks: point at an item and press Shift+L to lock it, and the Stash button leaves that item alone wherever it lies. Point at a slot and press Shift+K to lock the slot itself, so whatever is put there stays. Hold Shift with the inventory open to see the locks, a grey padlock on a locked item and a red one on a locked slot, and a tooltip on the slot under the pointer with the keys. Pressing again unlocks. The keys and the locks themselves are in the config, so they survive a restart and can be edited.
  • Find key (T by default): with the inventory open, point at an item and press the key. Every chest in range that holds the item gets a pulsing light, an emissive tint and a screen marker with the count and the distance, for 8 seconds by default. The inventory closes so you can look around; if no chest holds the item, a message says so and the inventory stays open. Works for items in an open chest and in the crafting panel too: point at an ingredient of the selected recipe, at the recipe's icon or at an entry of the recipe list to see which chests hold that item.
  • Chest list (Ctrl+O by default): every item in the chests within the scan radius, one row per kind, with the total, how many chests hold it and how far the nearest one is. Type to filter by name; click a row to close the list and light up every chest holding that item. Escape or the same key closes it. While it is open the character stands still and the wheel scrolls the list rather than zooming the camera. The header sorts by name or by count, and the diamond on the left of a row pins the item to the top of the list - where it stays, with a count of 0, even after the last of it is gone.
  • Learning from chests: the items lying in the chests around you count as found, so their recipes unlock. Valheim normally unlocks a recipe only once the material has been in your own inventory, which in a party means hunting down every stack a team mate gathered. Trophies count too. This cannot be undone: turning LearnFromChests off later does not lock a recipe again.
  • Localized: the button label and the messages follow the game language (English and Russian included, English elsewhere).
  • Multiplayer: with MultiUserChest items go through its requests, so shared chests behave. Without it, chests that another player has open, carts in use and ship cargo (in multiplayer) are skipped, and the mod takes ownership of a chest before writing to it, like opening it would.

Installation

Requires BepInEx 5.

  • With a mod manager (r2modman, Thunderstore Mod Manager): install as usual.
  • By hand: unzip the release and copy the plugins/TidyChests folder into BepInEx/plugins, so the mod ends up at BepInEx/plugins/TidyChests/TidyChests.dll.

The config file BepInEx/config/muindor.TidyChests.cfg is created on first launch.

Configuration

Server

Key Default Description
ConfigPriority false Server only. When on, this server's settings replace those of every client that also has the mod.

Install the mod on a dedicated server, or on the machine hosting the session, and turn ConfigPriority on to give every player the same reach and the same rules: every client that also has Tidy Chests then runs on the server's values for Enabled, Radius, IncludeHotbar, ItemTypes, Blacklist, ScanRadius, ScanInterval and LearnFromChests. They are marked [synced] in the generated .cfg.

Keys, the Stash button, the panels and the highlights stay each player's own: there is no reason for a server to decide where someone's button sits or which key opens their chest list.

This never makes the mod required on either side:

  • Players without it are unaffected. The mod is not part of the game's version check, so it never blocks a connection either way.
  • A player with it can still join a server that does not have it, or one that leaves ConfigPriority off, and keeps their own settings.
  • The client's .cfg is never written to. The server's values live in memory for as long as the connection lasts and are dropped when it ends.
  • Changing a setting on a running server sends it to the connected players right away.

General

Key Default Description
Enabled true Enable the mod: the Stash button, the find key, the chest list and the learning from chests.
IsDebug false Log every item decision and every chest that is considered when stashing.

Stash

Key Default Description
Radius 10 Chests within this many metres of the player are used, by the button and by the find key, 1 to 20.
IncludeHotbar false Also stash items from the first inventory row.
ItemTypes Material, Consumable, Ammo, AmmoNonEquipable, Trophy, Misc, Fish Item types that may be stashed. Remove Ammo to keep arrows, add Torch to stash torches, and so on. Valid names are listed in the config file.
Blacklist empty Items that are never stashed, comma-separated prefab names or item names: Wood, $item_coal, Resin.
ShowMessage true Show a message with the result after stashing.

Locks

Key Default Description
RevealKey LeftShift Hold this key with the inventory open to see the locks and, on the slot under the pointer, a tooltip with the lock keys. None never shows them.
LockItemKey L + LeftShift With the inventory open, point at an item and press this to lock or unlock it. A locked item is never stashed, wherever it lies. Modifiers are allowed.
LockSlotKey K + LeftShift With the inventory open, point at a slot and press this to lock or unlock it. Whatever lies in a locked slot is never stashed. Modifiers are allowed.
LockedItems empty The locked items, comma-separated game item names ($item_wood, $item_coal). Written as you press the key; editable by hand.
LockedSlots empty The locked slots, comma-separated column:row counted from 0, the hotbar being row 0 (0:1, 7:3). Written as you press the key; editable by hand.

Find

Key Default Description
FindKey T With the inventory open, point at an item (in the inventory, or an ingredient or recipe in the crafting panel) and press this key. Modifiers are allowed, e.g. T + LeftControl.
HighlightDuration 8 Seconds the found chests stay highlighted, 1 to 60.
ScreenMarker true Draw an arrow with the item count and the distance over each found chest, at the screen edge when it is out of view.
Light true Light up each found chest with a pulsing light.
Glow true Tint each found chest with an emissive glow (only for materials whose shader has an emission colour).
CloseInventory true Close the inventory when chests are found.

Button

Key Default Description
ShowButton true Show the Stash button in the inventory. tidychests stash in the console works without it.
ButtonOffset 41, -56 Position of the button relative to the weight display of the inventory panel, in UI pixels (x right, y up). Adjust if another UI mod puts something there.
ButtonSize 120, 38 Width and height of the button in UI pixels.

Scan

Used by the chest list and by the learning from chests.

Key Default Description
ScanRadius 50 Chests within this many metres are read, 5 to 90. Above roughly 90 m the chests are no longer loaded, so nothing more is found.
ScanInterval 5 Seconds between two scans, 1 to 60. Chests whose contents did not change are skipped, so a short interval is cheap.

Knowledge

Key Default Description
LearnFromChests true Count the items in the chests in range as found, so their recipes unlock. Cannot be undone; see above.

Browser

Key Default Description
BrowserKey O + LeftControl Opens and closes the chest list. Modifiers are allowed; set it to None to disable the panel.
BrowserSize 520, 560 Width and height of the panel in UI pixels.
Sort CountDescending Order of the list while the search box is empty: CountDescending, CountAscending, NameAscending or NameDescending. Set by clicking the header, saved here.
Favorites empty Pinned items, comma-separated, by the game's own item names ($item_wood, $item_coal). Set by clicking the diamond in the list, saved here.

Sorting and pinning

The list has a header with two clickable columns. Name and Count each sort by that column; clicking the one that already decides the order flips its direction, and the active column says which way it is sorted (Count 9-1, Name A-Z). The list opens with the largest stacks first.

The diamond on the left of every row pins the item. A pinned item sits above everything else, and the pinned block is sorted the same way as the rest. Two things make it more than a bookmark:

  • It stays in the list with a count of 0 once no chest in range holds it any more, dimmed, instead of disappearing. That is how you see that the flax ran out rather than noticing it is missing. Such a row does nothing when clicked - there is no chest to light up.
  • It survives a restart and a language change: pins are stored by the game's internal item name, not by the name on screen.

Pinning is ignored while something is typed in the search box. A search should answer with its best matches first, not with the pins; the sort still decides the order among equally good matches.

Console command

tidychests stash    # stash now, without the button
tidychests scan     # scan the chests in range for items you do not know yet
tidychests status   # show the active settings and where they come from
tidychests reload   # re-read the config file

How it works

Items are moved with the same inventory calls the vanilla "stack all" button uses (Inventory.AddItem + RemoveItem for whole stacks, the positional MoveItemToThis of drag and drop for parts of a stack), so chest-sharing mods that intercept these calls keep working. Which item goes where is decided by a small planner on snapshots of the inventory and of the chests in range, and the same rules run in the unit tests.

Reading the chests costs nothing on the network. The game already sends every client the contents of the chests around it (ZDOMan replicates the ZDO data of everything in the active area) and re-reads them once a second (Container.CheckForChanges), so the chest list and the learning only look at what is already in memory, and a chest whose data revision did not change is not even re-read. Known materials are local player data, saved in the character file, not in a network object. Neither feature sends a single extra packet or takes ownership of a chest; only the Stash button writes.

Feature Patched member
Container list Container.Awake and Container.OnDestroyed postfixes keep a list of loaded containers
Stash button InventoryGui.Show postfix clones the "take all" button into the player panel
Button label, messages Localization.SetupLanguage postfix adds the mod's words for the loaded language
Console command Terminal.InitTerminal postfix
Chest list input Player.TakeInput and PlayerController.TakeInput postfixes stop interacting, walking and the mouse look, GameCamera.UpdateMouseCapture postfix keeps the cursor free, ZInput.GetMouseScrollWheel postfix hands the wheel to the list instead of the camera zoom, Menu.Update prefix lets Escape close the list instead of opening the game menu

Items are learned through the game's own Player.AddKnownItem, a couple per frame, so trophies, the unlock messages and the recipe list stay vanilla's business and a storeroom full of unknown materials unlocks over a second instead of freezing a frame.

The find key is read in a plain Update; the hovered inventory item is found the way the game finds it for the tooltip, and the crafting panel's ingredient icons, recipe icon and recipe list entries are tested against the pointer the same way. If a patch throws, it logs the error and lets vanilla run.

Compatibility

  • Extra Slots, EquipmentAndQuickSlots 3.x, Better Archery: their slots are detected through the mods' own APIs and never stashed.
  • MultiUserChest: supported, see above.
  • Craft From Containers: complementary, not overlapping. It spends the resources in nearby chests on a recipe you already know; this mod unlocks the recipe in the first place. Nothing here touches the resource cost of a craft.
  • Other quick stack mods (QuickStackStore, QuickerStack, ...) should run alongside; they add their own buttons and hotkeys. Not tested together.
  • Auga or other UI replacements without a "take all" button: the Stash button is not shown; use tidychests stash or bind it to a key with a hotkey mod.

License

MIT

CHANGELOG

Changelog

1.3.1 - 2026-09-24

Contributed by @Chulii in #4 and #5.

  • The map hotkey no longer opens the map and clears a focused chest-list search. Its key character is now kept in the query.
  • Pressing Enter in a chest-list search now closes the list and highlights the chests that hold the first matching item instead of opening chat. A pinned item no chest holds any more is skipped.

1.3.0 - 2026-09-21

Asked for in #1. Tested as 1.3.0-beta.1.

  • Locks: items and slots the Stash button must leave alone, set from the inventory. Point at an item and press Shift+L to lock or unlock it: a locked item is never stashed, wherever it lies and whatever else lies around it. Point at a slot and press Shift+K to lock the slot itself: whatever is put there stays. Both keys are configurable.
  • Hold Shift (configurable) with the inventory open to see the locks: a grey padlock in the corner of a locked item, a red one on a locked slot. Pointing at a slot while holding it shows a tooltip with the state of both locks and the keys.
  • The locks are saved in [Locks] LockedItems and [Locks] LockedSlots as they are pressed, so they survive a restart and can be edited by hand. A slot is column:row counted from 0, the hotbar being row 0.
  • tidychests status and the debug log report the locks; a kept item is logged as LockedItem or LockedSlot.

1.2.2 - 2026-09-21

  • On Linux the cursor stayed pinned to the centre of the screen while the chest list was open: vanilla re-locked the mouse every frame and the mod undid it after the warp had already happened, which Windows hides by deferring the warp and Linux does not. Vanilla's mouse capture is now skipped while the list is open, so the cursor is released once and stays free. Reported and fixed by @Chulii.

1.2.1 - 2026-09-16

  • The chest list has a header: click Name or Count to sort by that column, click the active one again to flip it. The list starts with the largest stacks at the top, and the choice is saved in [Browser] Sort.
  • Items can be pinned. Click the diamond on the left of a row and it stays at the top of the list, above everything else, in the same order the rest is sorted in. The pins are saved in [Browser] Favorites as item names, so they survive a restart and a language change.
  • A pinned item stays listed with a count of 0 once no chest in range holds it any more, so a material running out is visible instead of silently disappearing from the list. Such a row is dimmed and does nothing when clicked, since there is nothing to highlight.
  • Pinning is ignored while something is typed in the search box: a search answers with its best matches first. The sort still decides the order among equally good matches.
  • tidychests status reports the sort and how many items are pinned.

1.2.0 - 2026-09-16

  • Optional server configuration. A server that also runs TidyChests and turns the new Server.ConfigPriority on decides Enabled, Radius, IncludeHotbar, ItemTypes, Blacklist, ScanRadius, ScanInterval and LearnFromChests for the players who have the mod, so everyone on it reaches as far and stashes by the same rules. The settings that travel are marked [synced] in the config file.
  • Keys, the Stash button, the panels and the highlights stay each player's own and are never sent.
  • The mod stays optional on both sides: it is not part of the game's version check, players without it are unaffected, and it keeps working on servers that do not have it or that leave ConfigPriority off.
  • The client's config file is never written to. The server's values live in memory for as long as the connection lasts and are dropped when it ends; a setting changed on a running server is sent to the connected players right away.
  • tidychests status and tidychests reload say where the active settings come from.

1.1.1 - 2026-09-15

Fixes to the chest list, from the first in-game test of 1.1.0.

  • The character no longer walks, attacks or looks around while the list is open. Walking and the mouse look are gated by a second check, PlayerController.TakeInput, which 1.1.0 did not patch, so typing a name into the search box moved the player.
  • The mouse wheel scrolls the list three rows per step instead of crawling, and no longer zooms the camera at the same time. Only the sign of the wheel is used, because the value the game reports per step has no fixed scale.
  • The list has a scrollbar, copied from the crafting panel's.
  • The search box keeps the keyboard when the keyboard layout is switched with a shortcut, or after the scrollbar is dragged, and what was typed is no longer selected when the focus comes back.

1.1.0 - 2026-09-15

  • Learning from chests (LearnFromChests, on by default): the items lying in the chests around you count as found, so their recipes unlock. Meant for co-op, where a team mate gathers a material you have never held and vanilla keeps the recipe locked until you touch the stack yourself. Trophies count too. This cannot be undone: turning the option off later does not lock a recipe again.
  • Chest list (Ctrl+O by default): every item in the chests in range, one row per kind, with the total, how many chests hold it and the distance to the nearest one. Type to filter by name; click a row to close the list and light up every chest holding that item; Escape or the same key closes it.
  • New Scan settings shared by both: ScanRadius (50 m, 5 to 90) and ScanInterval (5 s).
  • Neither feature sends anything over the network. The chest contents are already replicated to every client by the game, and a chest whose data revision did not change is not even re-read; known materials are local player data.
  • Console command tidychests scan, and tidychests status now reports what has been learned.

1.0.1 - 2026-09-12

  • The find key also works in the crafting panel: point at an ingredient of the selected recipe, at the recipe's icon or at an entry of the recipe list and press it to highlight the chests that hold that item.

1.0.0 - 2026-09-12

First release, built against the Valheim 1.0.12 assemblies.

  • Stash button in the inventory: every stackable regular item goes into the nearest chests (10 m by default, 1 to 20) that already hold that item, Terraria style. Existing stacks are topped up first, then empty slots, then the next chest.
  • Equipment, tools, weapons, equipped items, quest items, the hotbar (optional) and the slots of Extra Slots, EquipmentAndQuickSlots and Better Archery are never stashed; an item blacklist and a list of allowed item types are configurable.
  • Find key (T by default): point at an item in the inventory and press it; the inventory closes and every chest in range that holds the item is lit up, tinted and marked on screen with the count and distance.
  • Button label and messages localized (English, Russian) through the game's language setting.
  • Works with MultiUserChest; without it, chests in use by other players are skipped and ownership is claimed before writing.
  • Console command tidychests stash|reload|status.