Valheim
Install with App

Details

Latest version
1.0.0
Last Updated
First Uploaded
Downloads
579
Likes
0
Size
278KB
Dependants
ADDatHost Valheim hosting
€1

AutoChestSort

Name your chests. Teach them once. Let the server keep things tidy.

Dump everything into an Input chest and walk away. AutoChestSort moves it, stack by stack, into the chests you taught. Chests that hold the wrong thing sort themselves, a group spreads its stock sensibly over its chests, and Misc catches the overflow until there is room again.

No client magic, no item loss, no automation beyond your storage.

One modded player is enough. The mod lives on the server. One person with it installed names the chests, teaches the groups and holds the config. With allowVanillaClients = true everyone else can play completely vanilla and still gets their Input chest emptied.

Read this first

This is version 1.0. Back up your world before you use it. The mod writes into chest inventories, and it will have rough edges. Names, groups, the learn dialog, Input sorting, chest-to-chest tidying, clusters, the spreading stage, the beautify pass and the config sync are built and tested on a dedicated server, but that is not the same as being finished.

Why would you want this

Every Valheim player knows the moment: you come home with a full inventory and spend the next five minutes walking past twelve chests, shuffling stacks around.

  • The sorting marathon. Wood to the wood chest, ore to the smelter room, food to the kitchen. Every trip home turns into a logistics job.
  • Where did I put it? Unlabelled chests are lucky dips. Signs help you find things, but they do not put anything away, and they do not stop three chests from each holding a bit of everything.
  • Multiplayer entropy. On a server everyone sorts differently. The system one player builds is gone after the next visitor.

The idea: instead of telling the mod where every item goes, you tell the chest once. Put in what belongs there, press +, done. From then on the whole group knows its items, and the server does the walking.

What does the mod do

Names, groups, and a server that does the work. Nothing else changes about how you play.

  • Chests get names. A name field right in the chest window. The name lives in the chest itself, so the game saves and syncs it. It also shows in the hover text before you open the chest.
  • Same name, same group. Every chest called Building is one group. Rename one chest and the whole group follows. Case does not matter. Works for all six vanilla chests, from the barrel to the wardrobe.
  • Groups learn their items. Fill a chest, press +: the item types inside now belong to that group. A dialog lets you replace the old list or merge into it.
  • Input chests. A chest named Input is your drop-off point. The server empties it one stack per second into the group chests of the same cluster.
  • Chests tidy themselves. No Input chest needed. Drop ore into the wood chest and the server carries it to the ore chest. Teach an item to a new group and every chest in range hands it over.
  • A group spreads its stock. Two wood-and-stone chests end up as one wood chest and one stone chest. Big amounts push each other apart, small ones may share, partial stacks are poured together.
  • Misc is the buffer. Items with no group in the cluster, overflow from full group chests and unknown items land in Misc. As soon as a matching chest has space again, Misc sends it back.
  • Clusters, not a radius. Chests standing within 12 m of each other chain into one cluster, and a cluster is one store. Your outpost across the valley is its own store. Nothing ever travels between them.
  • Optional: tidy-looking chests. Switch it on and every group chest is packed from the top left, equals next to equals, full stacks first. Off by default.
  • The server sorts. Only the server. In singleplayer, or when you host from your own game, you are the server. No client ever moves an item, so two players cannot race each other. Every move adds to the target first and removes from the source second. Open chests are never touched, a chest gets a cooldown after it is closed, and the server reads every move back to prove it landed.
  • English and German, quiet log. Tooltips, messages and dialogs show in each client's language, English as the fallback. Input and Misc stay the same in both, because they are data, not labels.

The sorting chain

Everything happens inside one cluster of chests. One move per second at most. Six steps per tick, and a step only gets its turn when every step before it found nothing to do.

# Step What it does Setting Default
1 Input chest One stack out of Input to where it belongs. always on on
2 Ungrouped out Items no group knows leave a group chest for Misc. relocateUnassignedToMisc off
3 Wrong group out Ore in the wood chest goes to the ore chest. relocateMisplacedItems on
4 Spread the group Stock is spread over the group's chests by plan. relocateItemStacks on
5 Misc back home Anything with a group leaves Misc once there is room. always on on
6 Beautify Pack a group chest neatly. Purely cosmetic. beautifyChestItemOrder off

Everything that does not belong in a group leaves it before the mod works out how to spread the rest, and Misc is emptied back into a group after that group has made room. Nothing is made to look tidy while anything else still has real work to do.

Out of an Input chest, in this order:

  1. Group chests of the same cluster whose group knows the item type and that have room.
  2. Of those, the chest that already holds the most of that type wins. Ties go to the chest built first, never to the nearer one.
  3. None holds it yet? Any chest of the group with space.
  4. Otherwise a Misc chest of the cluster, preferring one that already has a stack of this type. Also for items the server does not know.
  5. Otherwise the stack stays in Input. Nothing gets lost, nothing leaves the cluster.

If somebody has any chest of that group open, or just closed it, the item type waits instead of landing somewhere that is not its home.

Out of any other chest:

  • Group chest: a stack is misplaced if its type was taught to a different group. It moves to a chest of that group in the cluster. Items that belong to no group stay where you put them unless you enable step 2.
  • Misc chest: anything with a group leaves for a chest of that group as soon as one in the cluster has space. That is how overflow and early mistakes find their way home.
  • Never: group chest to Misc, Misc to another Misc, or anything across cluster borders.
  • A group chest has to be quiet twice as long as an Input chest before the server takes anything out of it. A beautify rewrite waits three minutes.
  • The sorter measures every attempt and stops for the second when it has spent its milliseconds. A big base sorts slower. The server does not.

Clusters instead of a radius. Two named chests are neighbours when they stand at most graphEdgeRadius (12 m) apart, and everything connected through a chain of neighbours is one cluster. Five chests along a wall with 4 m gaps are one cluster even though the first and the last are 16 m apart. A workshop forty metres away is its own cluster, and nothing ever travels between the two. A chest with no name is not a node and cannot bridge anything.

The one that surprises people: a chain of named chests joins two bases. Storage along a path, a chest at a landing spot, a row on a long pier. If every gap is under 12 m, the far base becomes part of the same store. If you did not mean that, lower graphEdgeRadius, take the name off the bridging chest, or use different group names. The server warns once when a cluster grows past 40 chests or 80 m across, and acs_dump lists every cluster.

Spreading and tidying

Two stages work within a group. One decides which chest holds what and is on by default. The other decides how a single chest looks and is off by default.

Spreading a group over its chests (relocateItemStacks, on by default). For every group in a cluster the mod works out, once, which item type belongs into which chest and how much of it. Then it moves one stack per second towards that layout. Two Building chests holding a mix of wood and stone end up as one wood chest and one stone chest. The plan only changes when you change something in one of the chests, so nothing wanders.

  • Big amounts push apart, small ones may share. A type needing more than two slots wants a chest of its own. A handful of seeds does not deserve one.
  • A single-type chest may be filled to the brim. A mixed chest keeps one free slot, if the group can afford it. That slot is what lets the next move happen.
  • Partial stacks are poured together. 10 + 3 wood become 13.
  • A brim-full chest gets unblocked with a parked stack: one stack is moved to another chest of the same group to gain a slot, and fetched back later. Wood in the stone chest for a minute is the mod working, not misplacing.
  • Not touched: equipment, tools, items this server does not know, oversized stacks, anything of another group.

Making a chest look tidy (beautifyChestItemOrder, off by default). It changes nothing about where your items are. No unit leaves the chest. Only which slot a stack sits in, and how the stacks are split.

  • Packed from the top left, row by row, no gaps. Named group chests only, never Input or Misc.
  • Equals next to equals, in progression order: Meadows first, then Black Forest, Swamp, Mountains, Plains, Mistlands, Ashlands, Deep North. Alphabetical inside a tier. Wood before fine wood, copper before iron.
  • Full stacks first, one partial stack per type at most. 6/10 + 7/10 becomes 10/10 + 3/10.
  • Gear keeps your order. Tools, weapons and armour do not stack, so they are only moved up to close gaps.
  • One write per chest, after three quiet minutes, read back to prove it arrived.
  • Hand-made arrangements are replaced. If you sorted a chest a particular way on purpose, leave this off. That is exactly why it is off by default.

What it does not do

