SlotLock
Lock inventory slots so Stack Items never dumps them into a chest. Compatible with ValheimPlus AutoStack.
模組介紹 作者原文
SlotLock
Lock individual inventory slots so Stack Items never puts them in a chest.
You keep your pickaxe, hammer, food and portal wood exactly where you put them, and
still get to mash the stack button on every chest in the base.
Usage
Hold Left Alt and left-click a slot to lock or unlock it. Locked slots get a gold
frame. That's the whole mod.
Locked slots are ignored by:
- the Stack Items button in the chest window
- the hover-a-chest and press the stack key shortcut
- ValheimPlus AutoStack, including its sweep across every nearby chest
Everything else still works normally — you can drag items out of a locked slot by hand,
equip them, drop them, and Take All is unaffected.
Compatibility
Client-side only. It does not need to be installed on the server, and it does not
need to match between players — lock whichever slots you like, your friends lock theirs.
Tested alongside ValheimPlus 0.10.1.1 with [AutoStack] enabled = true.
SlotLock hooks Inventory.StackAll with a prefix and a finalizer, and deliberately does
not use a transpiler there, because ValheimPlus transpiles that same method. Its
prefix runs at Priority.First so ValheimPlus' "stacked N items" count stays correct.
If you use QuickStackStore, you probably don't need this — its favouriting feature
covers the same ground and more. SlotLock exists to be a small, single-purpose
alternative that stays out of ValheimPlus' way.
Configuration
BepInEx/config/cynera.SlotLock.cfg
| Setting | Default | What it does |
| --- | --- | --- |
| ToggleModifier | LeftAlt | Hold this and left-click a slot to lock it |
| ProtectHotbarRow | false | Treat the entire hotbar row as locked |
| ShowOverlay | true | Draw the frame on locked slots |
| OverlayColor | gold | Colour of that frame |
| VerboseLogging | false | Log each withheld item |
Which slots you locked is saved per character, in
BepInEx/config/SlotLock/_.txt. Deleting that file clears your locks.
Upgrading from 1.0.0
1.0.1 renamed the plugin GUID, and BepInEx names a config file after the GUID, so the
settings file moved from introvertedcats.slotlock.cfg to cynera.SlotLock.cfg. The
mod carries your settings across the first time it loads and removes the old file; there
is nothing to do by hand. Your locked slots are unaffected — they were never stored under
the GUID.
Known limitations
- The lock frame shows in the inventory screen, not on the on-screen hotbar HUD.
- Locks are per character, not per world.
Source
Please join the Discussions if you have questions or bugs!
Issues and pull requests welcome.
License
MIT.
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: