Valheim
Install with App

Details

Latest version
1.2.0
Last Updated
First Uploaded
Downloads
341
Likes
0
Size
32KB
Dependants
ADDatHost Valheim hosting
30% off

HereComesTheVein

I use AI to review code and assist with optimization and integrity; I manually test and review every mod, and all decisions and code remain my own.

Current release: 1.2.0

A lightweight Valheim mod by R4V9N1.

HereComesTheVein keeps vanilla copper veins unchanged and gives each generated CopperOre drop an independent 20% chance to become IronOre instead. The remaining 80% stay CopperOre.

Obsidian veins work the same way: each Obsidian dropped by a mined obsidian vein has an independent 20% chance to become IronOre instead. On top of that, each destroyed obsidian vein has a 20% chance to drop 1-3 extra IronOre.

Mining stone works the same way: each Stone dropped by a mined rock has a 1% chance to become a Surtling Core, a 10% chance to become Coal and a 5% chance to become Tin Ore instead.

Behaviour

  • Copper vein prefab and world-generation identity remain vanilla.
  • Valheim generates the normal mining drop list first, including its normal quantities, drop chances, and resource scaling.
  • Each final CopperOre result from MineRock/MineRock5 mining receives one independent roll: 20% becomes IronOre, 80% remains CopperOre.
  • Replacement is one-for-one, so the total number of ore drops is unchanged; only the obsidian vein bonus adds drops.
  • Each final Obsidian result from a mined obsidian vein (MineRock_Obsidian) receives one independent roll: 20% becomes IronOre, 80% remains Obsidian. Obsidian vein prefab and world-generation identity remain vanilla.
  • Each destroyed obsidian vein also receives one bonus roll: 20% chance to add 1-3 extra IronOre to its drops (the bonus ore is not re-rolled and is not scaled by the world resource rate).
  • Each final Stone result from MineRock/MineRock5 mining receives one independent roll: 1% becomes SurtlingCore, 10% becomes Coal, 5% becomes TinOre, 84% remains Stone.
  • Mining drops that are not CopperOre, Obsidian or Stone remain unchanged. Obsidian from other sources (for example the small obsidian crystals in mountain caves) is not changed.
  • Unrelated DropTable users are not modified.
  • IronOre does not depend on Elder defeat, trophies, altar state, guardian-power activation, special vein selection, or a special texture.
  • Existing worlds are supported because the mod does not regenerate or rewrite world-generation data.

Multiplayer

Install the mod on the server/host and on every client for a matching setup. Valheim's owner-side mining RPC path remains authoritative for generated drops.

Requirements

  • Valheim
  • BepInExPack Valheim

Manual installation

Copy HereComesTheVein.dll into:

Valheim\BepInEx\plugins\HereComesTheVein\

Removal

Removing the DLL stops the runtime substitution. The mod does not rewrite vanilla copper-prefab identities or persist custom vein state in world data.

Technical approach

The plugin brackets the current owner-side MineRock.RPC_Hit(long, HitData, int) and MineRock5.DamageArea(int, HitData) mining paths and scopes conversion to their exact m_dropItems DropTable. Obsidian veins are not MineRock objects; for them it brackets DropOnDestroyed.OnDestroyed() on MineRock_Obsidian only and scopes conversion to that vein's m_dropWhenDestroyed DropTable; after conversion it rolls the vein's single 20% bonus and appends 1-3 IronOre to that drop list. It patches only the public parameterless DropTable.GetDropList() result. Valheim generates the final list first; the mod then independently replaces each CopperOre and obsidian-vein Obsidian entry with IronOre at a 20% probability, and each Stone entry with SurtlingCore (1%), Coal (10%) or TinOre (5%).

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.