You are viewing a potentially older version of this package. View all versions.
Nickgg11Team-Instance_Based_Loot_Fixed-2.3.0 icon

Instance Based Loot Fixed

Adds balanced, instance-based loot when you're running with "Artifact of Sacrifice" and "Artifact of Command" enabled. Adds a configurable hotkey (F3 by default) to pull all unpicked items to you

Date uploaded a day ago
Version 2.3.0
Download link Nickgg11Team-Instance_Based_Loot_Fixed-2.3.0.zip
Downloads 26
Dependency string Nickgg11Team-Instance_Based_Loot_Fixed-2.3.0

This mod requires the following mods to function

bbepis-BepInExPack-5.4.2122 icon
bbepis-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.2122
RiskofThunder-HookGenPatcher-1.2.9 icon
RiskofThunder-HookGenPatcher

MMHOOK generation at runtime.

Preferred version: 1.2.9
RiskofThunder-R2API_Networking-1.0.4 icon
RiskofThunder-R2API_Networking

Networking API around the Unity UNet Low Level API (LLAPI)

Preferred version: 1.0.4

README

InstanceLootPlugin

This plugin is used to provide instance based loot when you're running with "Artifact of Sacrifice" and "Artifact of Command" enabled.

AI Disclosure

The 2.3.0 update (the RoR2 1.5 update, the new features and bug fixes listed in its changelog, and this README) was written with help from AI. The maintainer read and reviewed all of the AI-written changes. Versions before 2.3.0 contain no AI-generated code.

Features

  • By default, each player gets their own private Command cube for drops from:
    • monster kills (Artifact of Sacrifice)
    • teleporter and boss rewards
    • chests, equipment barrels, lunar pods, adaptive chests and scavenger bags
    • void cradles, void potentials and void seed rewards
  • Rusted Key and Encrusted Key lockboxes give one shared drop by default.
  • Each of these sources can be turned on or off in the config. See Configuration.
  • Everything else is always vanilla: shops, printers, scrappers, cauldrons, the Bazaar, Shrines of Chance and lunar coins.
  • Ensures drop rates are appropriate for the number of players, since all drops are shared now.
  • Adds bad luck protection to prevent long stretches without item drops from kills.
  • Adds a hotkey (F3 by default) to pull all of your unpicked Command cubes to you.
  • Adds a console command drop_rate <value> to set a custom drop rate for items (0-100).
  • Adds a console command drop_rate_report to view drop rate statistics for your run in the debugging window.
  • Adds a console command instance_loot_hotkey <key> to change the pull hotkey (for example instance_loot_hotkey F4).

Configuration

The config file is BepInEx/config/programit.InstanceBasedLoot.cfg. It is created the first time you launch the game with the mod installed. Edit it while the game is closed, then launch the game.

Instancing is decided by the host, so only the host's config matters for these settings.

Instancing

Set an option to true to give each player their own cube from that source, or false for one shared cube like vanilla.

Option Default Drops from
MonsterDrops true Monsters killed with Artifact of Sacrifice
BossRewards true Teleporter bosses, Mithrix, Voidling, Aurelionite and other boss encounters
Chests true Small, large, legendary and category chests
EquipmentBarrels true Equipment barrels
LunarPods true Lunar pods
VoidCradles true Void cradles
AdaptiveChests true Adaptive chests
ScavengerBags true Bags dropped by Scavengers
VoidPotentials true Void potentials
VoidSeeds true Void seed rewards
Lockboxes false Rusted Key and Encrusted Key lockboxes

Turning off MonsterDrops doesn't turn off the drop rate changes below. If monster drops are shared, you may want to set EnablePlayerBasedDropRateScaling to false.

General

Option Default Description
BaseDropChance 5 Base item drop chance for monster kills. It is recommended to leave this at the default value.
DropChanceMultiplier 1 Multiplies the drop chance. Use 0.5 to halve or 2 to double.
EnablePlayerBasedDropRateScaling true Divides the drop chance by the number of players, since every player gets a copy of each drop.
MinimumDropChance 1 The lowest drop chance player scaling can go down to.
EnableSwarmsScaling true Lowers drop chances with Artifact of Swarms to account for the doubled spawns.
EnableBadLuckProtection true Raises drop chances during long stretches without drops.
PullItemsHotkey F3 Hotkey that pulls your cubes to you. This one is per player.

How is this different from InstancedLoot Continuation?

InstancedLoot Continuation is a general-purpose instancing mod. It gives every player their own copy of chests, shrines and other objects, with many configurable modes (instance the object, the items, or both, optionally owner-only), and works with or without artifacts.

This mod is narrower and built for one setup: Artifact of Sacrifice + Artifact of Command.

  • It only does something when Artifact of Command is enabled. Nothing is instanced in a normal run.
  • It instances the Command cubes that drop from monster kills, teleporter/boss rewards and chests, not the chests or shrines themselves. Everyone opens the same chest, and each player gets their own cube from it.
  • It rebalances Sacrifice drop rates for shared loot: it scales the drop chance by player count, compensates for Artifact of Swarms, and adds bad luck protection so low drop rates don't leave you without items for long stretches.
  • It adds a hotkey to pull your unclaimed cubes to you, and console commands to set and report drop rates.
  • Its config is a simple on/off switch per drop source, not a choice between several instancing modes for each object.

