zolantris / ValheimMods

Collection of ValheimMods, ValheimRaft (originally created by Sarcen) and a few other upcoming mods including a vehicles mod.
GNU General Public License v3.0
8 stars 4 forks source link

Wrong load order? #5

Closed ersan closed 7 months ago

ersan commented 7 months ago

Tried using this build of ValheimRAFT and it crashes the server - I believe it's because it is attempting to load ValheimRAFT before Jotunn

[Message:   BepInEx] BepInEx 5.4.22.0 - valheim_server (11/7/2023 9:55:21 AM)
[Message:   BepInEx] User is running BepInExPack Valheim version 5.4.2202 from Thunderstore
[Info   :   BepInEx] Running under Unity v2022.3.12.5236448
[Info   :   BepInEx] CLR runtime version: 4.0.30319.42000
[Info   :   BepInEx] Supports SRE: True
[Info   :   BepInEx] System platform: Bits64, Windows
[Message:   BepInEx] Preloader started
[Info   :   BepInEx] Loaded 1 patcher method from [BepInEx.Preloader 5.4.22.0]
[Info   :   BepInEx] Loaded 1 patcher method from [BepInEx.MonoMod.HookGenPatcher 1.2.0.0]
[Info   :   BepInEx] 2 patcher plugins loaded
[Info   :HookGenPatcher] Previous MMHOOK location found. Using that location to save instead.
[Info   :HookGenPatcher] Already ran for this version, reusing that file.
[Info   :   BepInEx] Patching [UnityEngine.CoreModule] with [BepInEx.Chainloader]
[Message:   BepInEx] Preloader finished
[Message:   BepInEx] Chainloader ready
[Message:   BepInEx] Chainloader started
[Info   :   BepInEx] 4 plugins to load
[Info   :   BepInEx] Loading [MaxPlayerCount 1.2.0]
[Info   :   BepInEx] Loading [ValheimRAFT 1.5.0]
Can't find custom attr constructor image: C:\valhost\staging\BepInEx\plugins\ValheimRAFT.dll mtoken: 0x0a000019 due to: Could not load file or assembly 'Jotunn, Version=2.15.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Can't find custom attr constructor image: C:\valhost\staging\BepInEx\plugins\ValheimRAFT.dll mtoken: 0x0a000019 due to: Could not load file or assembly 'Jotunn, Version=2.15.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Can't find custom attr constructor image: C:\valhost\staging\BepInEx\plugins\ValheimRAFT.dll mtoken: 0x0a000019 due to: Could not load file or assembly 'Jotunn, Version=2.15.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Can't find custom attr constructor image: C:\valhost\staging\BepInEx\plugins\ValheimRAFT.dll mtoken: 0x0a000019 due to: Could not load file or assembly 'Jotunn, Version=2.15.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Can't find custom attr constructor image: C:\valhost\staging\BepInEx\plugins\ValheimRAFT.dll mtoken: 0x0a000019 due to: Could not load file or assembly 'Jotunn, Version=2.15.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Can't find custom attr constructor image: C:\valhost\staging\BepInEx\plugins\ValheimRAFT.dll mtoken: 0x0a000019 due to: Could not load file or assembly 'Jotunn, Version=2.15.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Can't find custom attr constructor image: C:\valhost\staging\BepInEx\plugins\ValheimRAFT.dll mtoken: 0x0a000019 due to: Could not load file or assembly 'Jotunn, Version=2.15.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Couldn't extract exception string from exception of type FileNotFoundException (another exception of class 'FileNotFoundException' was thrown while processing the stack trace)
ersan commented 7 months ago

Also even if I force Jotunn to load earlier I get:

[Warning:Jotunn.Utils.BepInExUtils] Plugin without Info found: ValheimRAFT, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null

But it does load.

On another platform I get:

[Info   :   BepInEx] Loading [ValheimRAFT 1.5.0]
[Info   :Jotunn.Main] Initializing CommandManager
[Warning:Jotunn.Main] [ValheimRAFT] CommandManager was accessed before Jotunn Awake, this can cause unexpected behaviour. Please make sure to add `[BepInDependency(Jotunn.Main.ModGuid)]` next to your BaseUnityPlugin
[Info   :Jotunn.Main] Initializing PrefabManager
[Warning:Jotunn.Main] [ValheimRAFT] PrefabManager was accessed before Jotunn Awake, this can cause unexpected behaviour. Please make sure to add `[BepInDependency(Jotunn.Main.ModGuid)]` next to your BaseUnityPlugin
[Info   :   BepInEx] Loading [Jotunn 2.15.2]

So again, probably wrong load order. The error message tells you how to fix it.

EDIT: https://github.com/zolantris/ValheimRaft/pull/6

zolantris commented 7 months ago

I'll close this when things are released. Thanks!

zolantris commented 7 months ago

Should be resolved after 1.5.1 was released today. @ersan let me know if there are still problems