DestroyItemInSlotFix
Fixes niche vanilla issue with PlayerControllerB.DestroyItemInSlot(int itemSlot) and the new utility slot.
About this mod Author’s original text
v80+ introduced a new item slot for utilities. Zeekerss updated most of his code for item removal accordingly but missed a single line on PlayerControllerB.DestroyItemInSlot(int itemSlot) which results in an index out of bounds error.
A lot of mods including many of my own use PlayerControllerB.DestroyItemInSlotAndSync(int itemSlot) to delete an item from a players slots on all clients which now throws a nasty error when destroying an item in the new slot.
This mod patches that method to fix this problem so I dont have to rewrite a bunch of code. I decided to upload it as a standalone mod that way other modders who were also using this method and are confused about the error can just depend on it.
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.
Install these first, or the mod will not work: