jpw1991 / chebs-necromancy

Cheb's Necromancy adds Necromancy to Valheim via craftable wands and structures. Minions will follow you, guard your base, and perform menial tasks.
The Unlicense
10 stars 4 forks source link

A few errors I don't understand. #237

Closed Fallenare closed 11 months ago

Fallenare commented 11 months ago

Thanks for taking the time to report a bug. Please fill in the template below and delete any irrelevant parts.

Description

Hello,

I just added your Necromancy, Mercenaries, Thrown Weapons, and Mythical Weapons mods to my somewhat extensive list of mods. Any help you can provide to fix this issue would be much appreciated!

I am adding a document I am using to track my mods, and document bugs as I find them. These are all operating on base configs with fresh installs (08/08/2023) on my whole mod list, game, and mod manager. So far there are very few issues other than the one I am having with Necromancy, but the ones I have seen so far are included in case they help shed light on the cause.

My Mod List Documentation.docx

I noticed the following issues in my console:

1.) Warnings of a version mismatch for the library you include with the mods. (not sure this even matters)

[Warning:ChebsNecromancy.BasePlugin] Minor version difference detected! Please check your ChebsValheimLibrary.dll version! Mod expected 2.2.0, but library version is 2.1.1

2.) This warning. (not sure this matters, and I don't know if its just a continuation of the previous warning?)

[Warning:ChebsNecromancy] Exception caught while loading assets: System.NullReferenceException: Object reference not set to an instance of an object at ChebsNecromancy.BasePlugin.LoadChebGonazAssetBundle () [0x0060d] in <91ce218cb62b47ccbcbddcf30b99d01c>:0

3.) An error with the woodcutter minion from Mercenaries. (Not sure if Necromancy or Library mismatch may contribute)

Started from void ChebsMercenaries.BasePlugin::.ctor(), location C:\SteamLibrary\steamapps\common\Valheim\BepInEx\plugins\ChebsMercenaries.dll

At 2023-08-08 12.12.38

[Warning:ChebsMercenaries.BasePlugin] Minor version difference detected! Please check your ChebsValheimLibrary.dll version! Mod expected 2.1.2, but library version is 2.2.0 [Error : Unity Log] MissingFieldException: Field 'ChebsValheimLibrary.Minions.AI.WoodcutterAI.UpdateDelay' not found. Stack trace: ChebsMercenaries.Minions.HumanWoodcutterMinion.CreateConfigs (ChebsMercenaries.BasePlugin plugin) (at <6c48eaac222e497792310f1c5a2851ef>:0) ChebsMercenaries.BasePlugin.CreateConfigValues () (at <6c48eaac222e497792310f1c5a2851ef>:0) ChebsMercenaries.BasePlugin.Awake () (at <6c48eaac222e497792310f1c5a2851ef>:0) UnityEngine.GameObject:AddComponent(Type) BepInEx.Bootstrap.Chainloader:Start() UnityEngine.UI.Image:OnCanvasHierarchyChanged()

4.) This error repeats endlessly and spams very fast in the console window.

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: ChebsNecromancy.Items.Armor.Player.SpectralShroud.GuardianWraithStuff () (at <91ce218cb62b47ccbcbddcf30b99d01c>:0) ChebsNecromancy.Items.Armor.Player.SpectralShroud.DoOnUpdate () (at <91ce218cb62b47ccbcbddcf30b99d01c>:0) ChebsNecromancy.BasePlugin.Update () (at <91ce218cb62b47ccbcbddcf30b99d01c>:0)

Attachments Checklist

Drag and drop the files onto the page:

Cheb'sMods Issue Docs.zip

GitHub annoyingly rejects the .cfg file extension. You can zip it and upload that, or open the file and then copy & paste all contents just below:

Config text dump CONFIG FILE TEXT HERE

To Reproduce (if applicable)

The warnings/errors 1-3 show up on launching the game, number 4 happens after loading into a world.

Things I tried and their results:

1.) Changing mod load order: No Effect 2.) Changing the library file for a different version: No Effect 3.) Disabling the shroud only (Change Made In-Game, no reload of game or world): New Error(?)

[Info :ChebsNecromancy] Read updated config values [Debug :Jotunn.Managers.SynchronizationManager] com.chebgonaz.ChebsNecromancy.cfg SpectralShroud (Server Synced) SpectralShroudAllowed true [Debug :Jotunn.Managers.SynchronizationManager] Gathering config values [Error :ChebsNecromancy] There was an issue loading your com.chebgonaz.ChebsNecromancy.cfg: System.NullReferenceException: Object reference not set to an instance of an object at ChebsValheimLibrary.Common.ChebsRecipe.UpdateRecipe (BepInEx.Configuration.ConfigEntry`1[T] craftingCost) [0x00024] in :0 at ChebsNecromancy.Structures.Phylactery.UpdateRecipe () [0x0000f] in <91ce218cb62b47ccbcbddcf30b99d01c>:0 at ChebsNecromancy.BasePlugin.ReadConfigValues (System.Object sender, System.IO.FileSystemEventArgs e) [0x0008c] in <91ce218cb62b47ccbcbddcf30b99d01c>:0 [Error :ChebsNecromancy] Please check your config entries for spelling and format! [Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: ChebsNecromancy.Items.Armor.Player.SpectralShroud.GuardianWraithStuff () (at <91ce218cb62b47ccbcbddcf30b99d01c>:0) ChebsNecromancy.Items.Armor.Player.SpectralShroud.DoOnUpdate () (at <91ce218cb62b47ccbcbddcf30b99d01c>:0) ChebsNecromancy.BasePlugin.Update () (at <91ce218cb62b47ccbcbddcf30b99d01c>:0)

4.) Shroud Enabled, Wraith Spawn Disabled (Change Made In-Game, no reload of game or world): New Error (No longer spamming)

[Info :ChebsNecromancy] Read updated config values [Debug :Jotunn.Managers.SynchronizationManager] com.chebgonaz.ChebsNecromancy.cfg SpectralShroud (Server Synced) SpectralShroudSpawnWraith false [Debug :Jotunn.Managers.SynchronizationManager] Gathering config values [Error :ChebsNecromancy] There was an issue loading your com.chebgonaz.ChebsNecromancy.cfg: System.NullReferenceException: Object reference not set to an instance of an object at ChebsValheimLibrary.Common.ChebsRecipe.UpdateRecipe (BepInEx.Configuration.ConfigEntry`1[T] craftingCost) [0x00024] in :0 at ChebsNecromancy.Structures.Phylactery.UpdateRecipe () [0x0000f] in <91ce218cb62b47ccbcbddcf30b99d01c>:0 at ChebsNecromancy.BasePlugin.ReadConfigValues (System.Object sender, System.IO.FileSystemEventArgs e) [0x0008c] in <91ce218cb62b47ccbcbddcf30b99d01c>:0 [Error :ChebsNecromancy] Please check your config entries for spelling and format!

5.) Manipulated the Radeon and Shroud Smoke FX Settings: No Effect (on the error, the settings worked as intended)

Expected behaviour (if applicable)

The mod shouldn't throw that many errors? I am not even sure what features of any of your mods work properly or not because I am experiencing major lag when items are added or removed from my inventory. This lag makes it very difficult for me to test much further. I suspect that this has to do with the console overloading somehow, but I am not well versed in any of this stuff.

Screenshots (if applicable)

N/A

jpw1991 commented 11 months ago

Thanks for opening the issue. I'm on the road at the moment so can't properly analyze everything but there are a few I can comment on without taking a deep look:

  1. The warning about the Cheb's Valheim Library version is usually benign. It just means the mod expects a different version of it. Solution: put mods into subfolders eg. BepInEx/plugins/ChebsNecromancy and then whatever library is included with rte mod gets used, even if it is older, and the warning should go
  2. ChebsValheimLibrary.Minions.AI.WoodcutterAI.UpdateDelay error is probably from the Cheb's Valheim Library version mismatch

Please try subfolders like I mentioned (I assume you're manually installing)

Fallenare commented 11 months ago

I greatly appreciate your expeditious reply! I am using Vortex to install mods but it keeps dumping them into the BepInEx/plugins folder without generating its own subfolders. I don't know how to configure Vortex to do that, so I manually installed all the files (including the translation folder?) for all 4 mods into their own subfolders. I pasted the results below with the relevant error message, but will also upload the full log file from the most recent launch. Thank you for taking time out of your day to look into this!

Log File: LogOutput.log (config is the default/the same as the file in the original post)

Results:

1.) The original error is fixed and most of the warnings are gone 2.) The shroud item, particle FX, and summon wraith ability are all working 3.) Now version flag only shows for Necromancy (expects 2.2.0 but has 2.1.2) and Thrown Weapons (expects 2.1.1 but has 2.1.2) 4.) A new error message is spamming my console

