Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
CraftingStorageLink
BepInEx-only Valheim 1.0 crafting, upgrading, and Hammer building from nearby player-accessible storage linked to the required crafting station.
By Eulogy
| Date uploaded | 3 weeks ago |
| Version | 1.5.1 |
| Download link | Eulogy-CraftingStorageLink-1.5.1.zip |
| Downloads | 2967 |
| Dependency string | Eulogy-CraftingStorageLink-1.5.1 |
This mod requires the following mods to function
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.2350README
CraftingStorageLink 1.5.1 — BepInEx-only build
This revision removes the Jötunn dependency completely.
Dependencies
The only framework you install is BepInExPack for Valheim 5.4.2350+.
CraftingStorageLink uses HarmonyLib for runtime patches, but you do not install Harmony separately. The normal Valheim BepInEx pack already contains BepInEx/core/0Harmony.dll, and the project references that bundled copy.
There is no Jötunn dependency and no Jötunn DLL is expected anywhere.
Important: server-only is not enough for this feature
The dedicated server should run CraftingStorageLink, but every player client also needs BepInEx and the same CraftingStorageLink.dll.
Valheim performs crafting-recipe and Hammer-piece requirement checks in the player's game process. A completely unmodded client will decide that the player lacks the materials before a server-side plugin can make nearby chest contents count. Trying to fake this only on the server would be unreliable and risks inventory desync.
Your existing server-side achievement/QoL-enabler can stay exactly as it is. CraftingStorageLink does not modify achievements and does not depend on that mod.
1.5.1 reinforced-chest reliability fix
Version 1.5.1 specifically hardens Reinforced Chest / iron chest (piece_chest) handling after reports that small wooden chests worked while reinforced chests intermittently did not. Container discovery remains generic rather than hard-coded to one chest type, but the player-built check now falls back to the creator stored on the container ZDO, ZNetView lookup has hierarchy fallbacks, and linked counts use the live inventory before attempting a private Load.
With SkipInUseContainers=true, a container opened by this local player remains eligible because CraftingStorageLink is operating on the same live inventory object shown in the chest UI. A container being used remotely is still excluded. Resource pulls also explicitly save the container after removal as a compatibility backstop.
For a focused test, put Stone or Wood only in a Reinforced Chest within the configured radius, leave the player's inventory empty, and test both crafting and Hammer placement with the chest closed and then locally open. Both should count the stored materials.
1.5.0 compatibility / Hammer UI changes
Version 1.5.0 keeps the same normal CraftingStorageLink gameplay rules, but changes how temporary crafting/build contexts are tracked internally. Contexts are now nested/re-entrant and exception-safe so mods such as Infinity Hammer and ValheimBuildCamera can call Valheim build methods without clearing CraftingStorageLink's outer operation.
The Hammer HUD is now patched at Hud.SetupPieceInfo as well. This gives the build-resource display the same linked-storage context used by the actual requirement check, so a requirement should not blink red merely because its materials are in an eligible nearby chest.
The 1.4.0 Workbench/Campfire fix remains: stationless Hammer pieces link around the player/build location.
Solo behavior: no extra mod is required and the intended resource rules are unchanged. The same DLL works by itself with BepInEx. The visible difference should only be more reliable linked-storage detection and corrected Hammer resource colors/counts.
What 1.5.1 does
- Crafting and upgrading can count/pull materials from nearby eligible storage.
- Hammer/build-tool placement can count/pull materials from nearby eligible storage.
- Player inventory is paid first; linked storage supplies only the shortfall.
- Storage is linked around the required crafting station (default 20 m); stationless Hammer pieces link around the player/build position.
- Vanilla workbench/forge/etc. requirements are still enforced.
- World loot, tombstones, carts and ships are excluded by default.
- Container access/ward rules are respected by default.
- With
SkipInUseContainers=true, containers in use by another player are excluded; the local player's currently open container remains eligible. - The dedicated server pushes its runtime CraftingStorageLink settings to modded clients using Valheim's built-in
ZRpc; no Jötunn config sync is used. - If the DLL version differs, the client logs a warning. This build does not forcibly reject an unmodded client.
1.5.0 Hammer and container-visibility fixes
User feedback exposed two separate behaviors:
- Stationless Hammer pieces: Workbenches, Campfires, and other pieces that do not require an existing crafting station previously had no link origin, so linked storage was ignored. They now search within the configured radius around the player/build position. Pieces that require a Workbench/Forge/etc. still link around that required station.
- Chests periodically disappearing from the linked pool: with
SkipInUseContainers=true, a chest is deliberately excluded while Valheim reports it as open/in use. This keeps requirement checks and actual resource removal consistent and prevents free crafting or inventory races. If you run a transaction-safe shared-container mod, you can setSkipInUseContainers=falseon the server so open chests remain eligible.
The first change fixes Hammer cases where resources such as Bone Fragments appeared to be ignored because no crafting-station context existed. Debug logging now also reports when an in-use chest is being excluded.
Install layout
On the dedicated server:
Valheim dedicated server/
BepInEx/
core/
0Harmony.dll <- already supplied by BepInEx
plugins/
CraftingStorageLink/
CraftingStorageLink.dll
On every client:
Valheim/
BepInEx/
core/
0Harmony.dll <- already supplied by BepInEx
plugins/
CraftingStorageLink/
CraftingStorageLink.dll
Use the exact same CraftingStorageLink.dll on server and clients.
Server configuration
After first launch the config is:
BepInEx/config/com.custom.valheim.craftingstoragelink.cfg
Recommended defaults:
[01 - General]
Enabled = true
HammerBuildingEnabled = true
[02 - Linking]
Radius = 20
PlayerBuiltContainersOnly = true
AllowShipContainers = false
AllowCartContainers = false
[03 - Safety]
RespectContainerAccess = true
RespectWards = true
SkipInUseContainers = true
ClaimOwnershipWhenPulling = true
RespectMultiUserChestIgnore = true
[99 - Debug]
DebugLogging = false
When a modded client connects, the server sends the gameplay settings above to the client for the active session. DebugLogging remains local.
Compile-time game references
The build now references assembly_utils.dll from the same valheim_Data/Managed directory as assembly_valheim.dll. This is required by Valheim 1.0 because ZPackage exposes Vector2i/Vector2s types from that assembly. Nothing extra is installed; the DLL is already part of Valheim.
Building
This source project intentionally references the DLLs from your actual Valheim installation rather than redistributing game/BepInEx assemblies.
Windows client install/build:
.\SOURCE\build.ps1 -ValheimDir "C:\Program Files (x86)\Steam\steamapps\common\Valheim" -Install
Windows dedicated server example:
.\SOURCE\build.ps1 -ValheimDir "C:\Servers\Valheim" -Install
Linux dedicated server:
./SOURCE/build.sh "/path/to/Valheim dedicated server" --install
A current .NET SDK is required to compile the project.
Uploaded Valheim assembly validation
The Hammer/crafting hooks used by this project were validated against the Valheim 1.0 assembly supplied in this conversation:
assembly_valheim.dll
SHA-256: a5130f5a957ab51cb6538f5412cbe57b43f927f4a679918bff199b5c905d01bc
The game assembly is NOT included in this package.
First multiplayer test
Back up the world first. Then test with two players and cheap materials:
- Put wood/stone in a normal player-built chest within 20 m of a workbench.
- Empty those resources from Player A's inventory.
- Verify Player A can craft a workbench recipe using the chest resources.
- Verify the chest stack decreases by the exact amount.
- Equip the Hammer and place a workbench-required piece using only chest materials.
- Verify the chest decreases once and the player's inventory does not gain a duplicate.
- Repeat while Player B has the chest open; with
SkipInUseContainers=true, that chest should not be used.