DropSourceForItems

v1.0.0·Updated 2026-08-19

Adds a drop source field to item pickups for modders to know what GameObject an item came from. Mod does nothing on it's own!

About this mod Author’s original text

DropSourceForItems

This mod adds new fields to GenericPickupController, GenericPickupController.CreatePickupInfo and PickupPickerController that store what GameObject an item was spawned from and its name (eventually for the cases of enemies dropping an item on death). To use these new fields, use the extension methods GetPickupDropSource, SetPickupDropSource and GetCachedPickupDropSourceName. The cached name is set for you when using SetPickupDropSource.

The functionality for setting drop sources were manually added, so mods' own item drops won't support this unless added by this mod or themselves. Items from choice pickups have their drop source set to the choice pickup itself instead of the thing that spawned the choice pickup (i.e. drop source from void potential is the void potential instead of the thing that spawned the void potential. void potential itself will have its drop source set to the thing that dropped it)

To use this, just add the DropSourcePatcherInterop.dll file from the mod as a project reference. Adding the mod through nuget may also work, but I have not tested that yet

Mods supported

  • EnemiesReturns
  • - Lynx shrine
  • RiskyTweaks
  • - Combat shrine dropping items

Todo

  • Setup drop sources for items dropped by enemies on death
  • - Then you could the cached drop source name (since the enemy would be null after death) to find the type of body that dropped the item

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. 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.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. 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.

Dependencies

Install these first, or the mod will not work:

bbepis-BepInExPackMonoDetour-MonoDetour_BepInEx_5

File & checksum

Filename
DropSourceForItems-1.0.0.zip
File size
147.8 KiB