AutoChestSort is a storage mod, not an automation mod. The goal is the vanilla experience without the sorting headache.

  • No feeding of smelters, kilns or forges. Ore never walks into a smelter, wood never into a kiln, coal never into a blast furnace. Fuelling and crafting stay your job.
  • No teleporting across the map. Every move stays inside the cluster the source chest belongs to, and only while a player is nearby. Your outpost does not drain into your main base.
  • No touching your inventory. The mod moves stacks between chests. Never out of your pockets, never into them.
  • No carts, ships, tombstones. The six stationary vanilla chests you build yourself, and mod chests you list explicitly. No ships, carts, personal chests, tombstones, dungeon or treasure chests. A chest you never name is never touched.

Installation

The mod has to run on the server, because the server does the sorting. There is no client fallback. In singleplayer, or when you host a world from your own game, your game is the server and the client install is all you need.

Whether players without the mod may join is one switch: by default allowVanillaClients = false turns them away with the game's usual "incompatible version" message. Set it to true and you have a server-only setup: one player with the mod names chests and teaches groups, everyone else plays pure vanilla and still gets sorted. A client that does have the mod must always match the server version down to the patch digit.

Option A: r2modman or Thunderstore Mod Manager

  1. Create or open a Valheim profile.
  2. Search for AutoChestSort and install it. BepInExPack and Jotunn come along automatically.
  3. Start the game once. The config file is created with its defaults.

For a dedicated server, the mod manager has a separate game entry Valheim Dedicated Server. Create a profile there, install AutoChestSort the same way, and point the profile at your valheim_server.exe. Same package, same dependencies, nothing else to do.

Option B: Manual

  1. Install BepInExPack Valheim and run the game once so the folders exist.
  2. Unpack Jotunn into BepInEx/plugins/.
  3. Copy both AutoChestSort.dll and AutoChestSort.Core.dll into BepInEx/plugins/AutoChestSort/. The plugin does not load without the second one.
  4. Repeat on the dedicated server.

What it looks like afterwards, on client and server alike:

BepInEx/
├── plugins/
│   ├── AutoChestSort/
│   │   ├── AutoChestSort.dll        # the mod
│   │   └── AutoChestSort.Core.dll   # its logic library, required
│   └── ValheimModding-Jotunn/       # dependency
└── config/
    ├── nexxy.valheim.autochestsort.cfg   # settings, created on first start
    └── AutoChestSort/
        └── worlds/
            └── <world>.yaml              # group assignments per world, server only

Nothing has to be copied between client and server. The fifteen server settings are pushed to every connected client automatically. Only two settings are local to each machine: debug logging and the hover line.

Dependencies and supported chests

Package Version Used for
denikson-BepInExPack_Valheim 5.4.2350 The mod loader. Required by every Valheim mod.
ValheimModding-Jotunn 2.30.0 UI, localization, config sync from server to clients, version check on connect. Hard dependency: without Jotunn the mod does not load.
ConfigurationManager (optional) any recent build Lets an admin edit the server settings in game. Without it you edit the config file. Nothing in the mod needs it.

Built and tested against Valheim 1.0.12, client and dedicated server.

The six stationary chests you build yourself are always supported and cannot be switched off. A chest only takes part once you give it a name.

Chest Prefab
Chest piece_chest_wood
Barrel piece_chest_barrel
Reinforced Chest piece_chest
Black Metal Chest piece_chest_blackmetal
Grausten Chest piece_chest_grausten
Wardrobe piece_chest_warderobe

Chests from other mods can be listed in additionalChestPrefabs in the server config, at your own risk: a container with its own inventory logic reads as empty and is never written. The grid is read off the prefab, never guessed.

Known incompatibility: SmartContainers. It routes items into chests from the client side, so both mods would fight over the same stacks. Do not run them together.

Using it

Everything happens in the chest window. Open a chest and the AutoChestSort panel appears below the inventory: a name field, four buttons, an info line and a status line.

Control What it does
Name field Free text, up to 32 characters. Enter or clicking elsewhere saves, Esc reverts. While it has focus, WASD does not leak into the game.
Ø Reset Clears the name of this one chest. It leaves the group; the group itself stays.
i Info Folds the list of learned item types open and closed.
+ Learn Opens the learn dialog with what is in the chest right now. On a nameless, empty chest it turns the chest into a Misc chest instead.
- Delete group Only with Ctrl + click, with a confirmation. The assignment is gone and every chest of the group loses its name.
Hover line Looking at a chest shows "AutoChestSort: Building" without opening it.

