DysonSphereMod / QOL

64 stars 34 forks source link

[RailgunsRetargeting] Broken with latest patch. Bepinex crash log attached #133

Open AndrewMMueller opened 2 years ago

AndrewMMueller commented 2 years ago

Logout put attached. Only mod active is Railguns. Fast Absorption still works.

LogOutput.log


[Info : BepInEx] Loading [RailgunsRetargeting 1.3.3] [Info : Console] System.TypeLoadException: Could not resolve type with token 0100001c (from typeref, class/assembly AstroPose, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null) at (wrapper managed-to-native) System.Reflection.MonoMethodInfo.get_method_info(intptr,System.Reflection.MonoMethodInfo&) at System.Reflection.MonoMethodInfo.GetMethodInfo (System.IntPtr handle) [0x00000] in <2fa7a6a452ca43df998f07fd1486c0df>:0 at System.Reflection.MonoMethod.GetPseudoCustomAttributes () [0x00002] in <2fa7a6a452ca43df998f07fd1486c0df>:0 at System.MonoCustomAttrs.GetPseudoCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType) [0x0000a] in <2fa7a6a452ca43df998f07fd1486c0df>:0 at System.MonoCustomAttrs.GetCustomAttributesBase (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inheritedOnly) [0x0001f] in <2fa7a6a452ca43df998f07fd1486c0df>:0 at System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inherit) [0x00037] in <2fa7a6a452ca43df998f07fd1486c0df>:0 at System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Boolean inherit) [0x00024] in <2fa7a6a452ca43df998f07fd1486c0df>:0 at System.Reflection.MonoMethod.GetCustomAttributes (System.Boolean inherit) [0x00000] in <2fa7a6a452ca43df998f07fd1486c0df>:0 at HarmonyLib.PatchTools+<>c__DisplayClass2_0.<GetPatchMethod>b__0 (System.Reflection.MethodInfo m) [0x00000] in <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0 at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] predicate) [0x0002c] in <ea9b8dbcfda24ea39c0a3639d0939b66>:0 at HarmonyLib.PatchTools.GetPatchMethod (System.Type patchType, System.String attributeName) [0x00018] in <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0 at HarmonyLib.PatchClassProcessor..ctor (HarmonyLib.Harmony instance, System.Type type, System.Boolean allowUnannotatedType) [0x000a4] in <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0 at HarmonyLib.Harmony.CreateClassProcessor (System.Type type, System.Boolean allowUnannotatedType) [0x00000] in <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0 at HarmonyLib.Harmony.PatchAll (System.Type type) [0x00000] in <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0 at RailgunsRetargeting.RailgunsRetargeting.Awake () [0x00052] in <1184be2240774cb9956ec402eda688ec>:0 [Message: BepInEx] Chainloader startup complete

Chrisalead commented 2 years ago

I hope the person that forked BetterStats into BottleNeck (which is even better and updated often) will fork that one too... Otherwise we will never have retargeting again since BrokenMass doesn't seem to update his mods anymore... And considering my current 100TW spheres expanding, without retargeting i'm not playing the game anymore...

Sortileger commented 2 years ago

Yes, I am rather fond of this module. Hopefully someone who knows what they are doing will pick it up. If not, I'm considering it. Guess I'll start looking for a crash course.

starfi5h commented 2 years ago

You can fix by replacing AstroPose[] to AstroData[] in mod code. Or use RailgunsRetargetMini if you don't care about the original orbit settings of ejectors.

AndrewMMueller commented 2 years ago

@starfi5h Thanks for this. I'll try the fix out later on. Regarding RailgunsRetargetMini what do you mean by "Original orbit settings" of ejectors? From what I understand every X number of frames there is an orbit check done and the 'original' or any settings the user selected will be changed based on available orbit.

Did I misunderstand this?

Again. Thank you for taking the time to dig into this mod and provide an alternative.

starfi5h commented 2 years ago

You're correct, the user selected orbit will be overwritten. It will check from orbit 1 so orbit with lower number will have higher priority.

