William758 / ZetArtifacts

2 stars 2 forks source link

ZetArtifacts is incompatible with LittleGameplayTweaks, which causes Bosses Drop Items to not function correctly in Simulacrum. #12

Open ConqAra opened 2 years ago

ConqAra commented 2 years ago

ZetArtifacts nullrefs when LittleGameplayTweaks is installed, and that causes the code to crash before Bosses Drop Items (and RiskyMod and a bunch of other stuff that need to know gamemodedef) can grab the simulacrum gamemode index. So it isnt able to shut off a config like "Hordes Drop Items" during Simulacrum because it never got the gamemode index of Simulacrum.

ZetArtifacts and LittleGameplayTweaks have an incompat that needs to be fixed between them.

ConqAra commented 2 years ago

Full Log: https://pastebin.com/aAP5jjyG

Main Part of the Log you probably want to see:


InfiniteTowerEnding (GameEndingDef)
[Info   : Unity Log] LoadContentPacks() end
[Warning: Unity Log] Could not find scene with name "loadingbasic".
[Warning: Unity Log] Could not find scene with name "intro".
[Info   : Unity Log] Command "set_scene" failed: "intro" is not a valid scene.
[Info   : Unity Log] Game content load completed in 11228ms.
[Info   : Unity Log] Setting current language to "en"
[Info   : Unity Log] [RoR2.Stats.StatSheet] init stat sheet
[Debug  :RoR2BepInExPack] SaferAchievementManager - assembly.GetTypes() failed for : protobuf-net, Version=2.4.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67
Not all types will be scanned.
[Error  : Unity Log] [RoR2.GameModeCatalog] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at LittleGameplayTweaks.LittleGameplayTweaks.EquipmentBonusRate () [0x00006] in <678314fa1e1144b4ba2ef73cee2ad9f7>:IL_0006 
  at (wrapper delegate-invoke) <Module>.invoke_void()
  at ResourceAvailability.MakeAvailable () [0x0001a] in <7a5120bd69d843a8b8e90b8cce404663>:IL_001A 
  at DMD<LoadGameModes>?142850816._RoR2_GameModeCatalog::LoadGameModes () [0x00033] in <45ec13a398ea452ebcb2c5091b09f06c>:IL_0033 
  at DMD<>?142850816.Trampoline<RoR2.GameModeCatalog::LoadGameModes>?-1877044224 () [0x00020] in <ca01cf359d1142679913bceae46b95f9>:IL_0020 
  at BossesDropItems.BossesDropItems+<>c.<Awake>b__16_1 (On.RoR2.GameModeCatalog+orig_LoadGameModes orig) [0x00001] in <c256d0d08dab4bf49f1b0c263463c85b>:IL_0001 
  at DMD<>?142850816.Hook<RoR2.GameModeCatalog::LoadGameModes>?-1349848960 () [0x00014] in <7756d1498f77451fbe015d22e758ae32>:IL_0014 
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <44afb4564e9347cf99a1865351ea8f4a>:IL_0032 
   --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0004b] in <44afb4564e9347cf99a1865351ea8f4a>:IL_004B 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <44afb4564e9347cf99a1865351ea8f4a>:IL_0000 
  at RoR2.SystemInitializerAttribute.Execute () [0x00174] in <7a5120bd69d843a8b8e90b8cce404663>:IL_0174 
[Info   : Unity Log] SystemInitializerAttribute infinite loop detected. currentMethod=R2API.ContentManagement.CatalogBlockersBlockNetworkedPrefabs
[Info   : Unity Log] initializer dependencies = RoR2.Networking.NetworkManagerSystem
[Info   : Unity Log] initialized types = RoR2.ArtifactCatalog,
William758 commented 2 years ago

The escalation eliteDefs didn't have their elite equipment set when little gameplay tweaks was trying to read them, so I've fixed the issue by assigning the equipment earlier.