Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
LootFilter
Mark the items you never want to auto-pickup, like Resin, with one key. Hand pickup still works. Client-only: it works on any server.
By FlyingHose
| Last updated | an hour ago |
| Total downloads | 4 |
| Total rating | 0 |
| Categories | Utility |
| Dependency string | FlyingHose-LootFilter-1.0.0 |
| Dependants | 1 other package depends on this package |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2360README
Loot Filter
Part of FlyingHose's Modpack. Needs only BepInEx.
I got tired of walking past a pile of Resin and having it jump into my inventory. This stops auto-pickup for the kinds of item you pick. Everything else still flies into your hands like it does now.
Using it
Look at an item on the ground and press K. That kind of item is now ignored: walking over it no longer picks it up, and you see No longer picking up Resin. Press K on one again and it goes back to normal, with Picking up Resin again. Press K while looking at nothing and it tells you how many kinds you are ignoring.
Looking at an item on the ground also shows a line under its name, [K] Ignore or [K] Pick up again, so you can see which it is.
An ignored item at your feet is not a bug
If you stand on an item of an ignored kind and nothing happens, that is the filter working. The hover text says [K] Pick up again on those. The Use key still picks the item up by hand, the same as in the game, so ignoring a kind never locks you out of it.
The list
The list is the setting Filter.Ignored in BepInEx/config/com.yesucs.yesubuildkit.lootfilter.cfg. It holds the prefab names of the items, separated by commas, for example Resin,GreydwarfEye. A prefab name is the same in every language. It is not case sensitive. The key adds and removes names for you.
You can edit the file by hand while the game runs. The mod rereads it half a second after the last save and applies the change then. Changing the list, by key or by file, also applies to items that are already lying on the ground.
Things I left alone
- Turning off the game's own auto-pickup (V by default) still turns off all auto-pickup.
- A stack you drop yourself is never auto-picked by the game, so you can hand it to a friend. The mod does not change that. Taking a kind off the list does not make a stack you dropped jump back into your inventory.
- Nothing is dropped or deleted. The mod only declines to pick things up.
Settings
| Setting | Default | What it does |
|---|---|---|
Filter.Enabled |
true | Off keeps the list and filters nothing. Takes effect at once. |
Filter.Ignored |
empty | The prefab names to skip, separated by commas. |
Keys.IgnoreKey |
K | Look at an item and press it to ignore or un-ignore its kind. None turns off both the key and the hover line; the list in the file still applies. |
General.Enabled |
true | Off applies no patches. Needs a restart. |
General.DebugLogging |
false | Write detailed lines to the BepInEx log. |
All of these are yours alone.
It is client-only
Only the player who installs it needs it. It sends nothing over the network, has no version check, and a player with it can join a server that does not have it. The server and the other players see nothing different.
How it works
The game keeps a flag on each item on the ground that says whether auto-pickup may take it. The mod switches that flag off on items of the kinds in your list, when an item first appears and again whenever the list changes. It remembers which items it switched off, and gives pickup back only to those. An item the game itself had already marked, such as a stack you dropped, is never touched. The flag is not saved or sent anywhere, so nothing about the item changes for anyone else.