You are viewing a potentially older version of this package. View all versions.
BranchOfYore-VeinMining-0.3.3 icon

VeinMining

Cooperative whole-deposit mining. Hold or double-tap Alt, shared leather HUD, adjustable ore speed and diminishing team bonuses. Requires BepInEx and Jotunn.

Date uploaded 4 days ago
Version 0.3.3
Download link BranchOfYore-VeinMining-0.3.3.zip
Downloads 6
Dependency string BranchOfYore-VeinMining-0.3.3

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2351 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2351
ValheimModding-Jotunn-2.30.2 icon
ValheimModding-Jotunn

Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.

Preferred version: 2.30.2

README

Vein Mining 0.3.3

Experimental shared deposit mining for Valheim 1.0.16. Requires BepInExPack 5.4.2351 and Jotunn 2.30.2. No additional mining mod is required or installed as a dependency.

Equip a pickaxe, aim at ore within normal swing range, and hold Left Alt. Your character keeps swinging while the key is held. The server records damage in one shared progress bar. Other players can hold Alt on the same deposit to contribute. The deposit breaks and releases its resources at completion.

Release Alt to pause in hold mode. Or double-tap Alt within 0.35 seconds for automatic mining without holding it; press Alt again to stop. The bar shows Auto in this mode. Movement, blocking, a menu, loss of window focus, changing tools or breaking your pickaxe also stops your contribution. Progress is retained. Repair and equip your pickaxe, then start again. Native game mechanics handle stamina and attack speed.

You can mine the same deposit normally without Alt. Parts break and drop resources immediately, reducing the work left for Vein Mining.

Vein Mining works independently of Smoothbrain Mining. An optional compatibility adapter remains for players who already use that mod; it does not install it. All plugin messages and documentation are in English.

Delivery

  • src/SharedMining: complete source code.
  • dist/VeinMining-0.3.3.zip: installation package with Thunderstore layout.
  • dist/VeinMining-0.3.3-source.zip: source, build scripts and tests.
  • Installation, test report, ore catalog, profile lock.

Nothing has been published. This is a test build; acceptance testing with separate clients and a dedicated server remains outstanding.

Work and timing

Actual native attacks provide skill-adjusted damage and normal durability deductions. The mod does not drain your entire pickaxe or use a fixed timer per ore type. The server tracks health per part, including buried parts and intact shells that transition to fragmented ore. Overkill damage is not transferred to another part.

The single visible setting, Ore Mining Multiplayer, applies to all supported deposits. The host/server chooses a value from 1 to 10, default 3. 1 = normal work per hit; it does not guarantee exact total manual-mining time. Client settings do not override the server. Loot and per-hit durability are unchanged; fewer swings mean less total wear and fewer skill awards. Ordinary mining is unaffected. Legacy key/prefab/distance settings remain hidden for compatibility; the old CopperWorkMultiplier is no longer used.

Cooperative scaling: one active miner = 1x, two = 2x, three = 2.5x, four = 3x; each additional miner adds 0.5x. Each contributor's actual damage is multiplied by team rate divided by active miner count, so the bonus is not applied twice. The displayed team rate assumes equal tools and swing rates. A miner counts after a valid shared hit and for four seconds after their latest hit; stopping removes them. Brief join/leave transitions are therefore approximate. Ordinary hand mining reduces remaining work but is not part of this automatic-miner count.

The compact 360×84 Canvas HUD uses the approved dark leather artwork, stitched border and bronze corner studs. Text and the golden progress bar are rendered live. The header shows Vein Mining and a percentage; the footer shows only the configured ore factor and active miner count, for example 3× · 3 miners. The cooperative curve remains active internally, but no Co-op, Team, Ore or Auto labels are displayed. Idle jobs show zero miners with retained progress. The background is embedded in the DLL, so no loose texture installation is required.

Identical total completion time has not been established for every manual mining method. Digging, movement, changing collision geometry, multiple hits and structural collapse affect comparisons. Structural collapse is not simulated during progress. Total time and durability comparisons remain part of acceptance testing.

A deposit is one networked object and its possible transition to fragmented ore. Separate neighboring objects are not merged automatically. Barrels containing ore are not deposits. Additional modded deposits can be enabled after examining the prefab audit; unfamiliar destruction components need another adapter.

Build

Use a .NET SDK and a local Valheim installation with the mod profile. Game and third-party mod libraries are not redistributed.

dotnet build src/SharedMining/SharedMining.csproj -c Release -p:GameManaged="D:/Steam/steamapps/common/Valheim/valheim_Data/Managed" -p:BepInExCore="C:/path/to/profile/BepInEx/core"
dotnet run --project tests/CoreTests/CoreTests.csproj -c Release
./tools/Package.ps1

Paths can also be defined in an ignored Local.props. Jotunn is expected under the profile's BepInEx/plugins/ValheimModding-Jotunn directory. Never install the runtime test DLL in a normal profile or production server.

Server behavior

Progress is stored in the deposit's ZDO and follows normal world saves. Reconnecting, repairing or changing contributors does not reset it. A crash before the next world save can lose unsaved progress.

Active deposits remain server-owned. The server loads the selected deposit and contributor when needed, including in remote areas. Heartbeats retain those instances while contributions remain active. You can also mine normally without Alt: ordinary hits break parts and release their resources normally, reducing remaining shared work. Native collapse caused by ordinary hits also counts. Previously destroyed parts are not rewarded again at shared completion.

The server checks session tokens, sequence numbers, player ownership, distance, tool tier, numeric bounds and frequency. Actual player damage and equipment remain client-controlled, as in ordinary Valheim combat. This is not a complete anti-cheat system.

Jotunn enforces matching plugin versions through its network compatibility system. Only the server's allowed-deposit configuration decides whether a job can start.

CHANGELOG

0.3.4 - Clearer package description

  • Shortened the English package description and README.
  • Requires only BepInEx and Jotunn; Smoothbrain Mining is not installed as a dependency.
  • Mining behavior and approved leather HUD unchanged.

0.3.3 - Approved leather design

  • Before publication: removed Smoothbrain Mining from package dependencies. Only BepInEx and Jotunn are required; existing optional compatibility code remains.

  • Embedded the approved stitched leather background with bronze corner studs.

  • Live title, percentage and golden progress fill over the artwork.

  • Footer reduced to multiplier and active miner count, such as 3× · 3 miners; removed Co-op, Ore and Auto labels.

  • Mining behavior, cooperative curve and default factor 3 unchanged.

0.3.2 - Compact native HUD

  • Default ore factor reduced to 3; adjustable range remains 1–10.
  • Replaced rotated IMGUI decoration with a compact Canvas panel using native Valheim fonts and panel sprites.
  • Ore multiplier is always visible; cooperative multiplier appears for multiple miners.
  • No changes to resource drops or the cooperative curve.

0.3.1 - Nordic mining HUD

  • Carved timber, iron straps, interlaced bronze trim and a pickaxe/ore emblem.
  • Simplified activity: 1 miner alone; 2 miners · 2× or 3 miners · 2.5× together.
  • Removed the redundant solo team multiplier, player-name list and ore-speed setting from the HUD.
  • Mining balance and server logic unchanged.

0.3.0 - Multiplayer ore mining

  • One visible Ore Mining Multiplayer setting for all supported deposits: default 5, range 1–10; server authoritative.
  • Fixed cooperative curve: 1 / 2 / 2.5 / 3 times solo for 1 / 2 / 3 / 4 active miners, then +0.5 per extra miner.
  • Bronze-framed HUD with active miner names, team speed and ore speed.
  • Original generated pickaxe-and-veined-rock download icon.
  • Legacy input, prefab and distance settings hidden; saved progress format preserved.

0.2.2 - Default copper speed

  • New configurations default CopperWorkMultiplier to 5. Existing saved settings are retained.
  • No changes to loot, input handling or per-hit durability.

0.2.1 - Copper speed and double-tap

  • Copper ore deposits receive 1.5 times shared work per hit by default. The server can adjust CopperWorkMultiplier; 1 disables it.
  • Loot and per-hit durability remain native. Fewer hits also means less total durability loss and fewer per-hit skill awards.
  • Double-tap Alt within 0.35 seconds to keep mining automatically; press Alt again to stop. Holding and releasing still works.
  • Added checks for copper-only scaling and exactly one native loot roll per surviving fragment across ordinary mining and shared completion.

0.2.0 - Vein Mining

  • Renamed the displayed mod and package to Vein Mining. Existing saved progress and configuration identity are preserved.
  • Ordinary pickaxe hits can damage active or paused deposits and release resources normally.
  • Native damage and destroyed parts reduce remaining shared work, without crediting the same damage twice.
  • Intact-shell transitions migrate saved work to the fragmented deposit.
  • Hold Left Alt and English text remain unchanged.

0.1.1

  • Hold Left Alt to mine; release it to pause with progress retained.
  • Press and hold again to resume. G is no longer used.
  • Losing window focus stops automatic mining.
  • Added HoldKey, replacing ToggleKey.
  • All plugin messages, progress-bar text and documentation are in English.

0.1.0 - first experimental build

  • Automatic native pickaxe swings, originally toggled with G.
  • Server-held progress per deposit, stored in ZDOs.
  • Buried parts and intact shells that transition into MineRock5 fragments.
  • Native durability and stamina use; pause, repair and resume.
  • Smoothbrain damage, XP and resource bonuses without Explosive Mining during shared jobs.
  • Resource release through native destruction at completion.
  • Runtime prefab audit, Jotunn version checks and automated tests.

Acceptance testing with a dedicated server and separate clients remains outstanding.