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.
LootWindow
Loot Windows with Valheim's native inventory and crafting menus. With trigger items you can define reward quantities, chances and item levels through YAML. In multiplayer, the server controls gameplay settings.
By dannanboi
| Date uploaded | 3 days ago |
| Version | 1.0.0 |
| Download link | dannanboi-LootWindow-1.0.0.zip |
| Downloads | 14 |
| Dependency string | dannanboi-LootWindow-1.0.0 |
README
Description
Loot Window turns configured trigger items into rewards in a compact eight-slot window alongside Valheim's native inventory and crafting menus. Define reward quantities, chances and item levels through YAML. In multiplayer, the server controls loot tables, rolls and trigger pickup settings; interface preferences stay local.
Overview
| Feature | Description |
|---|---|
| Loot tables | Connect a trigger item to fixed or random rewards. |
| Automatic pickup | dblw_ items go to the closest eligible player within 3 metres by default. |
| Hidden trigger slot | Holds one pending token even with a full inventory or while encumbered. |
| Native inventory | Drag rewards, collect individual stacks, loot all or drop items on the ground. |
| Optional Auto Loot | Collect one reward stack at a time with configurable delays. |
| Saved rewards | Pending loot survives normal character saves and reconnects without rerolling. |
Configuration and values
Edit BepInEx/config/dannanboi.lootwindow.cfg. Loot tables are in BepInEx/config/LootWindow/loottables.yaml. Solo play uses local settings; multiplayer uses the server's gameplay settings and tables.
| Section / option | Default | Meaning |
|---|---|---|
[Settings] Enable Mod |
true |
Server-controlled switch for new triggers; pending loot remains collectable. |
[Settings] Trigger pickup radius |
3 |
Server-controlled horizontal metres for dblw_ items; range 1–6, with a 2-metre height allowance. |
[Keybindings] Loot All |
F |
Collect rewards that fit. |
[Keybindings] Discard Loot |
O |
Confirm before destroying remaining loot. |
[Keybindings] Input-block interval |
0.25 |
Seconds to reserve loot keys after release; range 0–2. |
[UI] Auto Loot |
false |
Automatically collect one stack at a time. |
[UI] Auto Loot interval |
1 |
Seconds between pickups; range 0.5–2. |
[UI] Sleep before auto-loot |
0.5 |
Additional delay before the first pickup interval; range 0–60 seconds. |
[UI] Auto Loot Autoclose |
true |
Close inventory when loot ends with Auto Loot enabled. |
[UI] Autoclose |
true |
Close inventory when loot ends with Auto Loot disabled. |
[UI] Window scale |
1 |
Loot window size; range 0.7–2. |
[UI] Window X / Window Y |
0.35 / 0.62 |
Screen position; dragging the title bar saves it. |
[UI] Loot All text / Discard Loot text |
Loot All / Discard Loot |
Button labels. |
All keybindings and UI options are local. Shortcuts accept modifiers such as LeftShift + F; None disables a shortcut.
Usage
Award a configured triggerItem through another reward mod, or test with the console command spawn dblw_Test2 1. Missing trigger prefabs are generated from Wisp. Items starting with dblw_ are automatically picked up by the closest living, non-teleporting player in range, even with a full inventory or while encumbered. One token is processed at a time; collecting rewards still requires normal inventory space.
Drag rewards into your inventory or outside the windows to drop them. Ctrl-click or right-click collects a stack; F collects all that fit. O, ESC or TAB asks “Discard loot?” while rewards remain. Cancelling keeps them. Drag the title bar to move the window.
Loot table YAML
Use a flat list with two-space indentation. Prefab names are case-sensitive. Add multiple entries to the same file; [] disables all tables.
- triggerItem: dblw_Test2
itemDisplayTitle: ""
triggerCall:
alwaysLoot: false
emptyLootText: "Nothing was found."
lootTableName: "Boss reward"
lootTable: Coins[50-100],Ruby[1-2:5],Amber[2]
| Field | Meaning | Missing/empty value |
|---|---|---|
triggerItem |
Exact trigger prefab name. | Required. |
itemDisplayTitle |
Trigger item display name. | Empty; omitting it preserves existing non-dblw_ item names. |
triggerCall |
Reserved identifier for future function calls; currently inactive. | Empty. |
alwaysLoot |
Guarantee at least one successful reward. | false. |
emptyLootText |
Message when no reward succeeds. | No loot. |
lootTableName |
Loot window title. | Loot. |
lootTable |
Comma-separated reward entries. | Required. |
Reward syntax
| Entry | Meaning |
|---|---|
Coins[20] |
Always 20 coins. |
Coins[50-100] |
Random quantity from 50 through 100. |
Ruby[1-2:5] |
One or two rubies at a 5% chance. |
Ruby[2:0.5] |
Two rubies at a 0.5% chance. |
BronzeSword(2)[1:0.1] |
One level-2 Bronze Sword at a 0.1% chance. |
A range is optional: [1:0.1] and [1-1:0.1] mean the same thing. Chances are percentages; 0.1 or 0,1 means 0.1%, and omitting :chance means 100%. (level) is optional and defaults to level 1; the item must support the requested level.
With alwaysLoot: false, each entry rolls independently. With true, the table is guaranteed nonempty, so the final chances change. An empty roll consumes its trigger and shows emptyLootText without opening a window.
Reward prefabs must exist. Use at most eight distinct item/level entries, amounts 1–10000 and chances above 0 through 100%. Every possible result must fit eight native stacks. Mapped trigger items cannot be rewards. Quote text containing : or #. Earlier displayTitle, name and loot fields remain accepted; use one spelling per field.
Live updates
Valid config and YAML edits apply automatically; server changes synchronize to clients. Invalid YAML keeps the last valid tables. Prepared loot keeps its original roll. Existing installed files are preserved when upgrading.
Manual Installation
- Install
BepInEx/plugins/LootWindow/dannanboi_LootWindow.dllon clients and servers. Remove older or duplicate DLL copies before upgrading. - Start the game or server once to generate
BepInEx/config/dannanboi.lootwindow.cfgandBepInEx/config/LootWindow/loottables.yaml. - Edit the YAML and award its trigger items. For multiplayer, edit the server/host's files. Examples in
Examples/loottables.yamlcan be copied into the active file.
Compatibility
Requires BepInEx 5 for Valheim and matching Loot Window versions on clients and server. Solo Start games are supported. No Jötunn or additional YAML-parser dependency is required. Mods replacing inventory, pickup or input behavior may conflict.
Keep BepInEx/config/LootWindow/state/server/ when moving or restoring a server; it preserves completed roll receipts. Remaining rewards save with the character through normal Valheim saves.
dannanboi Mod Philosophy
My mods aim to be small and modular, stay close to Valheim's vanilla experience, and work well together or independently. Enable all features to make bigger changes, or choose the ones that suit your playstyle. Your run should be yours to customize. Features described as "an added bonus" or "nice to have" should always be optional. In multiplayer, the server controls gameplay settings, while visual settings stay local to each player.
Credits
You, the player. Thanks for using my mod!
CHANGELOG
1.0.1
- Added nested YAML reward lists, unquoted
!rare markers andminRares/maxRareslimits (defaults 0 / 1). - Removed the eight-entry table limit and randomized roll order. Rolling stops at eight native stacks or before a whole reward would overflow; guaranteed rare minimums reserve their space first.
- Hidden tokens now clear at logout. Added
dblw_clearfor every player without devcommands or admin rights; prepared rewards and regular inventory are preserved.
1.0.0
- Initial release