Valheim
Install with App

Details

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

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).

Before and after sorting a chest

  • 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 / Thunderstore 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.

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