IllusionMods / BepisPlugins

A collection of essential BepInEx plugins for games made by Illusion.
GNU General Public License v3.0
382 stars 82 forks source link

[AI/HS2] - Sideloader resolve warning spam at saving/loading studio scenes #189

Open ConQode opened 8 months ago

ConQode commented 8 months ago

After updating my AI to the latest BepInEx, Bepis Plugins and AIAPI versions (and basically every plugin I could find to update), I encountered an issue with the latest sideloader versions beginning with the one included in the BepisPlugins_r19.3.3. With the BepisPlugins_r19.3.2 version those warning don't appear.

When loading or saving a scene with several items in it, the console is being spammed with Sideloader warnings for every item in the scene (see screenshot). bla2

To reproduce the issue, basically is needed to have the latest BepisPlugins installed, add any objects to the scene and save the scene. To reproduce the second issue (im not sure if it is related to the first issue), I am not sure how to reproduce it, as it occours for me seemingly randomly.

Not really sure if that is relevant or not. I just encountered that issue after updating my plugins, since I sometimes wasn't able to save my scene anymore because of the following error:

[Error  : Unity Log] ArgumentException: An item with the same key has already been added. Key: 226
Stack trace:
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <f2e6809acb14476a81f399aeb800f8f2>:0)
Sideloader.AutoResolver.StudioObjectSearch.FindObjectInfoAndOrder (Sideloader.AutoResolver.StudioObjectSearch+SearchType searchType, System.Type objectType, System.Collections.Generic.Dictionary`2[System.Int32,System.Int32]& dicObjectInfoOrder) (at <8265a189123347ed85fa1a71e1837368>:0)
Sideloader.AutoResolver.UniversalAutoResolver+Hooks.SavePrefix () (at <8265a189123347ed85fa1a71e1837368>:0)
(wrapper dynamic-method) Studio.SceneInfo.DMD<Studio.SceneInfo::Save>(Studio.SceneInfo,string)
Studio.Studio.SaveScene () (at <fc5e30ac19c548aaa1879eb2a5c1c7cc>:0)
(wrapper dynamic-method) Studio.SystemButtonCtrl.DMD<Studio.SystemButtonCtrl::OnClickSave>(Studio.SystemButtonCtrl)
UnityEngine.Events.InvokableCall.Invoke () (at <0a7d89e4511e4bdeb215f76ca00fd04e>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <0a7d89e4511e4bdeb215f76ca00fd04e>:0)
UnityEngine.UI.Button.Press () (at <cbde84dcdf65425e940a9e23e01c7888>:0)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at <cbde84dcdf65425e940a9e23e01c7888>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <cbde84dcdf65425e940a9e23e01c7888>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <cbde84dcdf65425e940a9e23e01c7888>:0)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
AIProject.InputModule:ProcessMousePress(MouseButtonEventData)
AIProject.InputModule:ProcessMouseEvent(Int32)
AIProject.InputModule:ProcessMouseEvent()
AIProject.InputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()

Wanted to see if that issue still occours with the latest plugin versions. But for now I stay with the 19.3.2 BepisPlugins. Also it's hard to reproduce that inability to save the scene, as it seems to me that it would occour randomly.

ManlyMarco commented 8 months ago

The warnings indicate issues inside zipmods. Previous version of sideloader simply ignored them which caused a different set of issues, e.g. the accessories to studio items plugin not working correctly. The warnings can be resolved by fixing list files inside the listed zipmods to use proper group and category IDs (probably best to report to the mod authors). Make sure your sideloader modpack is up to date first.

The error when saving is most likely because of malformed list files inside zipmods that are used in a given scene (most likely the same zipmods that are shown in the errors before). Try to pinpoint which zipmod triggers this issue. Although unlikely it could also be an interaction between a couple of different zipmods.

ConQode commented 8 months ago

I can choose any mod from any zipmod, I always get that message for that object. I tried with I don't know many different zipmods and not a single time I didn't get that message

ManlyMarco commented 8 months ago

If you don't remove the offending items first then the error will keep appearing. It might be necessary to remove the zipmod file itself.

ConQode commented 8 months ago

What I'm saying is: The warning occours for EVERY zipmod. I can't remove all my mods. And I doubt every single one has an error.

ManlyMarco commented 8 months ago

You're right, it does appear to be happening for all zipmod items. Looks like there's an underlying issue that got uncovered by the update. The new version shouldn't have any effect outside of the log message being logged however.

ConQode commented 8 months ago

Thanks for your great work. I feared I had some fundamental issue in my plugin collection.