StoreAndCraftMucCompat
Lets StoreAndCraft's take-stack hotkey pull from chests another player has open, when Multi User Chest is installed. One guard removed, nothing else changed.
About this mod Author’s original text
StoreAndCraft MUC Compat
Multi User Chest makes shared chests safe. This lets StoreAndCraft use them.
A one-guard compatibility patch between StoreAndCraft and Multi User Chest. Install it and forget about it.
The problem
Run both mods and almost everything already works. StoreAndCraft was built with the same rule Multi User Chest enforces — never steal ownership of a chest someone else is using — so its dump, craft-pull, station feed and auto-store all route through its own RPC to the chest's owner and stay correct.
One feature doesn't. Take-stack (Ctrl + middle click by default, "fill the hovered stack from nearby chests") checks whether the chest is in use before asking its owner:
if (chest.IsInUse())
return 0;
That's the right call in vanilla, where touching a chest someone has open risks losing items. But Multi User Chest exists to make exactly that safe. With both mods installed the check still fires, so take-stack silently does nothing on any chest a teammate happens to have open — the one situation the chest mod was added to fix.
The fix
This mod neutralises that single check, and only while Multi User Chest is loaded.
The refill still goes through StoreAndCraft's own KAC_Remove RPC to the chest's owner. Multi User Chest still reconciles concurrent access. Nothing takes ownership from anyone. The only thing that changes is that take-stack stops giving up early.
| Before | After |
| --- | --- |
| Take-stack does nothing on chests others have open | Take-stack works on every chest in range |
| Everything else | Unchanged |
What it deliberately does not touch
StoreAndCraft has two other owner-gated features that look like the same restriction:
- Sort (SortOpenChest)
- Auto-stack (AutoStack.Tick)
Both bail out on chests you don't own, and both must keep doing so. They rearrange chests by writing m_gridPos and m_stack as direct field assignments, which Multi User Chest cannot intercept — it hooks Inventory.AddItem and Inventory.RemoveItem. Lifting those guards would desync the chest and can lose items. They are correct as written and this mod leaves them alone.
Requirements
Both mods must be installed; BepInEx will not load this without them.
- StoreAndCraft 1.3.3 or newer
- Multi User Chest 0.6.2 or newer
Verified against StoreAndCraft 1.3.3 and its current source. The guard this mod removes is unchanged as far back as 1.1.x, so older versions work too — 1.3.3 is simply the floor worth installing.
Client-side. It changes nothing on the wire, so it does not need to be on the server and players without it simply keep StoreAndCraft's stock behaviour. Multi User Chest itself must still be on the server and on every client at a matching version — that requirement is unchanged.
Configuration
BepInEx/config/com.pics0ul.valheim.storeandcraftmuccompat.cfg
| Setting | Default | Meaning |
| --- | --- | --- |
| Enabled | true | Turn off to restore StoreAndCraft's stock behaviour without uninstalling. |
Checking it worked
On startup the log prints:
StoreAndCraft MUC Compat 1.0.0 loaded - take-stack enabled on chests other players have open.
If StoreAndCraft ever restructures that method, you get a warning naming exactly what was not found instead of silence:
StoreAndCraft.TransferService.TakeIntoExistingStack was not found.
In that case the mod does nothing and nothing is at risk — but tell me, and it gets fixed.
To see it work you need two players: have someone stand in an open chest, hover a partial stack in your inventory, and press take-stack. Before this mod that did nothing.
How it works
A single Harmony transpiler on StoreAndCraft.TransferService.TakeIntoExistingStack swaps the Container.IsInUse() call for a predicate of the same shape:
public static bool BlocksRemoteTakeStack(Container container)
{
if (container == null) return false;
if (Plugin.Enabled!= null &&!Plugin.Enabled.Value) return container.IsInUse();
return false;
}
Same argument in, same type out, so StoreAndCraft's surrounding bran
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.
Install these first, or the mod will not work: