Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
InstancedLoot continuation
Makes chest and/or item drops separate for each player
| Date uploaded | 2 weeks ago |
| Version | 1.5.0 |
| Download link | Nicebowl-InstancedLoot_continuation-1.5.0.zip |
| Downloads | 54 |
| Dependency string | Nicebowl-InstancedLoot_continuation-1.5.0 |
This mod requires the following mods to function
RiskofThunder-R2API_Networking
Networking API around the Unity UNet Low Level API (LLAPI)
Preferred version: 1.0.4bbepis-BepInExPack
Unified BepInEx all-in-one modding pack - plugin framework, detour library
Preferred version: 5.4.2122RiskofThunder-RoR2BepInExPack
Simplify the modding ecosystem of Risk of Rain 2, making it easier for modders to create and maintain their mods while preventing harmful bugs.
Preferred version: 1.46.0README
InstancedLoot_continuation
fork from: https://gitlab.com/KubeRoot/ror2-instancedloot origin mod: https://thunderstore.io/package/KubeRoot/InstancedLoot/
InstancedLoot
Highly configurable mod to allow players to loot items and objects separately.
This mod needs to be installed both on clients and the host to function.
NOTE: Please check out the config options in BepInEx/config/com.kuberoot.instancedloot.cfg before usage.
Usage notes:
When first opening the mod, by default it will use the Default preset, instancing most objects, with PreferredInstanceMode set to InstanceObject. This way, objects will be instanced, but the items within won't be. What that means is, for example, when a player opens a chest, other players can still open that chest, and the item that drops can be picked up by anybody.
If you wish to change how most things are instanced, you should tweak PreferredInstanceMode to a mode you prefer - the description for that option includes all available modes, also listed here for convenience:
None: Self-explanatory, this object does not get instanced, nor do items spawned from itDefault: Do not override the preset/alias. If every value in the chain is Default, defaults to None.InstancePreferred: Use the configuration for PreferredInstanceMode for this entry. Provided for convenience and/or experimentation.InstanceObject: Spawn multiple copies of the object, one for each player, where each can only be opened by the owning player, and from which items can be picked up by any playerInstanceItems: Keep one copy of the object that can be opened by anybody, but instance the spawned item, such that each player can pick it up independentlyInstanceBoth: Spawn multiple copies of the object, like InstanceObject, but also limit the resulting item such that it can only be picked up by the player who earned/bought itInstanceItemForOwnerOnly: Keep one copy of the object, and limit the resulting item to only be picked up by the player who earned/bought it.InstanceObjectForOwnerOnly: Keep one copy of the object, and limit opening it to only the owning player. This is only meaningful for objects that inherently belong to a player, like lockboxes. The resulting items are not instanced and can be picked up by any player.InstanceBothForOwnerOnly: Similar to InstanceObjectForOwnerOnly, but the resulting item can only be picked up by the owning player.
Another important thing to note is the presence of simple chat commands.
-
You can ping an item that is instanced for you and say
uninstancein the chat to "forfeit" the item, making anybody able to pick it up. -
You can say
uninstanceallin the chat to "forfeit" all items currently instanced for you.
Those commands also work on pickup pickers, such as command essences. The current chat command format is meant as a placeholder, hopefully I can implement a better system in the future.
Limitations/issues:
-
Changing settings mid-run can result in too many items dropping on the current stage, but everything should work as normal on subsequent stages.
-
Certain materials don't support dithering, because of that you might notice some things aren't fading out properly.
-
Instancing for drones/turrets isn't implemented - hopefully that will come in a later release.
-
You might encounter weird issues with certain things not instancing correctly - when testing I had some issues that I couldn't reproduce. Feel free to report those, especially if you think you know why it happened.
-
Interactibles from other mods need explicit support between the mods - I tried to write my mod to make this easy, if you're a mod author looking for compatibility feel free to contact me.
Features:
- Instancing interactibles, like chests and shrines, so that each player can buy them separately.
- Instancing items, so that each player can pick them up separately.
- Items and objects that are not available for you are invisible or faded out, depending on circumstances.
- An included preset, so you can have sane behavior without having to configure anything manually.
- Configuration options for every "alias" and every object type separately, allowing you to tweak the exact behavior.
- Supports XSplitScreen.
Installation
Copy the InstancedLoot folder to Risk of Rain 2/BepInEx/plugins
CHANGELOG
Changelog
2.0.0 (Unreleased)
- Rebuilt object instancing around a server-owned lifecycle service, immutable native-state adapters and one fixed owner per independently consumable entity. Only PreferredInstanceMode=InstanceObject remains; public item drops stay vanilla.
- Added a versioned per-entity owner protocol with run/scene epochs, revisions, independent delayed resolution and periodic replay. Source destruction no longer blocks sibling ownership snapshots.
- Reused MultiShop terminals created by native Awake, waited for source terminal initialization, and prevented copy rerolls. Native one-of-three closure, Executive Card and shrine refresh behavior remain authoritative.
- Added individual Chance/Blood/Order shrine toggles and damaged drone/turret repair adapters; missing SpawnCards fall back to vanilla. Printers and other unmanaged purchases keep their original paths.
- Filtered both raycast and overlap interaction candidates, including multiple IInteractable components. Per-camera render masks preserve native enabled state and restore after rendering.
- Removed legacy item-sharing, owner-only, preset/alias, pickup and forfeiture-command paths. Historical IL fixtures remain in validation only.
Validation: Release build: 0 errors and 0 warnings. New production-linked regression: 82 assertions. Installed game build 25921972: 7 active IL pattern checks, actual candidate-emitter transformation, 10 native lifecycle/payment assertions; synthetic candidate CLR paths and retained historical IL regressions pass. No Unity/Mono hook installation, host/client gameplay, split-screen game test or archive operation was performed.
Continuation
1.6.0 (Unreleased)
- Centralized
CopyObjectandInstancedObjectpermission checks inInstanceAccessPolicy, including interactor/player resolution used by purchases, pickups, picker choices and client candidate filtering. - Added a server-side purchase transaction guard and post-native completion consumption for shared
InstancedObjecteligibility; eachCopyObjectremains one-shot through its native availability state. - Extracted source-to-copy purchase cost, cost type and independent RNG snapshotting into
InstanceStateSynchronizer; ordinary chest copies and each TripleShop terminal use the same state boundary.
Validation: Release build passed with one existing obsolete-API warning. MultiplayerRegression passed 51 assertions, including unified CopyObject/InstancedObject access, shared purchase consumption and TripleShop terminal purchase-state snapshots. The stub does not emulate real RoR2 PayCost, UNet transport or host/client gameplay; chest and TripleShop multiplayer behavior still requires an in-game run.
1.5.3 (Unreleased)
- Isolated each TripleShop terminal's source/copy state group and restricted the source terminal to its owning player, so each player keeps an independent three-choice purchase.
- Copied terminal pickup, hidden, RNG and finalized purchase cost state through the awaited terminal path.
- Made every
CopyObjectinteraction check followOrigPlayer, preventing an aggregate sourcePlayersset from authorizing another player's hidden source;InstancedObjectand shared pickup eligibility retain their per-handler player sets. - Rechecked server purchase eligibility and native availability before charging or closing an interactable; restored nested shop drop ownership context with
try/finally.
Validation: The Release build passed with one existing obsolete-API warning. MultiplayerRegression passed 48 assertions, including CopyObject source/clone permissions and independent three-choice terminal groups; host/client gameplay and three-choice terminal state, cost, and one-shot purchase behavior still require an in-game multiplayer run.
1.5.2 (Unreleased)
- Registered the interactable candidate filter so clients skip overlapping chest copies that belong to another player.
- Resolved the interactor's player through its
CharacterBodyand master, matching the runtime component layout. - Added an explicit
IInteractabletoComponentcast before the injectedGetComponent<InstanceHandler>call.
Validation: The Release build and MultiplayerRegression stub passed; the stub now covers eligible and ineligible interactor candidates. The current game 1.5.0 build's FindBestInteractableObject has the expected IInteractable overlap local and ShouldIgnoreSpherecastForInteractibility sequence; the registered IL audit passed 18 patterns and 22 structure assertions. Host/client gameplay remains untested.
1.5.1 (Unreleased)
- Fixed the inherited command cube IL hook's invalid stack on the max-option branch by redirecting incoming Spawn labels to the injected GameObject duplication.
- Synchronized plugin, project and manifest versions, and required one mod version increment per subsequent change batch, including documentation-only changes.
Validation: A user run of the 1.5.0 code failed during command cube hook installation despite the earlier 17-pattern audit. The corrected production emitter now passes complete command cube stack/type and branch checks against installed game 1.5.0 build 25921972; the old emitter fails that check and produces InvalidProgramException in two synthetic CLR methods. Six generated CLR paths execute the corrected emitter with captured callbacks. Release builds, 37 stub assertions, and the existing pickup/animation checks pass. These checks were recorded with the fix before the version increment; the corrected hook still needs Unity/Mono installation and host/client, Command artifact and split screen retests.
Version update validation: The 1.5.1 Release build passed with one existing obsolete-API warning. Plugin, project and manifest versions agree, and the built assembly reports 1.5.1.0. No gameplay logic changed in the version update; the earlier logic regressions were not rerun and no new game tests or package build were performed.
1.5.0 (Unreleased)
- Updated game references for Hallowed Concepts (Risk of Rain 2 1.5.0), MMHOOK and R2API dependencies; pinned the BepInEx 5 compile reference and updated runtime requirements.
- Migrated roulette chest and pickup picker hooks to
UniquePickup, preserving pickup state and restoring drop ownership context after nested calls or exceptions. - Copied initialized purchase prices and cost types to instanced interactables through native network setters, with independent purchase RNG state.
- Fixed client ownership synchronization to wait for missing network objects, replace stale pending snapshots and clean up destroyed instance groups.
- Enforced server purchase and pickup eligibility, retained shared pickups for remaining players and synchronized shared picker eligibility.
- Fixed stale fading when ownership changes while preserving visibility for each camera's player.
- Supplied explicit direct placement rules for interactable copies to prevent null placement-rule failures and retain the source rotation.
- Updated animation prefab fading hooks for the current DoSpawnEffect call sites; pooled effect ownership remains unsupported.
- Added isolated production-source and IL structure regression checks.
Validation (historical): The Release build and 37 stub assertions passed. Static matching of 17 registered Release IL hook patterns and in-memory pickup/animation emitter structure checks passed against installed game 1.5.0 build 25921972. A subsequent user run failed during command cube hook installation; see 1.5.1 for the fix and its validation limits. Host/client gameplay and split screen remain untested. Dedicated support for new DLC4 interactables and the direct pickup-picker grant path has not been added.
1.4.0
- Added support for Alloyed Collective DLC.
1.3.0
- Switched to NuGet and updated libraries again.
1.2.0
- Updated libraries.
Original
1.1.0
- Updated for the Devotion Update.
- Warning: This is a cursory update that includes a dirty hotfix for a new issue. Other bugs have not been fixed, the mod might not be stable.
1.0.1
- Removed a debugging message from being printed in chat.
1.0.0
- Initial release.