FunkFrog / ShareSuite

Risk of Rain 2 Item, Money, & Equipment sharing mod build upon BepInEx
https://thunderstore.io/package/FunkFrog-and-Sipondo/ShareSuite/
GNU General Public License v3.0
39 stars 27 forks source link

Latest Update broke item pick up #189

Closed LeftUnknown closed 2 years ago

LeftUnknown commented 2 years ago

Installed Mods Normal API's, Item Stats, and ShareSuite. Disabling share suite immediately resolves issue. Describe the bug All players unable to pick up items in both SP and MP while ShareSuite is enabled.

To Reproduce

  1. Enable ShareSuite
  2. Attempt to pick up an item

Expected behavior Acquisition of item and distribution amongst players.

An-Epic-Beard commented 2 years ago

some additional info from BepInEx console when trying to pick up an item with share suite enabled

image

image

The full stack trace: [Error: Unity Log] MissingFieldException: Field 'RoR2.ItemDef.tier' not found. Stack trace: DMD<>?123236352.Hook?-921111168 (RoR2.GenericPickupController , RoR2.CharacterBody ) (at :0) DMD<>?123236352.Trampoline?1815439360 (RoR2.GenericPickupController , RoR2.CharacterBody ) (at :0) ShareSuite.EquipmentSharingHooks.OnGrantEquipment (On.RoR2.GenericPickupController+orig_AttemptGrant orig, RoR2.GenericPickupController self, RoR2.CharacterBody body) (at <00ea748bcf0e4a9db6440754dfb0ddd4>:0) DMD<>?123236352.Hook?1087953792 (RoR2.GenericPickupController , RoR2.CharacterBody ) (at :0) DMD<>?123236352.Trampoline?1813921792 (RoR2.GenericPickupController , RoR2.CharacterBody ) (at <2092aa3b83ad405da95761744356136c>:0) BiggerBazaar.BiggerBazaar.GenericPickupController_AttemptGrant (On.RoR2.GenericPickupController+orig_AttemptGrant orig, RoR2.GenericPickupController self, RoR2.CharacterBody body) (at :0) DMD<>?123236352.Hook?869486976 (RoR2.GenericPickupController , RoR2.CharacterBody ) (at <3a8ea77ec46749a79e7fbe58eb3057dd>:0) RoR2.GenericPickupController.OnInteractionBegin (RoR2.Interactor activator) (at <7a5120bd69d843a8b8e90b8cce404663>:0) RoR2.Interactor.PerformInteraction (UnityEngine.GameObject interactableObject) (at <7a5120bd69d843a8b8e90b8cce404663>:0) RoR2.Interactor.AttemptInteraction (UnityEngine.GameObject interactableObject) (at <7a5120bd69d843a8b8e90b8cce404663>:0) RoR2.InteractionDriver.FixedUpdate () (at <7a5120bd69d843a8b8e90b8cce404663>:0)

An-Epic-Beard commented 2 years ago

I pulled the code just to take a look see, it appears to be something in the OnGrantItem method starting line 136 in ItemSharingHooks.cs. Maybe when it checks for IsValidItemPickup? That seems like it's the first time it tries to hit the tier property of an item definition.

Sipondo commented 2 years ago

Yeah they changed how item tiers work to make them more flexible for modding afaik. Simply means that we have to get rid of the enum.

FunkFrog commented 2 years ago

Fixed in version 2.7.1