SortContainers

v1.0.1·Updated 2026-09-26

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

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. 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.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. 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.

Dependencies

Install these first, or the mod will not work:

denikson-BepInExPack_ValheimValheimModding-Jotunn

File & checksum

Filename
SortContainers-1.0.1.zip
File size
12.7 KiB
SHA-256
9c14eb3fcbe34a14da75a948b35e41e4ae33a5b97aecadf7c62cac0b78d883bf
Stored at
2026-10-12 00:55