If you want instanced loot in regular runs, or more instancing modes (owner-only pickups, instanced shrines, etc.), use InstancedLoot Continuation. If you play Sacrifice + Command with friends and want balanced, private item choices, use this one. The two mods aren't meant to be installed together.

Changelog

See CHANGELOG.md.

Contributors

CHANGELOG

Changelog

2.4.0

  • Add optional Risk Of Options support. The pull hotkey can now be rebound in game from the mod options menu.
  • The pull hotkey now supports modifier keys, like F3 + LeftControl.
  • Holding other keys (moving, sprinting) no longer blocks the pull hotkey.

2.3.0

  • Update for Risk of Rain 2 1.5 and update all libraries.
  • Add an Instancing config section to choose which drop sources are instanced.
  • Instance boss items dropped by Trophy Hunter's Tricorn.
  • Instance N'tormat book and page rewards, including N'kuhana chests. Each player only sees the book and page dropped for them.
  • Add an EventRewards option that instances rewards the game drops once per player in a pile, like Void Fields, Simulacrum waves, Halcyonite shrines, the Aurelionite heart, False Son and geodes.
  • Only instance the drops listed in the README. Shops, printers, scrappers, key lockboxes and other non-chest drops are no longer duplicated for every player.
  • Lunar coins drop as normal coins again instead of Command cubes.
  • Fix bad luck protection never resetting, which made almost every kill drop an item after the first few minutes.
  • Fix temporary and rental items becoming permanent when picked from an instanced cube.
  • Fix scrappers and other item pickers giving a free copy of the selected item.
  • Command cubes from monster kills now fall and land like vanilla droplets instead of appearing where the monster died.
  • The pull hotkey pulls both your private cubes and shared cubes, places them on the ground and in front of walls, spaces them evenly, and does nothing when you have no cubes.
  • instance_loot_hotkey now changes your own hotkey (it used to change the host's) and works from the main menu.
  • DropChanceMultiplier now also applies when player-based scaling is disabled, and manual drop_rate values reset between runs.
  • Loot is now interactable right away for players who join a run late. Alt-tabbing is no longer needed.
  • Removed the unused R2API Items, Language and CommandHelper dependencies.
  • Published as Instance_Based_Loot_Fixed. The changelog now lives in its own file.

2.2.0

  • Add configurable hotkey management for pulling items to you through a new console command instance_loot_hotkey
  • Update packages

2.1.0

  • Fix compatibility after Devotion update

2.0.1

  • Fix compatibility with CommandQueue mod

2.0.0

Fixes

  • No longer despawns all item drops if Artifact of Command is disabled.
  • Mod will disable itself during Bulwark's Ambry to avoid a bug causing Artifacts to not be rewarded on successful clears.
  • [DropInMultiplayer] Focusing (alt-tab) the Application will fix loot being non-interactable if a player joins after a level has loaded. This issue will resolve automatically at the beginning of the next stage if no action is taken.
  • Resolve NRE log spam from F3 keybind when no items can be pulled.

Configuration Options

  • Base drop rate
  • Disable player-based drop rates
  • Disable swarm drop rate modifier
  • Minimum drop rate
  • Drop rate mulitplier

Dynamic Drop Rates

There are a lot of details here, so it can be hard to understand how the game actually feels with these changes.

Here is what we aimed for:

  • Roughly 1 item per minute (this inevitably speeds up later in the game).
  • More consistent experiences with varying group sizes. (Roughly the same item rate as solo play.)
  • More consistent experiences with and without Artifact of Swarms.

Balance Changes

  1. Compensate drop rate for Artifact of Swarms (the game doubles spawns, but reduces drop rates by as little as 15%).
  2. Ensures drop rates are appropriate for the number of players, since all drops are shared now.
  3. Account for additional factors used by the game when calculating drop rates.
    • Artifact of Swarms lowers drop chances. (Lemurian w/ Swarms: 5%) vs (Lemurian w/o Swarms: 7.9%)
    • Elites have higher drop rates than normal enemies. (Normal Lemurian: 7.9%) vs (Elite Lemurian: 19%)
    • Some enemies have a higher base drop rate than others. (Normal Beetle: 5%) vs (Normal Scavenger: 43.2%)
    • Some entities have a native drop rate of 0%. (Mending healing orbs, TheBackup drones, Void Infestors)
  4. Bad Luck Protection: A 4 player lobby will have a base drop rate of 1.25, so it is possible for drops to feel scarce. We prevent unlucky streaks by adding all drop chances to a pool, and increasing drop rates after it reaches 100%. Bad luck protection only kicks in if the survivor's item count is falling behind (fewer item drops than expected or low item drops per minute).
    • Example: Survivors have killed 80 enemies with a drop rate of 1.25%, adding up to 100%.
      • next enemy has a 1.25% drop rate, so the drop rate will be bumped to 2.5%. (cumulative chance = 101.25%)
      • next enemy has a 3% drop rate, so the drop rate will be bumped to 7.25%. (cumulative chance = 104.25%)
      • next enemy has a 1.25% drop rate, so the drop rate will be bumped to 6.75%. (cumulative chance = 105.5%)
      • next enemy has a 5% drop rate, so the drop rate will be bumped to 10.5%. (cumulative chance = 110.5%)
  5. Do not scale teleporter loot drops by player count