You are viewing a potentially older version of this package. View all versions.
Lemonandmassiw-CraftFromContainers-1.3.2 icon

CraftFromContainers

Crafting, building and the EpicLoot enchanting table use materials from nearby chests. Adds a -/+/Max craft amount selector and gentler StarLevelSystem per-star loot.

Date uploaded a week ago
Version 1.3.2
Download link Lemonandmassiw-CraftFromContainers-1.3.2.zip
Downloads 2388
Dependency string Lemonandmassiw-CraftFromContainers-1.3.2

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

Craft From Containers

Crafting stations, the Hammer and the EpicLoot enchanting table can use materials stored in nearby chests. Built to run alongside a large modpack without fighting other mods over resource consumption, and without adding any per-frame work on the dedicated server.

Features

  • Crafting at any station takes missing ingredients from chests within range (default 20 m around the player).
  • Building with the Hammer takes missing materials from chests the same way.
  • EpicLoot enchanting table pays runestones, dust and shards from nearby chests, using EpicLoot's official inventory provider API (API.RegisterInventoryProvider), not a patch.
  • Ingredient rows show how much is in chests, e.g. 10 +34, and no longer flash red when the chests cover the cost.
  • Craft amount selector: -, +, Min and Max buttons below the Craft button craft up to 100 items with one click (Ctrl + click = ±10). Built on Valheim's own multi-craft, so chests, skill bonuses and other mods work as usual.
  • Gentler per-star loot for StarLevelSystem: each star adds 1/3 of the base drop (3 meat → 4 → 5 → 6).

What you carry is always used first. Only the missing amount comes from chests, nearest chest first.

How it works

Valheim lets only the current owner of a chest change its contents, which is also how vanilla handles opening a chest. This mod follows the same rule:

  • Only chests your game currently owns are counted and used.
  • While you have the crafting panel, build mode or the enchanting table open, the mod asks the current owner of nearby chests to hand them over. The owner refuses if the chest is open, if it used that chest in the last few seconds, or if that player is crafting or building nearby themselves.
  • Right before the game consumes resources, the missing amount is moved into your inventory, and then the game (and any other mod that changes resource consumption) takes it from there as if you had carried it. If your inventory has no room, the missing amount is removed directly from the chest instead.

On the dedicated server the mod only answers ownership requests. It does nothing every frame.

What it does not touch

  • Chests someone else currently has open.
  • Other players' private chests and chests inside a ward you have no access to.
  • Tombstones, backpacks, dungeon and world loot containers — by default only player-built containers count.
  • Carts and ships (off by default; the server can enable them).
  • Equipped items, and items that carry extra data — enchanted EpicLoot gear, socketed items and similar (can be turned off).

Known limitations

  • Ingredients with quality levels (for example fish, when ImpactfulSkills ingredient quality is enabled) must be in your inventory. That mod picks the quality tier by looking only at the player's inventory.
  • "Any one ingredient" recipes (m_requireOnlyOneIngredient) need that ingredient in your inventory, because the game takes it directly instead of going through the normal consumption path.
  • With a full inventory the missing amount is taken straight from the chest. If EpicLoot's Lucky Craft then lowers the cost, the chest portion is still charged in full. With free space, the difference stays in your inventory.
  • Two players crafting next to each other: a chest stays with whoever started first; the other player gets it a few seconds after the first one closes their panel.
  • EpicLoot enchant, sacrifice and disenchant tabs only list items in your inventory. This is intentional — exposing chests there would let a single misclick destroy stored gear.
  • No auto-sorting and no automation pieces. This mod only does crafting and building from containers.

Requirements and compatibility

  • BepInExPack_Valheim 5.4.2351
  • Jotunn 2.30.2
  • Must be installed on the server and on every client, with matching major and minor versions. Jotunn enforces this on connect.

The patches were written against the actual game code and account for other mods that hook the same methods, including ImpactfulSkills, EpicLoot, Therzie's Armory, PlanBuild, MultiUserChest, AdventureBackpacks and ExtraSlots. It is developed on a private server running all of these.

Other craft-from-containers mods

