
ServersideResourceMultiplier
Multiply what rocks, ore veins, trees, logs and stumps drop. Server-side only: vanilla players can join.Serverside Resource Multiplier
Change how much rocks, ore veins, trees, logs and stumps drop: 2x copper, 3x wood, half the stone, whatever you like.
Only the server needs it. Players join with a completely vanilla game, no mod and no matching config required. It also works in single player and on worlds hosted from the game ("Start server"), since in both cases your own game is the server.
What it changes
| Category | Broken with | Examples |
|---|---|---|
| Mining | Pickaxe | Stone, Copper, Tin, Iron, Silver, Obsidian, Black marble, Flametal, Grausten, Leviathan chitin, Ice |
| Woodcutting | Axe | Wood, Fine wood, Core wood, Elder bark, Yggdrasil wood, Blackwood, Frostwood, Resin, seeds and cones, Feathers |
It does not touch creature loot, chests, barrels, dungeon pots, furniture, item stands, items picked by hand from the ground (flint, branches, mushrooms...) or anything a player drops from their inventory. Deconstructing your own buildings still gives back exactly what they cost, so there is no infinite-wood loop.
The list of resources is read from the game itself when the world loads, so new biomes and modded resources built on the vanilla components are picked up automatically.
Configuration
BepInEx/config/thelm.ServersideResourceMultiplier.cfg is created the first time a world loads.
Edit it while the server runs: changes apply within a second, no restart needed.
[1 - General]
Enabled = true
GlobalMultiplier = 1
MiningMultiplier = 2
WoodcuttingMultiplier = 1
[3 - Mining items]
CopperOre = 1.5
Stone = 0.5
[4 - Woodcutting items]
Wood = 3
Final amount = GlobalMultiplier x MiningMultiplier or WoodcuttingMultiplier x the item's own value.
With the example above everything mined drops 2x, except copper at 2 x 1.5 = 3x and stone back to 2 x 0.5 = 1x; wood drops 3x.
- Decimals are fine. The fraction becomes a chance: 1 ore at 1.5x gives 1 or 2, averaging 1.5.
0removes that drop entirely.- Above the max stack size the extra is spawned as more piles next to the original.
Advanced options:
MatchWindowSeconds(default 2): how long the server waits to pair a drop with the rock or tree that produced it. Raise it if players with a very high ping report missing bonuses.LogMatches: log every drop that gets changed. Handy to check that it works.LogSources: list every resource node recognised, by category, when the world loads.
Vanilla "Resources" world modifier
This mod multiplies on top of the game's own Resources world modifier (More = 1.5x, Much more = 2x, Most = 3x).
If you used that modifier before and want this mod to be the only multiplier, note that the modifier is saved inside the
world: removing -modifier resources ... from the server's command line, or setting it to default, does not turn it off.
Remove it once from the in-game console as an admin:
devcommands
removekey resourcerate 200
Use 150 or 300 instead of 200 for More or Most. The admin needs to be listed in the server's adminlist.txt.
How it works
In Valheim the drops of a rock or tree are spawned by the game of the player who breaks it, not by the server, so the usual approach (patching drop tables) only works if every player installs the mod. This one doesn't touch drop tables at all:
- The server notices a resource node breaking: a tree, log, stump or small rock being destroyed, or an area of a big ore vein breaking.
- Within a moment, the drops the player's game spawned arrive at the server as new objects.
- The server checks that each one is an item that node can drop, that it landed nearby and that no player has ever owned it, then rewrites its stack size. The player's game reads the new size right before picking it up.
Known limitations
- If an item is picked up within a few hundredths of a second of spawning, before the server's change arrives, it keeps its original amount. In normal play the drops are still flying when the change lands.
- When more than 200 items are lying around near a player, vanilla starts merging nearby piles every few seconds using the amounts that player last saw. A pile merged that way before the player looked at it can lose its bonus.
- Mods that change drops on the client side stack with this one.
Source
Built against Valheim 1.0.16 (network version 40) and BepInEx 5.4.2351.