Item Trash & Duplicate Keys
Adds hotkeys to destroy or duplicate any grabbed item or valuable.
Regular items can optionally be added to or removed from the save file, giving full control over permanent loadouts.
Supports full multiplayer synchronization for both items and valuables.
✨ Features
- Destroy grabbed items
- Destroy grabbed valuables (properly synchronized)
- Duplicate items using vanilla-compatible spawn logic
- Duplicate valuables using their correct PrefabRef
- Optional save-file updating (add/remove items permanently)
- Toggleable debug logging
- Works in singleplayer and multiplayer
- Visual on-screen hints for DELETE / DUPLICATE actions
⚙️ Configuration
General
| Key |
Description |
| HoldTime |
Time (seconds) required to hold the key before deletion/duplication triggers |
| SaveDataUpdate |
If true, item duplication/deletion also updates the save file |
| EnableDebugLog |
Enables or disables internal debug logs |
Keys
| Key |
Description |
| TrashKey |
Key used to delete the grabbed object (Default: Delete) |
| DuplicateKey |
Key used to duplicate the grabbed object (Default: Insert) |
TrashKey
| Key |
Description |
| AllowEverywhere |
If false, works only in Lobby/Truck. If true, works everywhere |
🔧 How It Works
Item Deletion
- Removes the object from the scene
- If SaveDataUpdate = true, also removes it from the save file using vanilla StatsManager logic
- Uses PhotonNetwork.Destroy for multiplayer synchronization
Item Duplication
- Uses StatsManager.itemDictionary to find the correct item key
- Spawns using the proper prefab path
- If SaveDataUpdate = true, registers the item as purchased and saves the file
Valuable Duplication
- Resolves the correct PrefabRef from the current level’s ValuablePresets
- Spawns safely and works in multiplayer
- Does not interact with save data (matching vanilla behavior)
Valuable Deletion
- Uses PhotonNetwork.Destroy in multiplayer
- Instant removal in singleplayer
- No save-file effect
🇯🇵 日本語説明
Item Trash & Duplicate Keys(アイテム削除&複製キー)
掴んでいる アイテム や 貴重品 を、ホットキーで削除または複製できる MOD です。
アイテムに関しては、セーブデータへ追加・削除するかどうかを選択できます。
マルチプレイでも正しく同期され、ホスト側で実行されます。
✨ 機能
- 掴んでいるアイテムを削除
- 掴んでいる貴重品を削除(同期対応)
- アイテムを複製(バニラと同じ正式なスポーン処理)
- 貴重品を複製(正しいPrefabから生成)
- セーブデータを更新するか選択可能
- DELETE / DUPLICATE のガイド表示
⚙️ Config 説明
General
| 設定 |
説明 |
| HoldTime |
削除/複製に必要な長押し時間(秒) |
| SaveDataUpdate |
アイテム削除・複製時にセーブデータへ反映するか |
| EnableDebugLog |
デバッグログの ON/OFF |
Keys
| 設定 |
説明 |
| TrashKey |
削除キー(デフォルト: Delete) |
| DuplicateKey |
複製キー(デフォルト: Insert) |
TrashKey
| 設定 |
説明 |
| AllowEverywhere |
false=ロビー/トラックのみ、true=全ステージで有効 |
🔧 仕組み
アイテム削除
- シーンから削除
- SaveDataUpdate = true の場合、セーブデータからも削除
- マルチでは PhotonNetwork.Destroy で同期
アイテム複製
- バニラ同等のアイテム生成処理
- SaveDataUpdate = true なら購入扱いでセーブ
貴重品の複製
- ValuablePresets から正しいPrefabを取得して複製
- マルチ対応
- セーブデータとは無関係
貴重品の削除
- マルチ時は PhotonNetwork.Destroy
- セーブデータには影響なし