Five minutes to a sorted base

  1. Name a chest. Open a chest, type Building into the name field, press Enter. The info line says "Group: Building - 1 chest(s)". A name that already exists makes the chest join that group. Changing the name of a group chest renames the whole group.
  2. Teach the group what belongs in it. Put one of everything that should live here into the chest: wood, stone, core wood. Press +, then pick Replace or Merge.
  3. Add more chests to the group. Every further chest named Building belongs to the group and knows the same items. Nothing to re-teach. Keep the chests within 12 m of a neighbour so they form one cluster.
  4. Optional: an Input chest. Open an empty chest in the same cluster and name it Input. From now on the server empties whatever you throw in there. You can have several, at different bases too, and you do not need one at all.
  5. Optional: a Misc chest as the buffer. Open a nameless, empty chest and press +, or type Misc as the name.

Good habit: teach the group chests first, then fill the Input chest. The sorter works one stack per second, so a full chest takes about half a minute and you can watch it empty. A chest you just built or just named is picked up after the next world scan, so give it a minute. After switching the mod on in an old base, expect a wave of moves until every group has sorted itself out.

Several players. Changes only work on the chest you have open. If someone else has a chest of the same group open, your buttons are greyed out ("Group locked"), and that group's item types wait instead of landing elsewhere.

Groups are world-wide, stores are local. A group name is one vocabulary for the whole world: Building at base A and Building at base B know the same items. Sorting itself is always local to a cluster.

Teaching a group

You never type item names. You show the chest what belongs in it and press +.

  1. Fill the chest. One of each is enough. Quantity does not matter, only the item types. The chest needs a name first; on a nameless chest with contents + is greyed out.
  2. Press +. The client asks the server for a preview. The dialog lists what is new for the group and what a Replace would drop, because it is not in the chest right now.
  3. Replace or Merge. Replace makes the chest's contents the whole list. Merge keeps everything the group already knew and adds the new types. If both would do the same thing, there is just one Learn button.
  4. Conflicts, one at a time. An item type belongs to exactly one group. If Coal is already in Fuel, you are asked: Yes moves it here, No leaves it in Fuel and skips it, Cancel aborts the whole operation and changes nothing.
  5. Done. Every chest of the group knows it immediately, nothing to repeat per chest. The i button shows the list any time.

Re-teach any time: put the new item in, press +, choose Merge. To remove a type, open a chest that has everything except that type and choose Replace.

Teaching moves things. The moment an item type joins a new group, every chest in a player's range starts handing that type over to its new home, one stack per second. Move Coal from Fuel to Smelting and the fuel chests empty themselves of coal. On a large stock it takes a while.

The Misc shortcut. + on a chest with no name and nothing inside does not open the dialog. It turns the chest into a Misc chest right away. Roles never learn items: Input and Misc have all buttons except Reset greyed out.

Configuration

One BepInEx config file, BepInEx/config/nexxy.valheim.autochestsort.cfg, created with its defaults on first start. Seventeen keys: fifteen in [Server], admin-only and synced to every connected client, and two in [Client] that stay on your own machine. Saving the file reloads it without a restart, and acs_config reload does the same by hand.

Key Section Default Meaning
graphEdgeRadius Server 12 Metres between neighbouring chests; chains into clusters.
activationRadius Server 28 Metres: a player this close wakes the whole cluster.
sortIntervalSeconds Server 1 Seconds between two moves, one move at most.
sortBudgetMsPerSecond Server 2 CPU budget per second, 0 is unlimited.
closeCooldownSeconds Server 3 Seconds a chest is left alone after it was closed. Safety setting, do not lower it.
blockedPauseSeconds Server 60 Pause after a round in which everything was blocked.
ignoreInUseWhenOwnerDisconnected Server true Ignore a chest left "in use" by a player who is gone.
chestIndexRescanSeconds Server 60 Seconds between two full world scans for chests.
conflictWarnThreshold Server 5 Conflicts within ten minutes before players get a chat warning.
relocateMisplacedItems Server true Master switch for steps 2 to 6. false gives you pure Input sorting.
relocateUnassignedToMisc Server false Step 2: sweep ungrouped items out of group chests to Misc.
relocateItemStacks Server true Step 4: spread a group over its chests.
beautifyChestItemOrder Server false Step 6: pack a group chest neatly. Cosmetic only.
additionalChestPrefabs Server (empty) Mod chests, comma-separated, at your own risk.
allowVanillaClients Server false true lets players without the mod join.
enableDebug Client false Verbose logging on the machine that reads this file.
showChestNameOnHover Client true Show the ACS name in a chest's hover text.

