Valheim
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
2 days ago
Downloads
492
Size
145KB
ADDatHost Valheim hosting
€1

Fish Trap for Valheim

A placeable, passive fish trap built from sticks. It does not need fish to be swimming nearby. Every 20 real-time minutes while the world is running and the trap is in water, it consumes one bait and adds one fish. Each trap stores at most 20 bait and 4 fish.

The trap's posts reuse Valheim's own wooden Stakewall mesh and material. They form a round chamber whose front shoulders curve inward to the entrance, with two short guide arms outside. The two entrance stakes lean slightly toward each other.

Upgraded traps have a small metal band around every stake: bronze for level 2, iron for level 3, and black metal for level 4. The bands reuse the corresponding metal materials from Valheim.

Use

Build a trap with the hammer in the Misc tab. It snaps to the lakebed or seabed, and at least 0.25 m of water must cover its base. The basic stick trap uses 10 Wood and 4 Resin, so it can be built early. It needs Valheim's existing Fishing Bait to catch anything; Haldor sells that bait. Higher bait types use Valheim's existing recipes.

Each trap level unlocks after you have picked up both of its build materials at least once. Aim at a stake to interact; the center and funnel opening are no longer covered by a solid hitbox.

  • Press E to release the stored fish above the trap for pickup, like harvesting a beehive. With no fish ready, E fills the trap from a compatible bait stack in your inventory, up to 20.
  • Use a particular bait item on the trap to choose it. Empty the current bait before changing types.
  • Press Shift+E to drop the fish and unused bait above the trap for pickup. Collecting or emptying the trap does not require free inventory space.

The trap fills while its world is running, including when no active fish are nearby. A full trap or an empty bait supply pauses production. All catches are quality 1 fish.

Trap level Build materials Supported bait and fish
1 Stick Fish Trap 10 Wood, 4 Resin Fishing Bait: Perch, Pike
2 Fish Trap 8 Core Wood, 6 Bronze Nails Plus Mossy: Trollfish; Sticky: Giant Herring; Cold: Tetra
3 Fish Trap 8 Fine Wood, 6 Iron Nails Plus Stingy: Grouper; Heavy: Tuna, Coral Cod; Misty: Anglerfish, Pufferfish
4 Fish Trap 8 Yggdrasil Wood, 6 Black Metal Plus Hot: Magmafish; Frosty: Northern Salmon

Each level is a separate build piece. Bait determines the catch; the trap level determines which bait it accepts. Fishing locations do not restrict the species once a trap has valid bait and is placed in water.

Install

Install BepInExPack for Valheim. In Thunderstore Mod Manager, open your Valheim profile, remove the earlier local FishTrap version if present, then use Settings → Import local mod and select dist/FishTrap-1.0.11-local.zip. Enable FishTrap in the profile and start the game with Start modded. If you prefer manual installation, replace FishTrap.dll in that profile's BepInEx/plugins folder with dist/FishTrap.dll.

Install the same DLL on the server and all players' clients for multiplayer worlds. No Jötunn dependency is needed. Thunderstore does not include local mods when sharing a profile code, so anyone importing your profile must import the FishTrap ZIP separately.

Version 1.0.11

  • The trap's network owner processes interactions in sequence, removing the ownership-claim race between players collecting or adding bait.
  • Bait is removed locally before sending a deposit, following Valheim's native interaction pattern. If simultaneous deposits exceed capacity or offer different bait, the owner drops the rejected amount above the trap.
  • Production settles before contents change. Time spent full or without bait cannot produce instant extra catches after harvesting or refilling.
  • Exhausted bait clears its type, allowing E to load another supported bait. Idle traps stop repeatedly updating their saved timer and skip water checks during production updates.

The native deposit pattern has limits: disconnecting, changing ownership, or destroying the trap before a prepaid deposit is handled can lose that bait. Deposits are not automatically retried or refunded on timeout, which could duplicate items. Inventory payment and ward permissions rely on normal clients; this is not protection against modified clients or crash/save rollback exploits. The update has been compiled and checked with deterministic regression cases, but has not had a live two-client or dedicated-server test.

Build and check

On Windows, run ./build.ps1 from PowerShell. It uses the local Valheim assemblies, BepInExPack core DLLs, and the .NET Framework C# compiler. Override -ValheimDir, -BepInExCore, or -Compiler if your install is elsewhere. The script compiles the DLL and checks catch limits, production timer transitions, and bait acceptance, including offers processed in sequence against stale client counts. These checks do not simulate networking.

Run ./package.ps1 after building to recreate the local Thunderstore ZIP from the compiled DLL, manifest, README, and icon.

DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro
DatHost — Valheim server hosting, first month for one euro