Running two mods that both pull missing ingredients from chests makes items disappear twice. If any of these is loaded, this mod disables itself and writes the reason to the log:

  • aedenthorn.CraftFromContainers
  • buldosik.EpicLootCraftFromContainers
  • DvergerAutomation with its Craft From Storage option enabled — turn that option off (the switch in its crafting panel, or Craft From Storage under [Client config] in its config) and this mod takes over crafting while the Autosorter keeps sorting.

Configuration

The config file is BepInEx/config/local.craftfromcontainers.cfg. Setting names are currently in Polish.

[Serwer] — server settings, synced to every player; only the server or an admin can change them

Setting Default Meaning
Wlaczony true Master switch.
Zasieg 20 Range in metres around the player (5–50).
Crafting ze skrzyn true Crafting stations and the enchanting table use chests.
Budowanie ze skrzyn true The Hammer uses chests.
Tylko skrzynie graczy true Only player-built containers count.
Wozki i lodzie false Include cart and ship storage. Taking ownership of a ship also moves its physics simulation to you.
Pomijaj przedmioty magiczne true Never consume items that carry extra data (enchanted, socketed, etc.).
Stol zaklinania: przedmioty ze skrzyn true The EpicLoot enchanting table lists items from nearby chests (enchant, sacrifice, disenchant).
Wykluczone pojemniki (empty) Comma-separated container prefab names to ignore.

[Loot za gwiazdki] — per-star loot, synced to every player

Setting Default Meaning
Wlaczony true Replace StarLevelSystem's whole-number loot multiplier with a per-star bonus.
Premia za gwiazdke 0.3333 Share of the base amount added per star (0–2).

[Klient] — local settings for each player

Setting Default Meaning
Multi-crafting true Show the -/+/Min/Max craft amount buttons.
Multi-crafting maks 100 Highest amount the buttons can select (2–999).
Pokazuj ilosci ze skrzyn true Show the +N chest amount next to ingredients.
Log diagnostyczny false Log every withdrawal and every ownership request. Useful when reporting a problem.

Reporting a problem

Please include your BepInEx/LogOutput.log, ideally with Log diagnostyczny = true, and your mod list.

CHANGELOG

Changelog

1.3.2

  • The craft amount buttons now sit below the crafting panel's frame instead of overlapping it.

1.3.1

  • Fixed the craft amount buttons appearing to the left of and overlapping the Craft button; the 2×2 grid now sits right under it, positioned from the button's actual on-screen corners.

1.3.0

  • Craft amount buttons moved below the Craft button as a 2×2 grid the width of the Craft button: - / + on top, Min / Max underneath. New Min button resets the amount to 1.
  • EpicLoot enchanting table sees items in nearby chests: they can be enchanted, sacrificed and disenchanted without moving them to the inventory. Chests changed this way are saved every second and when the table closes. Server setting Stol zaklinania: przedmioty ze skrzyn (default on).

1.2.0

  • Multi-crafting: -, + and Max buttons above the Craft button choose how many items to craft at once (Ctrl + click changes the amount by 10, Max picks the most your inventory and nearby chests can pay for). Uses Valheim's built-in multi-craft, so skill bonuses, chests and other mods see a normal craft. Upgrades are still crafted one at a time.
  • Per-star loot (StarLevelSystem): each star adds a share of the base drop (default 1/3: 3 meat → 4 → 5 → 6) instead of StarLevelSystem's whole-number multiplier. Only drops that scale with level in vanilla are affected; creatures with their own table in LootSettings.yaml keep StarLevelSystem's handling. Server-synced.

1.1.0

  • EpicLoot enchanting table pays runestones, dust and shards from nearby chests, through EpicLoot's official inventory provider API. Enchant, sacrifice and disenchant tabs still only list items in the player's inventory.
  • The mod now disables itself when aedenthorn.CraftFromContainers or buldosik.EpicLootCraftFromContainers is loaded, instead of consuming ingredients twice.
  • Ownership requests also run while the enchanting table is open.

1.0.0

  • Initial release: crafting and building from nearby player-built chests, +N chest amounts on ingredient rows, owner-based container access, and automatic stand-down when DvergerAutomation's Craft From Storage is enabled.