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.
Crafting Storage Link
Links all storages within the zone of a workbench to the player. Allows you to craft, upgrade, smelt and build without needing to carry resources. All options can be configured via f8 in game if you want to enable or disable things.
CHANGELOG
1.7.1
- Fixed the v1.7.0 compile failure at the settings GUI heading style (
CS0012/CS0013forUnityEngine.TextAnchor). - Removed the unnecessary direct
TextAnchor.MiddleLeftassignment; the F8 GUI otherwise behaves the same as v1.7.0. - No gameplay, processor-feeding, config-sync, or storage transaction behavior changed.
1.7.0
- Added a built-in IMGUI settings window, opened with
F8by default. Common feature switches can now be changed in-game without browsing to the cfg file. - Remote dedicated-server clients get local opt-out controls for the master link, crafting/upgrading, Hammer/build linking, and processor feeding. Server policy remains authoritative: a client cannot enable a feature the server disabled.
- Added local
05 - Client Preferencesvalues (UseCraftingStorageLink,UseLinkedCrafting,UseLinkedBuilding,UseLinkedProcessorFeeding), all defaulting totrueso existing installs preserve behavior. - Single-player/listen-server hosts can edit
Enabled,CraftingEnabled,HammerBuildingEnabled,ProcessorFeedingEnabled, andRadiusfrom the GUI. Changes save immediately and are pushed to connected modded peers. ShowAvailableResourceCountsandDebugLoggingare exposed as local GUI toggles.- The settings window never renders in batch-mode/dedicated-headless execution and does not expose lower-level access/ward/ownership safety switches.
- Kept config protocol v3; no new server-synchronized wire fields were added. Server and clients should still use the same DLL version.
- Removed noisy HarmonyX warnings for optional plural Smelter compatibility fields by resolving those fields with non-warning reflection.
- Confirmed the 1.6.0 processor transaction behavior from debug logs: Blast Furnace ore/fuel, Windmill barley, and Spinning Wheel flax consume from linked storage; full Eitr Refinery sap safely stages then rolls back without item loss.
1.6.0
- Added optional linked-storage feeding for Valheim
Smelter-based processors. This covers vanilla smelters/blast furnaces and other devices using the same Smelter interaction path, including compatible kilns, windmills, spinning wheels and eitr refineries. - Added server-synchronized
ProcessorFeedingEnabledunder01 - General(defaulttrue). Config protocol bumped from v2 to v3; server and clients should use the same 1.6.0 DLL. - Player-carried valid processor items always take priority. Linked storage is only consulted when the local player has no valid fuel/input item for that interaction.
- Processor feeding uses a one-item staging transaction: clone one valid item into the player's inventory, debit one matching item from the linked source chest, then let Valheim's original
OnAddFuel/OnAddFuelSwitch/OnAddOrepath perform its normal capacity checks and RPC behavior. - If vanilla rejects the interaction (full fuel/queue, access/state change, etc.), CraftingStorageLink rolls the staged item back to the source chest. If that source cannot accept the rollback, the item is returned to the player rather than deleted.
- Full player inventory is fail-safe: the chest is never debited unless the temporary player-inventory staging succeeds first.
- Existing container access, ward, range, in-use, player-built, ship/cart, MultiUserChest-ignore, and ownership rules are reused for processor sources.
- No background/automatic production was added. Feeding still follows normal player interaction cadence (one vanilla feed operation at a time, including normal hold-to-feed behavior).
- Crafting, Hammer, live-container registry, and Available/Required UI behavior from 1.5.11 are otherwise unchanged.
1.5.11
- Explicitly formats workstation resource counters as
Available/Required. - Applies to crafting-station UIs that use
InventoryGui.SetupRequirement, including Workbench-style interfaces. - Added robust nested lookup for
res_amount. - Runs the workstation counter postfix at Harmony
Priority.Last. - Enables TMP auto-sizing for larger totals in the narrow requirement slot.
- Hammer/build
Available/Requiredcounters remain unchanged. - No storage-consumption or networking behavior changed.
1.5.10
- Fixed Harmony startup failure on
InventoryGui.SetupRequirement. - Replaced fragile named target-argument injection with
object[] __args. - Correctly uses the current Valheim 1.0 signature:
Transform elementRoot, Requirement req, Player player, bool craft, int quality, int craftMultiplier.- Available/Required crafting totals now include
craftMultiplier. - Resource availability in this UI path now counts all resource qualities (
-1), matching the method's exposed inputs. - No consumption, live-registry, networking, ownership, or persistence behavior changed.
1.5.9
- Added
ShowAvailableResourceCountsunder04 - UI(defaulttrue). - Crafting-station requirement rows now display
Available/Requiredusing player inventory plus eligible linked storage. - Hammer/build requirement rows now display the same
Available/Requiredtotal. - Counts preserve vanilla missing-resource coloring when the total is short.
- When the requirement is satisfied by linked storage, the existing white satisfied state remains stabilized.
- Full linked totals are cached per resource for the frame to avoid duplicate inventory walks from repeated UI callbacks.
- The display option is client-local/cosmetic and is not server-synchronized.
- Disabling the option retains the previous early-exit counting behavior.
- v1.5.8 live-container registry and all v1.5.7 consumption/reconciliation safeguards are unchanged.
1.5.8
- Replaced recurring scene-wide
FindObjectsByType<Container>()discovery with a live loaded-container registry. - Registers containers from
Container.Awakeand unregisters them from available destruction lifecycle callbacks. - Retains one bootstrap scene scan per local-player/world lifecycle as a safety net for already-loaded containers.
- Container placement/destruction invalidates the short-lived candidate/count caches immediately.
- Keeps the existing 0.25-second filtered-candidate cache for range/access/ward/in-use checks and nearest-first sorting.
- Missed destroyed references are removed lazily during registry iteration.
- Registry state is runtime-only: no additional ZDOs, RPC traffic, world-save data, or network synchronization.
- Actual pulls retain all live eligibility/radius/ownership/inventory revalidation from 1.5.7.
- Retains 1.5.7 transaction-delta accounting, duplicate-requirement aggregation, raw-stack auditing, and
Priority.Lastfinal payment.
1.5.7
- Added transaction-delta accounting around
Player.ConsumeResources; CraftingStorageLink now observes what Valheim/other patches already removed and pays only the remaining exact requirement. - Added
Priority.Lastto the consumption postfix so other normal-priority consumption postfixes are observed first. - Aggregates duplicate requirement rows before payment.
- Uses raw inventory-stack counts for payment auditing so linked-count/UI patches cannot contaminate mutation math.
- Preserves player-first payment if another prefix skips Valheim's original consumption method.
- Added over-consumption diagnostics that report required vs. observed removed amounts and point to competing
Player.ConsumeResources/inventory patches. - Filters Valheim 1.0 upgrader-only recipe resources according to the active crafting station.
- Retains the 1.5.6 Hammer/UI performance cache and all prior reinforced-chest/reliability fixes.
1.5.6
- Fixed a major Hammer-out performance problem caused by rescanning every loaded
Containeronce per rendered frame. Container discovery is now cached for 0.25 seconds and refreshes immediately if the build/storage origin moves more than about one metre. - Added a same-frame linked-resource count cache so repeated checks for the same Hammer material do not re-walk every nearby container inventory.
- Reduced compatibility overhead with UI mods such as Marsarah UI:
BuildHudDisplayno longer globally augments arbitraryInventory.CountItemscalls made by third-partyHud.SetupPieceInfopostfixes. CraftingStorageLink performs its own targeted Hammer requirement-row stabilization after the HUD call instead. Inventory.HaveItemlinked-storage augmentation is now limited to actual build-requirement/placement contexts rather than generic Hammer HUD display work.- Actual resource removal remains live and transaction-safe: every pull rechecks container eligibility and radius before mutation, and container caches are cleared after payment/config/player-lifecycle changes.
- No config/protocol change from 1.5.5. Servers and clients should still use the same CraftingStorageLink DLL version.
- Revalidated the hooks used by the mod against the newer Valheim
assembly_valheim.dllsupplied during testing (2,568,192 bytes; SHA-25627a766a8d23a7bd8b6a54fb9ad0452a96c305fb3629b39c40527c09a1c393a84).
1.5.5
- Added independent
CraftingEnabledandHammerBuildingEnabledgameplay toggles. CraftingEnabled=false+HammerBuildingEnabled=trueprovides a Hammer-only middle-ground QoL mode: build-tool requirements and placement can use linked storage while Workbench/Forge/etc. recipe crafting and upgrading remain vanilla.- Also supports crafting-only mode (
CraftingEnabled=true,HammerBuildingEnabled=false) and the existing masterEnabled=falseswitch. CraftingEnabledis server-synchronized. Config protocol bumped to v2; server and clients should all use the same 1.5.5 DLL.- Existing configs preserve prior behavior because the new
CraftingEnabledoption defaults totrue. - Smelters, kilns, fermenters, and other processing devices remain untouched by CraftingStorageLink.
1.5.4
- Fixed the Valheim 1.0 craftability gate by patching
Player.HaveRequirementItems, the method used for the Craft button and craftable-first recipe ordering. Linked-storage-only recipes now become genuinely craftable instead of merely showing white/satisfied requirement icons. - Added overload-tolerant
HaveRequirementItemstargeting so minor Valheim signature changes do not silently bypass the patch. - Updated
InventoryGui.m_selectedReciperesolution for Valheim 1.0'sKeyValuePair<Recipe, ItemData>layout (Key), with compatibility fallbacks for other private layouts. - Character-crafting recipes such as Torch can use storage linked to the active Workbench/other station UI; crafting away from an active station remains vanilla.
- Actual payment still uses the existing player-first
ConsumeResourcespull plan, so enabling the Craft button does not create free crafts.
1.5.3
- Added end-of-frame self-healing for stale CraftingStorageLink context frames. If another Harmony patch interrupts a crafting/build call and leaves a context stranded, it is cleared automatically instead of poisoning later checks until restart.
- Container discovery and linked-item counting now isolate failures per container. A destroyed, unloading, half-initialized, or incompatible modded container is skipped while all other nearby storage continues working.
- Added fail-safe exception boundaries around the global
Inventory.CountItems/Inventory.HaveItemhooks so a transient linked-storage error falls back to vanilla behavior instead of breaking repeated requirement checks. - Runtime state is reset when the local Player instance changes (death/respawn/world lifecycle), preventing stale references from surviving player recreation.
- Runtime fault warnings are throttled to keep BepInEx logs usable while still capturing the first useful error.
- Preserves the 1.5.1 reinforced/iron chest compatibility fixes and the 1.5.2 Hammer HUD stabilization.
1.5.2
- Added a post-render Hammer requirement HUD verification pass. After Valheim renders
Hud.SetupPieceInfo, CraftingStorageLink directly recomputes player + linked-storage availability for each visible resource row and clears a false red state when the combined amount is sufficient. - The HUD verification is deliberately display-only: genuinely missing resources remain red, crafting-station requirements are still enforced, and resource consumption logic is unchanged.
- Added explicit Unity UI/TextMeshPro build references required by the HUD stabilization code.
- Added a regression test for leaving the Hammer build menu open and watching a linked-only material requirement across repeated HUD refreshes.
1.5.1
- Hardened vanilla reinforced/iron chest (
piece_chest) detection by accepting the creator stored on the container ZDO when thePiecehierarchy does not expose it reliably. - Added ZNetView component fallbacks when
Container.m_nviewis unavailable through the expected field path. - Stopped re-running
Container.Load()on every linked item count; the live chest inventory is used first, which avoids unnecessary inventory refreshes while the UI or another mod is interacting with the container. - A chest opened by the local player is now still eligible when
SkipInUseContainers=true; containers in use by someone else remain excluded. - Explicitly calls the container save path after linked resource removal as a compatibility backstop for storage/UI mods that alter normal inventory change callbacks.
- Added reinforced-chest regression tests and clearer debug expectations.
1.5.0
- Replaced single global crafting/build contexts with nested, re-entrant context frames so Infinity Hammer, ValheimBuildCamera and other build mods cannot accidentally clear an outer CraftingStorageLink operation.
- Context cleanup is idempotent and also runs from Harmony finalizers, reducing the chance of a thrown exception leaving CraftingStorageLink stuck in a stale state.
- Added a dedicated Hammer HUD
Hud.SetupPieceInfocontext so displayed build-resource counts/colors include linked storage instead of blinking red when enough materials exist in nearby containers. - Preserved the 1.4.0 stationless-piece behavior: Workbenches, Campfires and other pieces with no station requirement link around the builder.
- Improved debug diagnostics with per-container rejection reasons and positive item counts.
- No new framework dependency and no intentional change to solo/vanilla behavior beyond the corrected Hammer resource display and stronger context handling.
1.4.0
- Fixed Hammer/storage linking for pieces with no existing crafting-station requirement, including Workbenches and Campfires. These pieces now search for linked storage around the player/build position.
- Fixed the Hammer-specific case where materials such as Bone Fragments could appear to be ignored when the selected build piece did not establish a crafting-station context.
- Added origin-aware container caching so stationless Hammer pieces and station-based crafting cannot reuse the wrong same-frame container set.
- Improved debug logging for containers skipped because they are currently in use.
- Clarified
SkipInUseContainers: when it istrue, an opened chest is intentionally excluded from both requirement counts and consumption so a craft can never succeed without actually paying the resources. If a transaction-safe shared-container mod is installed, server owners may set it tofalseso opened boxes remain available. - Preserved server->client config sync, crafting/upgrading support, station-required Hammer behavior, ward/access checks, and nearest-container-first consumption.
1.3.0
- Requirement UI resolves Valheim 1.0 selected recipes from
InventoryGui.m_selectedRecipewhenm_craftRecipeis not populated yet. - Linked storage counts are reflected in recipe requirement display.