
CreatureTrophyDropRate ExcludeBoss
Globally adjusts trophy drop rates for normal enemies while leaving bosses untouched.CreatureTrophyDropRate_ExcludeBoss
Problem
More and more recipes are based on creature trophies and farming for rare trophies on top of a rare creature spawn slows down the game pace by a lot. Issues with current trophy mods:
- Drop rate also affects boss trophies: ConfigurableTrophies
- set to 50% drop rate means bosses have 50% chance not to drop their heads on kill
- Settings too granular: DropNSpawn
- need to specify trophie drop rate for all creatures in the game
- Outdated: TrophyDropChance
- has pre-configured creature list but has not been updated to accomodate new creatures
Solution
This mod adjusts global trophie drop rate, while excluding NPCs identified by Character.m_boss==true, which are the boss creatures.
Configurable modes:
- Fixed: a fixed drop rate (0-1) for all non-boss creatures
- Multiplier: a multiplier for vanilla drop rate (e.g. 0.5 means half vanilla drop rate, 2.0 means double vanilla drop rate)
Default out of the box: Fixed 50% drop rate for all trophies
Installation
Use r2modman or other Thunderstore mod manager to install.
Manual Installation
- Install BepInExPack_Valheim 5.4.2351
- Put
CreatureTrophyDropRate_ExcludeBoss.dllinValheim/BepInEx/plugins/CreatureTrophyDropRate_ExcludeBoss/. With a mod manager, use the active profile's BepInEx folder.
Configuration
- Launch the game once to generate
BepInEx/config/com.weizhexu.nonbosstrophies.cfg. - Exit the game, edit the configuration, then restart. Settings are read once at plugin startup. Hot reload/unload is unsupported.
Default Config
[General]
Mode = Fixed
FixedChance = 0.5
Multiplier = 2
DebugLogging = false
Mode accepts Fixed or Multiplier, case-insensitively. Invalid modes warn and use Multiplier. FixedChance clamps to 0–1; negative Multiplier clamps to zero. NaN/infinity warn and use defaults (0.5 or 2). BepInEx handles malformed numeric/Boolean text using its normal warning/default behavior. Validation changes effective settings, not the user's saved text.
With Mode = Multiplier and Multiplier = 2.0:
| Existing base chance | Modified base chance |
|---|---|
| 5% | 10% |
| 10% | 20% |
| 50% | 100% |
| Boss trophy | Unchanged |
With Mode = Fixed and FixedChance = 0.50, every normal-enemy trophy entry has a 50% base chance. Boss trophies remain unchanged. Multiplier mode preserves relative base rarity until the 100% cap.
DebugLogging = true logs individual before/after chances and skipped boss names at Info level, so the normal BepInEx log captures them. Otherwise there are only initialization/settings lines and counts per scene initialization. Counts describe entries whose values actually changed.
Multiplayer
Install on the dedicated server/host and every client, with identical settings. The creature's owning peer evaluates its death/drop logic; that peer can be a player client. Server-only installation is insufficient for consistent results. Matching settings provide consistent base chances, not identical random outcomes.
Prefab settings are local and not transmitted as synchronized configuration. There is no config synchronization or enforcement. Restart all peers after changing settings. See the inspected ownership call chain in API-NOTES.md.
Compatibility and limitations
New official and modded creatures work automatically if they are registered by this initialization point and follow the standard components and trophy item type. Modded bosses must set m_boss = true. A mod labeling a material as a trophy will have that item treated as a trophy; a trophy labeled as a material is deliberately ignored.
Mods that add prefabs or edit loot after this postfix, replace loot at spawn/death, classify bosses dynamically, or use custom loot systems may bypass or overwrite these changes. Harmony priority is not a guarantee against another mod explicitly running later. Entries added only to private registry dictionaries are not discovered. Already-spawned instances are not retroactively edited. Restart after adding/removing/configuring the plugin.
Disclaimer
This mod is some AI slop mainly to be used in my own save. Only use it if you don't mind.