[Error : Unity Log] MissingFieldException: Field 'HitData.m_statusEffect' not found. Stack trace: (wrapper dynamic-method) Character.DMD(Character,long,HitData) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Delegate.DynamicInvokeImpl (System.Object[] args) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Delegate.DynamicInvoke (System.Object[] args) (at <695d1cc93cca45069c528c15c9fdd749>:0) RoutedMethod`1[T].Invoke (System.Int64 rpc, ZPackage pkg) (at <2959d3c128e64c61a08dcc9bb6744ec3>:0) ZNetView.HandleRoutedRPC (ZRoutedRpc+RoutedRPCData rpcData) (at <2959d3c128e64c61a08dcc9bb6744ec3>:0) ZRoutedRpc.HandleRoutedRPC (ZRoutedRpc+RoutedRPCData data) (at <2959d3c128e64c61a08dcc9bb6744ec3>:0) ZRoutedRpc.InvokeRoutedRPC (System.Int64 targetPeerID, ZDOID targetZDO, System.String methodName, System.Object[] parameters) (at <2959d3c128e64c61a08dcc9bb6744ec3>:0) ZNetView.InvokeRPC (System.String method, System.Object[] parameters) (at <2959d3c128e64c61a08dcc9bb6744ec3>:0) (wrapper dynamic-method) Character.DMD(Character,HitData) (wrapper dynamic-method) Attack.DMD(Attack) (wrapper dynamic-method) Attack.DMD(Attack) Humanoid.OnAttackTrigger () (at <2959d3c128e64c61a08dcc9bb6744ec3>:0) CharacterAnimEvent.Hit () (at <2959d3c128e64c61a08dcc9bb6744ec3>:0)

Fallenare commented 11 months ago

After reading your reply again and comparing the results from before and after the change you suggested, I realized that the game will probably only look for 1 version of your library. Having the library version that is packaged with each in their respective subfolders is probably causing the first one that loads to be kept and the rest ignored. I tried removing all versions other than the 2.2.0 version and placing it in the plugins directory.

Latest Log File:

LogOutput.log

Results:

1.) The Mercenaries error about the woodcutterAI is back due to the version mismatch with the libraries (wants 2.1.2 has 2.2.0) 2.) The HitData error makes player and NPCs invincible because the error flags any time damage is calculated and does nothing

This is as far as I can make it on my own so I will happily wait until you become available to discuss in greater detail.

Safe travels!

[Error : Unity Log] MissingFieldException: Field 'HitData.m_statusEffect' not found. Stack trace: (wrapper dynamic-method) Character.DMD(Character,long,HitData) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Delegate.DynamicInvokeImpl (System.Object[] args) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.Delegate.DynamicInvoke (System.Object[] args) (at <695d1cc93cca45069c528c15c9fdd749>:0) RoutedMethod`1[T].Invoke (System.Int64 rpc, ZPackage pkg) (at <2959d3c128e64c61a08dcc9bb6744ec3>:0) ZNetView.HandleRoutedRPC (ZRoutedRpc+RoutedRPCData rpcData) (at <2959d3c128e64c61a08dcc9bb6744ec3>:0) ZRoutedRpc.HandleRoutedRPC (ZRoutedRpc+RoutedRPCData data) (at <2959d3c128e64c61a08dcc9bb6744ec3>:0) ZRoutedRpc.InvokeRoutedRPC (System.Int64 targetPeerID, ZDOID targetZDO, System.String methodName, System.Object[] parameters) (at <2959d3c128e64c61a08dcc9bb6744ec3>:0) ZNetView.InvokeRPC (System.String method, System.Object[] parameters) (at <2959d3c128e64c61a08dcc9bb6744ec3>:0) (wrapper dynamic-method) Character.DMD(Character,HitData) (wrapper dynamic-method) Attack.DMD(Attack) (wrapper dynamic-method) Attack.DMD(Attack) Humanoid.OnAttackTrigger () (at <2959d3c128e64c61a08dcc9bb6744ec3>:0) CharacterAnimEvent.Hit () (at <2959d3c128e64c61a08dcc9bb6744ec3>:0)

jpw1991 commented 11 months ago

I won't be able to take a proper look until the weekend or next week. But for now make sure you're using the newest library version and it should work (install Cheb's Necromancy last). I run all my mods all the time during testing so it all should work

Fallenare commented 11 months ago

Looks like it may have been a Vortex issue. After digging through all my mod files I noticed that there were leftover files from an outdated mod I had removed earlier in the day that were causing the hit errors. I consider this issue resolved but I don't know if I am supposed to close it myself. Thank you again for your help!

jpw1991 commented 11 months ago

No worries. I'm glad you got it working. Have fun