The group assignments live per world in BepInEx/config/AutoChestSort/worlds/<world>.yaml, written by the server. You can edit it by hand; item types are the internal prefab names. It belongs to the world: copy the world, copy the file.

Console (F5): acs_sort status shows counters, clusters, the time budget, parked stacks and the beautify stage. acs_sort pause and acs_sort resume stop and restart the sorter. acs_dump lists every cluster and chest. acs_config status and acs_config reload handle the config. acs_group shows a chest's group. acs_debug on|off toggles verbose logging.

FAQ and limits

Can players without the mod join my server? Yes, with one switch. By default (allowVanillaClients = false) a server refuses a client that does not run AutoChestSort. Set it to true and vanilla players join and play normally: no name field, no buttons, no teaching, but whatever they throw into an Input chest gets sorted anyway, because the server does it. Players with the mod always need the same version as the server.

What exactly is a cluster? All named chests that hang together through neighbours standing at most 12 m apart. A cluster is one store: every move stays inside it, and standing next to any chest of it wakes the whole cluster. A chest with no neighbour is its own cluster and can only be tidied inside itself.

Why is my Input chest not sorting? The usual suspects, in order: nobody is within 28 m of any chest of the cluster; the Input chest is not in the same cluster as the group chests (run acs_dump); somebody has a chest of the target group open or just closed it; you just built or renamed the chest and the next world scan is up to 60 s away; the group does not know the item type and there is no Misc chest in the cluster; somebody paused the sorter; the mod is not running on the server.

Why is there wood in my stone chest all of a sudden? For a minute, that is the spreading stage at work. A brim-full chest has no slot to work with, so one stack is parked in another chest of the same group and fetched back as soon as the plan can take it. It never leaves the group and never leaves the cluster.

Will it rearrange chests I sorted by hand? Between chests of a group, yes, by default. Set relocateItemStacks = false if you like your chests exactly as you arranged them. Inside a chest, no, unless you switch beautifyChestItemOrder on.

How fast is it? One stack per second at most, shared across all chests in the world. That is deliberate: the server must never stall, and moves must never race a player. On top of that there is a CPU budget of a few milliseconds per second, so a huge base sorts slower rather than lagging everyone. Several Input chests take turns, so more Input chests mean more time, not more speed.

What happens when a group chest is full? The next chest of the group gets it. If every chest of the group in the cluster is full, the stack goes to Misc as a buffer. As soon as a group chest has space again, Misc hands it back. Nothing is thrown away and nothing stays stuck in Input forever.

Can I have different groups per base? Not in this version. Group names are world-wide, an item type belongs to the same group everywhere. Separate bases still work, because sorting only ever happens inside a cluster. A per-base scope is on the idea list.

What about items and chests from other mods? Items can be taught like any other as long as the server knows the mod. Items the server does not know are moved to Misc untouched: the mod copies the raw data byte for byte instead of interpreting it, so nothing is lost.

Can a player overwrite a server move? Rarely. While you have a chest open, your game owns its inventory and writes it back when you close it. If that lands on top of a move the server just made, the stack exists twice. Nothing is lost; the server counts and logs it. The cooldown after closing, doubled for group chests, keeps this rare. Do not lower it.

Other limits. One item type belongs to exactly one group, so teaching it to a second group takes it out of the first (you get asked). A crashed client can leave a chest marked as open, which blocks group-wide changes until someone opens and closes that chest again. The name field blocks keyboard input while you type in it, and releasing it again can release another mod's input block at the same time.

The full manual

This page is the short version. The complete handbook ships with the package as MANUAL.md, next to the DLLs in BepInEx/plugins/NexGaming-AutoChestSort/. It covers every setting with its range, the console commands, the group file format, troubleshooting and what ends up in the log.

License

AutoChestSort is released under the MIT License, Copyright (c) 2026 Nexxy. You may use, modify and pass on the mod, including as part of something else, as long as the copyright notice and the license text travel with it. The full text ships with this package as LICENSE, next to the DLLs in BepInEx/plugins/NexGaming-AutoChestSort/.


Valheim is a title by Iron Gate Studio. This mod is a community project and is not affiliated with Iron Gate or Coffee Stain.

DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro