CrystalFerrai / ValheimMods

Contains all Valheim mods created by Crystal
Other
19 stars 5 forks source link

[Sated 1.1.11.0] Invalid IL code - load before menu #30

Closed source-guilherme closed 9 months ago

source-guilherme commented 10 months ago

Loading Sated mod gives error:

[Error  : Unity Log] InvalidProgramException: Invalid IL code in (wrapper dynamic-method) Player:DMD<Player::GetTotalFoodValue> (Player,single&,single&,single&): IL_0039: call      0x0000000d
Stack trace:
System.RuntimeMethodHandle.GetFunctionPointer () (at <834b2ded5dad441e8c7a4287897d63c7>:0)
MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform.GetFunctionPointer (System.Reflection.MethodBase method, System.RuntimeMethodHandle handle) (at <4e2760c7517c4ea79c633d67e84b319f>:0)
MonoMod.RuntimeDetour.Platforms.DetourRuntimeILPlatform.GetNativeStart (System.Reflection.MethodBase method) (at <4e2760c7517c4ea79c633d67e84b319f>:0)
MonoMod.RuntimeDetour.DetourHelper.GetNativeStart (System.Reflection.MethodBase method) (at <4e2760c7517c4ea79c633d67e84b319f>:0)
MonoMod.RuntimeDetour.Detour._TopApply () (at <4e2760c7517c4ea79c633d67e84b319f>:0)
MonoMod.RuntimeDetour.Detour._RefreshChain (System.Reflection.MethodBase method) (at <4e2760c7517c4ea79c633d67e84b319f>:0)
MonoMod.RuntimeDetour.Detour.Apply () (at <4e2760c7517c4ea79c633d67e84b319f>:0)
MonoMod.RuntimeDetour.Detour..ctor (System.Reflection.MethodBase from, System.Reflection.MethodBase to, MonoMod.RuntimeDetour.DetourConfig& config) (at <4e2760c7517c4ea79c633d67e84b319f>:0)
(wrapper dynamic-method) MonoMod.RuntimeDetour.ILHook+Context.DMD<MonoMod.RuntimeDetour.ILHook+Context::Refresh>(MonoMod.RuntimeDetour.ILHook/Context)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<MonoMod.RuntimeDetour.ILHook+Context::Refresh>?-1005941414(object)
HarmonyLib.Internal.RuntimeFixes.StackTraceFixes.OnILChainRefresh (System.Object self) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
MonoMod.RuntimeDetour.ILHook.Apply () (at <4e2760c7517c4ea79c633d67e84b319f>:0)
HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
Rethrow as HarmonyException: IL Compile Error (unknown location)
HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
Rethrow as HarmonyException: IL Compile Error (unknown location)
HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.PatchClassProcessor.Patch () (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Harmony.PatchAll (System.Type type) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
Sated.SatedPlugin.Awake () (at <ae3807a84650441f9e9e32c5e4579b01>:0)
UnityEngine.GameObject:AddComponent(Type)
BepInEx.Bootstrap.Chainloader:Start()
UnityEngine.GameObject:.cctor()
Fishlabs.Common.SingletonMonoBehaviour`1:get_Instance()
Fishlabs.PlatformManagerInitializer:OnRuntimeMethodLoad()

More details such as mod list or config values, ask me and I'll provide promptly.

CrystalFerrai commented 10 months ago

It looks like you have two mods modifying the same function in an incompatible way. You will need to figure out which mod is conflicting and choose one or the other to use.

source-guilherme commented 10 months ago

Discovered that the mod is incompatible with FoodDurationMultiplier 1.1.2 by blacks7ar and disabling yours solves all the rest, also maybe there's an incompatibility with Almanac 2.3.1 by RustyMods as well.