I'm curious if maybe this could be refactored to use S1API so that you have one version of the mod that works in both stable and alternate versions of S1?
Is this mod open source? Would love to peek behind the curtains and see.
I'll have to take a look, I've seen people do other things to make it work for both versions so it's possible I could do something similar if S1API doesn't work. I have it up on github but I don't think I kept it up to date. I have them up on thuderstore and they show the source there so probably a better bet if you want to see.
Unfortunately, using the alternate version will most likely break some other mods dependent on the IL2CPP backend. Gonna comment in case it ever makes it to the main branch, but even if it doesn't, wonderful mod. We appreciate your work!
The modding community has decided to focus only on the alternate branch for future mods. It's unlikely that any mods will be ported to the main branch (unless of course the alternate becomes the main branch).
It's much more likely that any existing mods on the main branch will be ported to the alternate branch.
Gotcha, good to know. Seeing as there are only like, 2 mono mods so far, I was somewhat worried this would be divisive. Would make a bit more sense to build around the more stable backend when it comes to modding. Where did you get the information that the modding community decided to move forth with the alternative version? If there's a large modding discord or something for this game, I'd love to stop by.
[21:36:38.349] [AlwaysShowDistancesOnCompass] System.TypeLoadException: Could not load type 'ScheduleOne.UI.Compass.CompassManager' from assembly 'Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, RuntimeType type, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs) at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit) at System.RuntimeType.GetCustomAttributes(Boolean inherit) at HarmonyLib.HarmonyMethodExtensions.GetFromType(Type type) at HarmonyLib.PatchClassProcessor..ctor(Harmony instance, Type type, Boolean allowUnannotatedType) at HarmonyLib.PatchClassProcessor..ctor(Harmony instance, Type type) at HarmonyLib.Harmony.CreateClassProcessor(Type type) at HarmonyLib.Harmony.<PatchAll>b__11_0(Type type) at HarmonyLib.CollectionExtensions.Do[T](IEnumerable`1 sequence, Action`1 action) at HarmonyLib.Harmony.PatchAll(Assembly assembly) at MelonLoader.MelonMod.HarmonyInit() in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\MelonMod.cs:line 40 at MelonLoader.MelonEvent.<>c.<Invoke>b__1_0(LemonAction x) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 174 at MelonLoader.MelonEventBase`1.Invoke(Action`1 delegateInvoker) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 143
However, that was my mistake sorry for the wrong information I didn’t notice that the mod needs to be installed on the 'alternate' version. Are you planning to release an update for the regular version of the game?
Would it be possible to always show the distance to only the closest deal? And/Or change its color to make it easier to see. This would help the player easily path to all their deals in the most efficient manner.
I was actually planning on doing something with changing the color. My idea was to change the color based on how much time was left so it's easier to prioritize ones ending sooner.
Does not work, I am getting this error: [01:00:58.911] [AlwaysShowDistancesOnCompass] System.TypeLoadException: Could not load type 'ScheduleOne.UI.Compass.CompassManager' from assembly 'Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, RuntimeType type, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs) at System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, RuntimeType type, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs) at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit) at System.RuntimeType.GetCustomAttributes(Boolean inherit) at HarmonyLib.HarmonyMethodExtensions.GetFromType(Type type) at HarmonyLib.PatchClassProcessor..ctor(Harmony instance, Type type, Boolean allowUnannotatedType) at HarmonyLib.PatchClassProcessor..ctor(Harmony instance, Type type) at HarmonyLib.Harmony.CreateClassProcessor(Type type) at HarmonyLib.Harmony.<PatchAll>b__11_0(Type type) at HarmonyLib.CollectionExtensions.Do[T](IEnumerable`1 sequence, Action`1 action) at HarmonyLib.Harmony.PatchAll(Assembly assembly) at MelonLoader.MelonMod.HarmonyInit() in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\MelonMod.cs:line 40 at MelonLoader.MelonEvent.<>c.<Invoke>b__1_0(LemonAction x) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 174 at MelonLoader.MelonEventBase`1.Invoke(Action`1 delegateInvoker) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 143
From what I can understand (with my limited modding/coding knowledge) its trying to call a function ScheduleOne.UI.Compass.CompassManager which should be in the Assembly-CSharp.dll, but it isn't. This was done on the latest version of the MelonLoader (which is 7.0), so I figured that the error is related to changes in the ModLoader. I tried versions 6.6, 6.4 and 5.4 (as suggested in the Thunderstore.io website), but with no luck. I did this because Assembly-CSharp.dll seems to be compiled on a different version. CompassManager class also has its issues. .NET frameworks are installed and other mods are running fine (I tried running only this one, no luck)
44 comments
Is this mod open source? Would love to peek behind the curtains and see.
Will you be uploading this to thunderstore as well?
https://thunderstore.io/c/schedule-i/p/animandan/AlwaysShowDistancesOnCompassIL2CPP/
It's much more likely that any existing mods on the main branch will be ported to the alternate branch.
at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, RuntimeType type, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
at System.RuntimeType.GetCustomAttributes(Boolean inherit)
at HarmonyLib.HarmonyMethodExtensions.GetFromType(Type type)
at HarmonyLib.PatchClassProcessor..ctor(Harmony instance, Type type, Boolean allowUnannotatedType)
at HarmonyLib.PatchClassProcessor..ctor(Harmony instance, Type type)
at HarmonyLib.Harmony.CreateClassProcessor(Type type)
at HarmonyLib.Harmony.<PatchAll>b__11_0(Type type)
at HarmonyLib.CollectionExtensions.Do[T](IEnumerable`1 sequence, Action`1 action)
at HarmonyLib.Harmony.PatchAll(Assembly assembly)
at MelonLoader.MelonMod.HarmonyInit() in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\MelonMod.cs:line 40
at MelonLoader.MelonEvent.<>c.<Invoke>b__1_0(LemonAction x) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 174
at MelonLoader.MelonEventBase`1.Invoke(Action`1 delegateInvoker) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 143
[01:00:58.911] [AlwaysShowDistancesOnCompass] System.TypeLoadException: Could not load type 'ScheduleOne.UI.Compass.CompassManager' from assembly 'Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, RuntimeType type, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
at System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, RuntimeType type, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
at System.RuntimeType.GetCustomAttributes(Boolean inherit)
at HarmonyLib.HarmonyMethodExtensions.GetFromType(Type type)
at HarmonyLib.PatchClassProcessor..ctor(Harmony instance, Type type, Boolean allowUnannotatedType)
at HarmonyLib.PatchClassProcessor..ctor(Harmony instance, Type type)
at HarmonyLib.Harmony.CreateClassProcessor(Type type)
at HarmonyLib.Harmony.<PatchAll>b__11_0(Type type)
at HarmonyLib.CollectionExtensions.Do[T](IEnumerable`1 sequence, Action`1 action)
at HarmonyLib.Harmony.PatchAll(Assembly assembly)
at MelonLoader.MelonMod.HarmonyInit() in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\MelonMod.cs:line 40
at MelonLoader.MelonEvent.<>c.<Invoke>b__1_0(LemonAction x) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 174
at MelonLoader.MelonEventBase`1.Invoke(Action`1 delegateInvoker) in D:\a\MelonLoader\MelonLoader\MelonLoader\Melons\Events\MelonEvent.cs:line 143
From what I can understand (with my limited modding/coding knowledge) its trying to call a function ScheduleOne.UI.Compass.CompassManager which should be in the Assembly-CSharp.dll, but it isn't.
This was done on the latest version of the MelonLoader (which is 7.0), so I figured that the error is related to changes in the ModLoader.
I tried versions 6.6, 6.4 and 5.4 (as suggested in the Thunderstore.io website), but with no luck.
I did this because Assembly-CSharp.dll seems to be compiled on a different version.
CompassManager class also has its issues.
.NET frameworks are installed and other mods are running fine (I tried running only this one, no luck)