ShopDuplicateFix

版本 v1.0.0·更新於 2026-08-02

Buying two of the same shop item now delivers two instead of charging for both and delivering one.

模組介紹 作者原文

ShopDuplicateFix

Buy two of the same item, get two of the same item.

Built and compiled against game build v0.4.4 (runs on v0.4.4.x).

The bug

Put two copies of the same shop item in the cart and check out: you're

charged for both, but only one exists afterwards.

The purchase ledger is StatsManager.itemsPurchased, a dictionary keyed by

item name. A name-keyed dictionary can't represent "two of these" unless

something counts — and evidently something doesn't. The money side charges

per physical object; the delivery side collapses to one per name.

The fix

Each purchased physical item produces one ItemPurchase(itemName) call.

This mod tallies those calls per item name per shop visit, and after the

game's own bookkeeping runs, raises the ledger to the tally if it's short.

Two properties worth knowing:

  • It's a no-op where the bug isn't. If the game counted correctly, the

ledger already matches or exceeds the tally and nothing is written. So it

can't over-deliver, and it coexists with shop mods (More Shop Items etc.)

regardless of which layer loses the count.

  • The tally resets on level change, so one visit's purchases can never

inflate the next visit's.

Host only

Purchases and the stats ledger are authoritative on the master client. Only

the host needs this.

First run

Verbose is ON by default for this release. Buy two of the same item, then

check BepInEx/LogOutput.log:

  • paid for 2, game recorded 1 - corrected to 2 → the bug existed, now fixed
  • vanilla counted correctly, no fix needed → the game (or one of your other

shop mods) already handles it; the fix stood down

Either way the log tells you exactly what happened underneath. Turn Verbose

off afterwards.

If instead you see only ONE ItemPurchase line after buying two, the loss

happens before the ledger (the second item is never charged as a purchase at

all) — report that log and the fix needs to move a layer up.

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack

檔案與校驗

檔案名稱
ShopDuplicateFix-1.0.0.zip
檔案大小
19.0 KiB