
ChestCategories
Give every chest a category (wood, metals, meats...), sort your inventory and chests with F8, pick categories in a Valheim-styled HUD, create your own and lock items from sorting with a middle click.ChestCategories
Give every chest a category (wood, metals, meats...) and keep your base tidy: one key sorts your inventory and the chests around you into the right ones, and an in-game HUD lets you pick categories, create your own and decide which items belong to each.
(Versión en español más abajo.)
What it does
- Look at a chest and press
F7to open the category HUD. Click a category and the chest is tagged. The tag shows under the chest's name when you look at it. - Press
F8to sort. Every item in your inventory and in the chests around you (20 m by default) goes to the chest whose category it belongs to. What does not fit stays where it was; nothing is lost or duplicated. - Middle-click an item in your inventory to lock it: F8 will never move it. A padlock shows on the slot. Middle-click again to unlock.
- Strict chests (optional, on by default): a chest with a category refuses items of other categories when you drop or shift-click them in by hand. What is already inside is never touched.
- 19 categories out of the box: Wood, Metals, Stone, Valuables, Hides and leather, Farming and seeds, Vegetables and berries, Meats, Prepared meals, Cooking ingredients, Tools, Potions and meads, Weapons and shields, Armor, Accessories, Ammunition, Trophies, Creature drops and Other materials.
- Make your own: in the HUD you can create categories, rename them (English and Spanish), recolour them and add or remove items with a searchable list of every item in the game (with icons, filtered by "my inventory" or "no category"). Changes are saved straight away.
- The HUD is drawn to look like part of Valheim (wooden panel, dark slots, bronze buttons) and uses the game's own fonts.
Controls
| Key | Action |
|---|---|
F7 while looking at a chest |
Open the HUD on that chest |
F7 while looking at nothing |
Open the HUD to edit categories |
Shift + F7 / Ctrl + F7 |
Next / previous category of the chest you look at, without opening the HUD |
F8 |
Sort inventory and nearby chests |
| Middle mouse button on an inventory item | Lock / unlock the item from F8 |
Esc or F7 (HUD open) |
Close the HUD |
All keys can be changed in the config file.
Good to know
- Chests are tagged in the chest's own data, so the tag is saved with the world and travels with the chest. Players
without the mod just see ordinary chests. The list of categories (names, colours, which items go where) is a text
file in
BepInEx/config, per player. - Chests with no category are left alone by F8, so a chest you set up on purpose (ore next to a smelter) is not emptied. There is an option to include them.
- Equipped items, quest items and the top row of your inventory (hotbar) are never moved.
- Locks and tags are not cheats: they only change where F8 puts things. The mod never creates or deletes items; a lock is just a small marker stored on the item.
- Messages and category names appear in Spanish when the game is set to Spanish, and in English otherwise.
Configuration
BepInEx/config/com.despr0grammer.chestcategories.cfg
| Option | Default | What it does |
|---|---|---|
MenuKey |
F7 | Opens the HUD |
SortKey |
F8 | Sorts |
HudScale |
1 | Size of the HUD |
Radius |
20 | How far (metres) F8 looks for chests |
SortPlayerInventory |
true | F8 also moves items from your inventory |
SkipHotbar |
true | Never move the top row of your inventory |
PullFromUncategorized |
false | F8 also empties chests that have no category |
MiddleClickLock |
true | Middle-click locks an inventory item from F8 |
StrictChests |
true | A chest with a category refuses other categories when you drop items in by hand |
ShowCategoryOnHover |
true | Show the category when you look at a chest |
The categories live in BepInEx/config/despr0grammer.ChestCategories.categories.txt. You can edit it by hand or from
the HUD; it is reloaded when you open the HUD or press F8. The HUD saves it with a backup (.bak before the first save,
.prev before each one).
Compatibility and known limitations
- Made for Valheim 1.0.x with BepInEx 5 (BepInExPack_Valheim). If a game update changes something the mod
patches, the affected feature turns itself off and says why in
LogOutput.loginstead of breaking the game. - It is meant for single player and for friends you trust. In multiplayer the mod takes ownership of the chests it sorts, as the game does when you open one, and skips chests another player has open. It has had little multiplayer testing, so report anything odd.
- This is a first release. The HUD, the item picker and the middle-click lock are new: if something looks wrong or does
not respond, please send the
ChestCategorieslines ofLogOutput.log.
Credits
Inspired by the chest mods in Teflon Ted's Valheim mod suite (especially Sort Into Chests). The code here is written from scratch and shares nothing with them.
Written by despr0grammer with the help of Claude, an AI assistant, which is why it is listed under AI Generated.
ChestCategories (español)
Asigna una categoría a cada cofre (madera, metales, carnes...) y mantén tu base ordenada: una tecla ordena tu inventario y los cofres cercanos en los cofres correctos, y un HUD dentro del juego permite elegir categorías, crear las tuyas y decidir qué objetos van en cada una.
Qué hace
- Mira un cofre y pulsa
F7para abrir el HUD de categorías. Pulsa una categoría y el cofre queda etiquetado. La etiqueta aparece bajo el nombre del cofre al mirarlo. - Pulsa
F8para ordenar. Cada objeto de tu inventario y de los cofres cercanos (20 m por defecto) va al cofre cuya categoría le corresponde. Lo que no cabe se queda donde estaba; no se pierde ni se duplica nada. - Clic con la rueda del ratón sobre un objeto de tu inventario para bloquearlo: F8 nunca lo moverá. Un candado aparece en la casilla. Otro clic con la rueda lo desbloquea.
- Cofres estrictos (opcional, activado por defecto): un cofre con categoría rechaza objetos de otras categorías cuando los metes a mano (arrastrando o con Shift+clic). Lo que ya estaba dentro no se toca.
- 19 categorías de serie: Madera, Metales, Piedras, Tesoros, Pieles y cuero, Cultivo y semillas, Vegetales y bayas, Carnes, Comidas preparadas, Materiales para comida, Herramientas, Pociones e hidromieles, Armas y escudos, Armaduras, Accesorios, Munición, Trofeos, Botín de criaturas y Materiales varios.
- Crea las tuyas: en el HUD puedes crear categorías, renombrarlas (español e inglés), cambiarles el color y añadir o quitar objetos con una lista con búsqueda de todos los objetos del juego (con iconos; filtros «mi inventario» y «sin categoría»). Los cambios se guardan al instante.
- El HUD está dibujado para parecer parte de Valheim (panel de madera, ranuras oscuras, botones de bronce) y usa las fuentes del propio juego.
Teclas
| Tecla | Acción |
|---|---|
F7 mirando un cofre |
Abre el HUD sobre ese cofre |
F7 sin mirar nada |
Abre el HUD para editar las categorías |
Shift + F7 / Ctrl + F7 |
Siguiente / anterior categoría del cofre que miras, sin abrir el HUD |
F8 |
Ordena inventario y cofres cercanos |
| Botón central del ratón sobre un objeto del inventario | Bloquea / desbloquea el objeto para F8 |
Esc o F7 (con el HUD abierto) |
Cierra el HUD |
Todas las teclas se pueden cambiar en el archivo de configuración.
Conviene saber
- La etiqueta del cofre se guarda en los datos del propio cofre, así que va con el mundo y con el cofre. Quien no
tenga el mod ve cofres normales. La lista de categorías (nombres, colores, qué objetos van a dónde) es un archivo de
texto en
BepInEx/config, de cada jugador. - Los cofres sin categoría no se tocan con F8 (por ejemplo, el cofre de mineral junto al horno). Hay una opción para incluirlos.
- Los objetos equipados, los de misión y la fila de arriba del inventario (barra rápida) nunca se mueven.
- No son trampas: etiquetas y bloqueos solo cambian dónde pone las cosas F8. El mod nunca crea ni borra objetos; un bloqueo es solo una pequeña marca guardada en el objeto.
- Los mensajes y los nombres de las categorías salen en español si el juego está en español, y en inglés en los demás casos.
Compatibilidad y límites conocidos
- Hecho para Valheim 1.0.x con BepInEx 5 (BepInExPack_Valheim). Si una actualización del juego cambia algo que
el mod parchea, la función afectada se apaga sola y lo explica en
LogOutput.log, en lugar de romper el juego. - Pensado para un jugador y para amigos de confianza. En multijugador el mod se hace dueño de los cofres que ordena, como hace el juego al abrirlos, y salta los cofres que otro jugador tiene abiertos. Se ha probado poco en multijugador: avisa si ves algo raro.
- Es una primera versión. El HUD, el selector de objetos y el bloqueo con la rueda son nuevos: si algo se ve mal o no
responde, envía las líneas de
ChestCategoriesdeLogOutput.log.
Créditos
Inspirado en los mods de cofres de la colección de Teflon Ted (sobre todo Sort Into Chests). El código está escrito desde cero y no comparte nada con ellos.
Escrito por despr0grammer con ayuda de Claude, un asistente de IA, por eso aparece en la categoría AI Generated.