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.
DropSourceForItems
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!
| Date uploaded | 10 hours ago |
| Version | 1.0.0 |
| Download link | LordVGames-DropSourceForItems-1.0.0.zip |
| Downloads | 11 |
| Dependency string | LordVGames-DropSourceForItems-1.0.0 |
This mod requires the following mods to function
bbepis-BepInExPack
Unified BepInEx all-in-one modding pack - plugin framework, detour library
Preferred version: 5.4.2121MonoDetour-MonoDetour_BepInEx_5
HarmonyX interop & BepInEx 5 logger integration for MonoDetour. Initializes MonoDetour early as a side effect.
Preferred version: 0.7.15README
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 from thunderstore 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
CHANGELOG
1.0.0
- First release