SortContainers
Adds a sort button to chests and other containers that alphabetically sorts (and stacks) their contents. Client-side.
Screenshots 1 screenshots
About this mod Author’s original text
Sort Containers
A small client-side Valheim mod that adds a sort button to chests and every other container window.
Click it and the container's contents are laid out alphabetically, row by row. Partial stacks of the same item are combined on the way (optional).
- The button sits just right of the vanilla Place stacks button and matches its styling.
- Sorting is by item name, then quality (highest first), then stack size.
- Works on any container: chests, carts, ships, reinforced chests, modded containers that use the vanilla window.
- Nothing is dropped, lost or moved between inventories. It only rearranges what is already in the container.
Installation
Install with r2modman Mod Manager, or drop SortContainers.dll into BepInEx/plugins.
Requires BepInExPack Valheim and Jötunn. Client-side only: the server does not need it. The client that has a container open already owns its data, so the sorted layout is saved and synced exactly like the vanilla "Place stacks" button.
Configuration
BepInEx/config/dsoltyka.SortContainers.cfg is created on first launch.
| Section | Setting | Default | Meaning |
| --- | --- | --- | --- |
| General | MergeStacks | true | Combine partial stacks of the same item while sorting |
| Layout | ButtonGap | 4 | Gap between "Place stacks" and the sort button, in pixels |
| Layout | ButtonSize | 0 | Button size in pixels; 0 matches the "Place stacks" height |
| Layout | IconPadding | 6 | Inset of the icon inside the button |
Layout settings take effect the next time the container window is created (relog or restart).
Source
Code is on GitHub at dsoltyka/ValheimSortContainers.
License
MIT. See LICENSE.
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.
Install these first, or the mod will not work: