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.
CustomWeaponDrops
Enemies drop the weapons and shields they were carrying when they die. Drop chance and item quality scale with star level. Fully configurable.
| Date uploaded | 2 weeks ago |
| Version | 2.2.4 |
| Download link | YouDied-CustomWeaponDrops-2.2.4.zip |
| Downloads | 262 |
| Dependency string | YouDied-CustomWeaponDrops-2.2.4 |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.
Preferred version: 5.4.2202README
Custom Weapon Drops
by YouDied
Enemies in Valheim carry weapons — but when they die, those weapons vanish. This mod changes that. Melee and ranged enemies now have a chance to drop the weapon (and shield) they were carrying when they died.
How It Works
When a supported enemy dies, the mod checks what weapon and shield they had equipped and drops a player-usable equivalent on the ground. Drop chance and item quality scale with enemy star level.
No-star enemies drop weapons at a configurable chance (default 5%).
1-star enemies always drop their weapon at quality level 2.
2-star enemies always drop their weapon at quality level 3.
All of these values are configurable in BepInEx/config/YouDied.CustomWeaponDrops.cfg.
Supported Enemies & Default Drops
| Enemy | Weapon Drop | Shield Drop |
|---|---|---|
| Skeleton | Bronze Sword or Huntsman Bow | Wood Shield or Bronze Buckler (if equipped) |
| Skeleton (Poison) | Iron Mace | — |
| Goblin | Club, Wolf Fang Spear, Blackmetal Sword, or Torch | Wood Shield (if equipped) |
| Draugr | Iron Axe or Huntsman Bow | Wood Shield or Banded Shield (if equipped) |
| Draugr Elite | Iron Sword | — |
| Draugr Ranged | Huntsman Bow | — |
| Charred Archer | Ashlands Bow | — |
Skeleton, Goblin, and Draugr have randomized loadouts — the mod detects what they were actually carrying at the moment of death, so a bow skeleton drops a bow and a sword skeleton drops a sword.
A Note on Enemy Weapons
Some enemies carry weapons that are exclusive to them and cannot exist as pickable world items — they are not registered in the game's item registry and will disappear or become unpickable if spawned directly. This affects:
- GoblinBrute — fights using special attack abilities, not an equippable weapon
- GoblinShaman — casts spells via ability prefabs, not an equippable weapon
- Charred Melee — greatsword attacks are baked into its animation abilities
- Troll — uses its fists or an unarmed log, neither of which is a droppable item
For enemies whose weapons can be dropped but exist as enemy-only prefabs (Skeleton, Draugr, Goblin, Charred Archer), the mod substitutes the closest player-craftable equivalent. The weapons are thematically appropriate for the enemy's tier but are not identical to what they carry — for example, a Draugr drops an Iron Axe rather than the Draugr's unique axe model.
GoblinBrute, GoblinShaman, Charred Melee, and Troll are excluded by default. However, you can add any valid player weapon prefab name to their config entries to make them drop something on death — for example, adding MaceNeedle to GoblinBrute's config entry. The game's item prefab names can be found on the Valheim wiki.
Note: Dvergr enemy drops are not included in this version.
Configuration
The config file is generated at BepInEx/config/YouDied.CustomWeaponDrops.cfg on first run.
Global settings:
| Key | Default | Description |
|---|---|---|
NoStarDropChance |
0.05 |
Chance (0.0–1.0) a no-star enemy drops their weapon |
NoStarWeaponQuality |
1 |
Item quality for no-star drops |
OneStarWeaponQuality |
2 |
Item quality for 1-star drops |
TwoStarWeaponQuality |
3 |
Item quality for 2-star drops |
Per-enemy settings (one section per enemy):
Each enemy has NoStar, 1Star, and 2Star entries. Set the value to a valid item prefab name to override the drop, or leave empty to disable drops for that tier. For enemies with randomized loadouts (Skeleton, Goblin, Draugr), leave these empty — the equipped weapon is detected automatically.
Patch Notes
v2.2.4
- Removed debug logging left in from shield testing
v2.2.3
- Fixed
skeleton_macemapping — Skeleton (Poison) now correctly drops Iron Mace instead of Bronze Mace
v2.2.2
- Fixed config-driven enemies (Skeleton Poison, Draugr Elite, Draugr Ranged, Charred Archer) dropping unpickable items — all now use registered player-craftable prefab names
- Added
WeaponMapfallback in config path so old enemy prefab names in config auto-translate to correct player equivalents
v2.2.1
- Fixed all config defaults to use player prefab names — enemy-only prefab names (
skeleton_mace,draugr_sword, etc.) are not registered in ZNetScene and cannot be dropped as world items
v2.2.0
- Added shield drops — Skeleton, Goblin, and Draugr will now also drop their equipped shield
- Shield drop uses the same chance and quality rules as weapon drops
- Shields detected via left-hand slot at death — only drops if the enemy actually spawned with one
v2.1.0
- Switched all drops to player-equivalent weapon prefabs
- Enemy-specific weapon prefabs (skeleton_sword, draugr_axe, etc.) are not registered in ZNetScene and cannot be spawned as world items — player equivalents are substituted
- Added
WeaponMapdictionary for clean enemy prefab → player prefab translation - Removed GoblinBrute, GoblinShaman, Charred Melee, and Troll — these enemies have no droppable equippable weapon
v2.0.3
- Switched to
ZNetScene.SpawnObjectfor networked item spawning
v2.0.2
- Fixed weapon lookup — switched from
ObjectDB.GetItemPrefab(string)(which matches on display name) toweapon.m_dropPrefab(direct reference), eliminating "Could not find prefab for equipped weapon 'Dragur axe'" errors
v2.0.1
- Attempted fix using
ObjectDB.TryGetItemPrefab(SharedData)— failed due to reference equality mismatch between registered and inventory SharedData instances
v2.0.0
- Complete rewrite
- Added no-star enemy weapon drops at configurable chance (default 5%)
- Added per-star weapon quality levels (no-star = 1, 1-star = 2, 2-star = 3)
- Skeleton now uses equipped-weapon detection — bow skeletons drop bows, sword skeletons drop swords
- Removed Troll, GoblinShaman, GoblinBrute from enemy list
- Added Goblin and Draugr with equipped-weapon detection
v1.7.0
- Initial public release
- 2-star enemies only
- Hardcoded weapon prefab names per enemy
Links
- Discord: https://discord.gg/z3vzqtFsa3