SortingTweaks
Just a few little tweaks and customizations for me and my friends: per-chest sorting (including by biome) for Quick Stack Store, and Eitr combos plus a craftable-only eye for the Food Categories filters.Sorting Tweaks
Just a few little tweaks and customizations for me and my friends. Nothing fancy, nothing official: small add-ons that make two other mods work the way we like. You are welcome to use it, but it is made for our own game, so don't expect support or a roadmap.
Each tweak switches on only when the mod it extends is installed.
Requires
- BepInExPack Valheim 5.4.2351
- Quick Stack - Store - Sort - Trash - Restock 1.4.15 (per-chest sort)
- FoodCategories 0.1.35 (food tweaks)
All of them are client-side, so nobody else on the server needs this mod.
Per-chest sorting (Quick Stack Store)
Quick Stack Store has one sort setting for every chest. With this, each chest gets its own.
Open a chest and use the two buttons at the top right of the chest window:
- Sort: ... cycles
Default->ID->Name->Weight->Type->Biome. - Asc / Desc switches the direction.
The chest is sorted right away and remembers its choice. Default means "whatever Quick Stack Store is set to". Its own sort button, hotkey and auto-sort use the chest's setting too. Your inventory is not affected.
- ID sorts by the internal item name (for example
$item_wood), Name by the name shown in the game. The internal name is text, so this is alphabetical, not a numeric ID. - Biome sorts by the biome an item first becomes available in (see below).
- A chest is recognised by its position in the world, so moving it resets its setting. Settings are stored on your machine only.
- If the buttons sit in a bad spot, move them with
ButtonOffsetX/ButtonOffsetYin the config (live in the Configuration Manager).
Biome order
Meadows -> Black Forest -> Swamp -> Mountain -> Plains -> Mistlands -> Ashlands -> Deep North -> Ocean -> everything without a biome.
Inside one biome the trophies come first, then the other known items in the order of the built-in table, then everything crafted (alphabetically).
Valheim does not store a biome on items, so it is worked out:
- Trophies and raw items (drops, ores, plants, fish, boss drops) come from a built-in table. A boss drop belongs to the biome of the boss. A fish belongs to the biome it is caught in (Tuna and Coral Cod count as
Ocean, Pufferfish asMistlands). - Things made from other things (cooked and mixed food, smelted metals, armor, weapons, meads) take the latest biome of their ingredients, read from the game's own recipes. For example, Lingonberries + Deer Meat is
Deep North, and a smelted metal follows its ore. - Items found nearly everywhere (Wood, Stone, Coal, Coins and other valuables, eggs, trader goods) and any item the mod cannot place go to the end, in the "no biome" group.
The first time a chest is sorted by biome, the BepInEx log gets a line Items without a biome (...) listing what could not be placed.
Food filters (FoodCategories)
Extends the filter bar next to the cooking recipes.
Combos. You can now select several filters:
Eitr+HealthorEitr+Staminashows the foods that give Eitr, ranked by the combined value. Health and Stamina can't be combined with each other (every food gives both), picking one swaps out the other.Balanced(neutral) andFeastalways stand alone, selecting one clears the others.- Ranking of a combo is the sum of both values by default. Set
ComboScoretoMaxto rank by the higher of the two instead.
The eye. A new eye button at the bottom of the filter bar:
- Closed (default): only recipes you can craft right now are listed, so the top of the list is always something you can actually cook.
- Open: recipes you have unlocked but can't craft yet (the greyed out ones) are listed too, ranked together with the rest.
The state is remembered (ShowUncraftable in the config). It applies to all food filters, including "no filter".
Quieter tab switching
Clicking between the Craft and Upgrade tab of a crafting station plays two sounds a few milliseconds apart in vanilla Valheim: the button click and a "group changed" sound. This tweak keeps the click and mutes the second one. It does not need any other mod. Turn it off with QuietTabSwitch in the config.
The same doubling happens on every button at a high frame rate: a mouse click plays a select sound on press and a click sound on release, and the game only merges them when they land within two frames. With QuietMouseClick (on by default) the select sound is skipped for mouse clicks. Keyboard and gamepad navigation are not affected.
Good to know
- These tweaks hook into the internals of the mods above. If one of them updates and changes those internals, the matching tweak turns itself off and writes a line to the BepInEx log instead of breaking the game.
- Other mods that also rearrange the crafting list (for example recipe search mods) can fight with the food list.
- The biome table is written by hand from the wiki and may be wrong for some items.
Source
A plain BepInEx + Harmony plugin. Per-chest sort patches SortModule.SortInternal / SortCompare of Quick Stack Store and adds two buttons to InventoryGui. The food tweaks run as a postfix of FoodCategories' Apply and correct the list it just built.