AndrewMMueller commented 2 years ago

@starfi5h So I got around to testing this today and unfortunately it does not seem to work. It's the only mod installed. The Log produced no errors and chainloader completed without issue.

Let me know if you want me to open this as a new issue on your specific git for this to carry the conversation forward.

railgunsnotretargeting

starfi5h commented 2 years ago

I have stated in README that you need to set a least an orbit to make retarget work. It's equivalence to original mod's forceRetargeting = false. So ejectors without any orbit set (new, targeting deleted orbit) won't retarget. For further issues, you can open issue in my repo.

Edit: You can set ForceRetargeting = true in config. Or set/unset all ejectors in a system in dyson editor (See README).

Chrisalead commented 2 years ago

Works like a charm ! Thanks a lot !

AndrewMMueller commented 2 years ago

@starfi5h Bummer. That's what I was afraid of. The original mod did 2 crucial things. First is Ignore orbit one. Perhaps not crucial compared to the second which is Forced retargeting.

Meaning when you use a blueprint to put this down no orbit is selected by default. A forced update happens causing the railguns to choose orbit 2 and forward. While a solid replacement for some this does not solve having to go around manually retargeting thousands of railguns.

Again. Thank you for your time and effort in reviving this mod. Hundreds have already downloaded it as a testament to its value.

utdrmac commented 1 year ago

Relevant section from logs. Hoping for a fix soon.

[Info   :   BepInEx] Loading [RailgunsRetargeting 1.3.3]
System.TypeLoadException: Could not resolve type with token 0100001c (from typeref, class/assembly AstroPose, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)
  at (wrapper managed-to-native) System.Reflection.MonoMethodInfo.get_method_info(intptr,System.Reflection.MonoMethodInfo&)
  at System.Reflection.MonoMethodInfo.GetMethodInfo (System.IntPtr handle) [0x00000] in <2fa7a6a452ca43df998f07fd1486c0df>:0 
  at System.Reflection.MonoMethod.GetPseudoCustomAttributes () [0x00002] in <2fa7a6a452ca43df998f07fd1486c0df>:0 
  at System.MonoCustomAttrs.GetPseudoCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType) [0x0000a] in <2fa7a6a452ca43df998f07fd1486c0df>:0 
  at System.MonoCustomAttrs.GetCustomAttributesBase (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inheritedOnly) [0x0001f] in <2fa7a6a452ca43df998f07fd1486c0df>:0 
  at System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inherit) [0x00037] in <2fa7a6a452ca43df998f07fd1486c0df>:0 
  at System.MonoCustomAttrs.GetCustomAttributes (System.Reflection.ICustomAttributeProvider obj, System.Boolean inherit) [0x00024] in <2fa7a6a452ca43df998f07fd1486c0df>:0 
  at System.Reflection.MonoMethod.GetCustomAttributes (System.Boolean inherit) [0x00000] in <2fa7a6a452ca43df998f07fd1486c0df>:0 
  at HarmonyLib.PatchTools+<>c__DisplayClass2_0.<GetPatchMethod>b__0 (System.Reflection.MethodInfo m) [0x00000] in <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0 
  at System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x0002c] in <ea9b8dbcfda24ea39c0a3639d0939b66>:0 
  at HarmonyLib.PatchTools.GetPatchMethod (System.Type patchType, System.String attributeName) [0x00018] in <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0 
  at HarmonyLib.PatchClassProcessor..ctor (HarmonyLib.Harmony instance, System.Type type, System.Boolean allowUnannotatedType) [0x000a4] in <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0 
  at HarmonyLib.Harmony.CreateClassProcessor (System.Type type, System.Boolean allowUnannotatedType) [0x00000] in <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0 
  at HarmonyLib.Harmony.PatchAll (System.Type type) [0x00000] in <7f26c0a74c5b43c2a5fc5efd29ec63d6>:0 
  at RailgunsRetargeting.RailgunsRetargeting.Awake () [0x00052] in <1184be2240774cb9956ec402eda688ec>:0