sirskunkalot / PlanBuild

Valheim mod enabling you to plan buildings, copy structures and terraform
Do What The F*ck You Want To Public License
8 stars 13 forks source link

Planbuild v0.13.0 errors with latest valheim patch (mistlands) #57

Closed himpich closed 1 year ago

himpich commented 1 year ago

Using v0.13.0 I get errors if I take the normal build hammer in my hand and open the build menu via right-click:

If I disable planbuild, everything is fine. I disabled all mods and just enabled planbuild with it's dependencies: same error

error in short:

System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <695d1cc93cca45069c528c15c9fdd749>:0)
Player.GetAvailableBuildPiecesInCategory (Piece+PieceCategory cat) (at <035307060cbb4b30b916cd82ebd80490>:0)
(wrapper dynamic-method) Hud.DMD<Hud::UpdateBuild>(Hud,Player,bool)
(wrapper dynamic-method) Hud.DMD<Hud::TogglePieceSelection>(Hud)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<Hud::TogglePieceSelection>?187285504(Hud)
PlanBuild.Blueprints.BlueprintManager.Hud_TogglePieceSelection (On.Hud+orig_TogglePieceSelection orig, Hud self) (at <7c23de4df02740f6b3263f9f9c4f3a9d>:0)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Hook<Hud::TogglePieceSelection>?-505207936(Hud)
Player.UpdateBuildGuiInput () (at <035307060cbb4b30b916cd82ebd80490>:0)
(wrapper dynamic-method) Player.DMD<Player::UpdatePlacement>(Player,bool,single)
(wrapper dynamic-method) Player.DMD<Player::Update>(Player)
[Message:   BepInEx] BepInEx 5.4.19.0 - valheim (30.06.2022 16:26:10)
[Info   :   BepInEx] Running under Unity v2020.3.33.9525882
[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.19.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   :HookGenPatcher] Previous MMHOOK location found. Using that location to save instead.
[Info   :HookGenPatcher] Already ran for this version, reusing that file.
[Info   :HookGenPatcher] Previous MMHOOK location found. Using that location to save instead.
[Info   :HookGenPatcher] Already ran for this version, reusing that file.
[Info   :HookGenPatcher] Previous MMHOOK location found. Using that location to save instead.
[Info   :HookGenPatcher] Already ran for this version, reusing that file.
[Info   :HookGenPatcher] Previous MMHOOK location found. Using that location to save instead.
[Info   :HookGenPatcher] Already ran for this version, reusing that file.
[Info   :HookGenPatcher] Previous MMHOOK location found. Using that location to save instead.
[Info   :HookGenPatcher] Already ran for this version, reusing that file.
[Info   :HookGenPatcher] Previous MMHOOK location found. Using that location to save instead.
[Info   :HookGenPatcher] Already ran for this version, reusing that file.
[Info   :HookGenPatcher] Previous MMHOOK location found. Using that location to save instead.
[Info   :HookGenPatcher] Already ran for this version, reusing that file.
[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] 21 plugins to load
[Info   :   BepInEx] Loading [PlantEverything 1.12.0]
[Info   :   BepInEx] Loading [Building Repair 0.1.1]
[Warning:  HarmonyX] AccessTools.DeclaredMethod: Could not find method for type Console and name InputText and parameters
[Warning:  HarmonyX] Unknown patch - Could not find method InputText with 0 parameters in type Console, but it was found in base class of this type Terminal
[Info   :   BepInEx] Loading [Clock Mod 1.5.0]
[Info   :   BepInEx] Loading [Map Teleport 0.5.0]
[Info   :   BepInEx] Loading [Terrain Reset 0.7.0]
[Info   :   BepInEx] Loading [Configuration Manager 17.0]
[Info   :   BepInEx] Loading [Jotunn 2.10.0]
[Info   :    Jotunn] Initializing LocalizationManager
[Info   :    Jotunn] Initializing CommandManager
[Info   :    Jotunn] Initializing InputManager
[Info   :    Jotunn] Initializing SkillManager
[Info   :    Jotunn] Initializing PrefabManager
[Info   :    Jotunn] Initializing ItemManager
[Info   :    Jotunn] Initializing PieceManager
[Info   :    Jotunn] Initializing CreatureManager
[Info   :    Jotunn] Initializing ZoneManager
[Info   :    Jotunn] Initializing MockManager
[Info   :    Jotunn] Initializing KitbashManager
[Info   :    Jotunn] Initializing GUIManager
[Info   :    Jotunn] Initializing KeyHintManager
[Info   :    Jotunn] Initializing NetworkManager
[Info   :    Jotunn] Initializing SynchronizationManager
[Info   :    Jotunn] Initializing RenderManager
[Info   :    Jotunn] Initializing MinimapManager
[Info   :    Jotunn] Initializing UndoManager
[Info   :    Jotunn] Jötunn v2.10.0 loaded successfully
[Info   :   BepInEx] Loading [Use Equipment in Water 0.2.3]
[Info   :   BepInEx] Loading [ContentsWithin 2.0.2]
[Info   :   BepInEx] Loading [Easy Spawner 1.6.0]
[Info   : Unity Log] Easy spawner: Easy spawner loaded plugin
[Info   :   BepInEx] Loading [Gizmo Reloaded 1.1.2]
[Info   :   BepInEx] Loading [Server Devcommands 1.38]
[Info   :   BepInEx] Loading [World Edit Commands 1.20]
[Info   :   BepInEx] Loading [Infinity Hammer 1.28]
[Info   :Infinity Hammer] Reloading 17 command data.
[Info   :   BepInEx] Loading [Build Camera 1.6.1]
[Info   :   BepInEx] Loading [PlanBuild 0.13.0]
[Info   :PlanBuild.Blueprints.BlueprintManager] Initializing BlueprintManager
[Info   :PlanBuild.Blueprints.BlueprintSync] Loading known blueprints
[Info   :PlanBuild.Plans.PlanManager] Initializing PlanManager
[Info   :PlanBuild.Patches] Applying BuildCamera patches
[Info   :   BepInEx] Loading [FuelEternal 1.1.0]
[Info   :   BepInEx] Loading [Quick Stack 0.6.5]
[Info   :Quick Stack] Initializing Quick Stack.
[Info   :   BepInEx] Loading [Display BepInEx Info In-Game 2.0.0]
[Info   :   BepInEx] Loading [AnyPortal 1.0.4]
[Info   : Unity Log] AnyPortal loaded succesfully.
[Info   :   BepInEx] Loading [AutoRepair 5.4.1600]
[Message:   BepInEx] Chainloader startup complete
[Info   :Server Devcommands] "GizmoReloaded" detected. Patching "HandleAxisInput" for mouse wheel binding.
[Info   : Unity Log] 12/07/2022 20:35:18: Starting to load scene:start

[Warning: Unity Log] Only custom filters can be played. Please add a custom filter or an audioclip to the audiosource (Amb_MainMenu).
[Info   : Unity Log] 12/07/2022 20:35:21: Using environment steamid 892970

[Info   : Unity Log] 12/07/2022 20:35:21: Using steam APPID:892970

Setting breakpad minidump AppID = 892970
SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  76561197960275926 [API loaded no]
[Info   : Unity Log] 12/07/2022 20:35:21: Authentication:k_ESteamNetworkingAvailability_Attempting

[Info   : Unity Log] 12/07/2022 20:35:21: Steam initialized, persona:Godmin

[Info   : Unity Log] 12/07/2022 20:35:21: PlayFab custom ID set to "Steam_76561197960275926"

[Info   : Unity Log] 12/07/2022 20:35:21: Using default prefs

[Info   : Unity Log] 12/07/2022 20:35:21: Valheim version:0.212.7

[Info   : Unity Log] 12/07/2022 20:35:21: Worldgenerator version setup:2

[Info   :Jotunn.Managers.CommandManager] Adding 20 commands to the Console
[Info   : Unity Log] 12/07/2022 20:35:21: Render threading mode:MultiThreaded

[Warning: Unity Log] 12/07/2022 20:35:21: Missing audio clip in music respawn

[Info   : Unity Log] 12/07/2022 20:35:21: Checking for installed DLCs

[Info   : Unity Log] 12/07/2022 20:35:21: DLC:beta installed:False

[Info   :Jotunn.Managers.InputManager] Registering 5 custom inputs
[Info   : Unity Log] 12/07/2022 20:35:21: Loaded localization CSV:localization language:English

[Info   : Unity Log] 12/07/2022 20:35:21: Loaded localization CSV:localization_extra language:English

[Info   : Unity Log] 12/07/2022 20:35:22: Loaded localization CSV:localization language:German

[Info   : Unity Log] 12/07/2022 20:35:22: Loaded localization CSV:localization_extra language:German

[Info   :Jotunn.Managers.LocalizationManager] Loading custom localizations
[Info   : Unity Log] 12/07/2022 20:35:22: Loaded localization CSV:localization language:English

[Info   : Unity Log] 12/07/2022 20:35:22: Loaded localization CSV:localization_extra language:English

[Info   :Jotunn.Managers.LocalizationManager] Adding tokens for language 'English'
[Info   : Unity Log] 12/07/2022 20:35:22: Loaded localization CSV:localization language:German

[Info   : Unity Log] 12/07/2022 20:35:22: Loaded localization CSV:localization_extra language:German

[Info   :Jotunn.Managers.LocalizationManager] Adding tokens for language 'German'
[Info   :Jotunn.Managers.KitbashManager] Applying Kitbash in 1 objects
[Info   :Jotunn.Managers.ItemManager] Adding 3 custom items to the ObjectDB
[Info   : Unity Log] 12/07/2022 20:35:22: Session auth respons callback

[Info   : Unity Log] 12/07/2022 20:35:22: Ticket is System.Byte[] of length 369

[Info   : Unity Log] 12/07/2022 20:35:22: Starting music menu

[Info   : Unity Log] 12/07/2022 20:35:22: UI Group status changed Menu = True

[Info   :Server Devcommands] Reloading 11 alias data.
[Info   : Unity Log] 12/07/2022 20:35:23: PlayFab logged in as "Steam_76561197960275926"

[Info   : Unity Log] 12/07/2022 20:35:23: PlayFab local entity ID is 47A6513FE999E5FA

[Info   : Unity Log] 12/07/2022 20:35:24: UI Group status changed Menu = True

[Info   : Unity Log] 12/07/2022 20:35:26: FOund selected Start game

[Info   : Unity Log] 12/07/2022 20:35:26: show character selection

[Info   : Unity Log] 12/07/2022 20:35:27: OnCharacterStart

[Info   : Unity Log] 12/07/2022 20:35:29: Loading main scene

[Info   : Unity Log] 12/07/2022 20:35:30: Steam initialized, persona:Godmin

[Info   : Unity Log] 12/07/2022 20:35:30: PlayFab custom ID set to "Steam_76561197960275926"

[Info   : Unity Log] 12/07/2022 20:35:30: Using default prefs

[Info   :Jotunn.Managers.CommandManager] Adding 20 commands to the Console
[Info   : Unity Log] 12/07/2022 20:35:30: Loading player profile farmer

[Info   : Unity Log] 12/07/2022 20:35:30: isModded: True

[Info   : Unity Log] 12/07/2022 20:35:30: Zonesystem Awake 408

[Info   : Unity Log] 12/07/2022 20:35:30: DungeonDB Awake 408

[Info   : Unity Log] 12/07/2022 20:35:30: Steam initialized, persona:Godmin

[Info   : Unity Log] 12/07/2022 20:35:30: Worldgenerator version setup:1

[Info   : Unity Log] Registered 'advize.PlantEverything ConfigSync' RPC - waiting for incoming connections
[Info   : Unity Log] getting fonts
[Info   : Unity Log] got font AveriaSerifLibre-Bold
[Info   :Jotunn.Managers.PrefabManager] Adding 26 custom prefabs to the ZNetScene
[Info   : Unity Log] 12/07/2022 20:35:31: Audioman already exist, destroying self

[Info   : Unity Log] 12/07/2022 20:35:31: Checking for installed DLCs

[Info   : Unity Log] 12/07/2022 20:35:31: DLC:beta installed:False

[Info   :Jotunn.Managers.ItemManager] Adding 3 custom items to the ObjectDB
[Info   :Jotunn.Managers.ItemManager] Adding 3 custom recipes to the ObjectDB
[Info   :Jotunn.Managers.PieceManager] Adding 14 custom pieces to the PieceTables
[Info   :Server Devcommands] Reloading 34 bind data.
[Info   :Jotunn.Managers.NetworkManager] Registering 5 custom RPCs
[Info   : Unity Log] 12/07/2022 20:35:37: Zonesystem Start 408

[Info   : Unity Log] 12/07/2022 20:35:37: Added 3 locations, 0 vegetations, 0 environments, 0 biome env-setups, 0 clutter  from locations_cp1

[Info   : Unity Log] 12/07/2022 20:35:37: Added 1 locations, 0 vegetations, 1 environments, 0 biome env-setups, 0 clutter  from locations_mountaincaves

[Info   : Unity Log] 12/07/2022 20:35:37: Added 27 locations, 25 vegetations, 5 environments, 1 biome env-setups, 3 clutter  from locations_mistlands

[Info   : Unity Log] 12/07/2022 20:35:38: DungeonDB Start 408

[Info   : Unity Log] Easy spawner: Easy spawner loading assets
[Info   : Unity Log] Easy spawner: menu asset bundle loaded
[Info   : Unity Log] Easy spawner: Easy spawner loaded assets
[Info   : Unity Log] Easy spawner: load favourite Items from file: C:\Users\Anwender\AppData\Roaming\r2modmanPlus-local\Valheim\profiles\Godmins Building Modpack\BepInEx\config\cooley.easyspawner.favouriteItems.txt
[Warning:PlanBuild.Plans.PlanDB] Warning for mod developers:
Multiple pieces with the same m_name but different resource requirements, this will cause issues with Player.m_knownRecipes!
Piece.m_name: $piece_yuleklapp
 Requirements: $item_finewood:2, $item_bonefragments:1
 Pieces: piece_gift1

 Requirements: $item_finewood:3, $item_dandelion:1
 Pieces: piece_gift2

 Requirements: $item_finewood:4, $item_raspberries:1
 Pieces: piece_gift3

[Info   : Unity Log] 12/07/2022 20:35:38: ZRpc timeout set to 30s

[Info   : Unity Log] 12/07/2022 20:35:38: Load world: Raftheim (Raftheim)

[Info   : Unity Log] 12/07/2022 20:35:38: Loading 204454 zdos , my id 702231505 data version:29

[Info   : Unity Log] 12/07/2022 20:35:38: Loaded 100000 dead zdos

[Info   : Unity Log] 12/07/2022 20:35:38: Removed 0 OLD generated ZDOS

[Info   : Unity Log] 12/07/2022 20:35:38: Loaded 9924 locations

[Info   : Unity Log] 12/07/2022 20:35:39: Starting respawn

[Info   : Unity Log] 12/07/2022 20:35:39: Session auth respons callback

[Info   : Unity Log] 12/07/2022 20:35:44: Unpacking compressed mapdata 8225

[Info   : Unity Log] 12/07/2022 20:35:44: tip:$loadscreen_tip08

[Info   :Server Devcommands] Reloading 34 bind data.
[Info   : Unity Log] 12/07/2022 20:35:48: Done fading color

[Info   : Unity Log] 12/07/2022 20:35:48: Done fading color

[Info   : Unity Log] 12/07/2022 20:35:52: Spawned after 8,019994

[Info   :PlanBuild.Blueprints.BlueprintManager] Registering known blueprints
[Info   : Unity Log] 12/07/2022 20:35:53: Minimap: Adding unique location (-67.0, 34.4, -256.9)

[Info   : Unity Log] 12/07/2022 20:35:54: Starting music meadows

[Info   : Unity Log] 12/07/2022 20:35:54: Resumed music meadows at 0

[Error  : Unity Log] ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Stack trace:
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <695d1cc93cca45069c528c15c9fdd749>:0)
Player.GetAvailableBuildPiecesInCategory (Piece+PieceCategory cat) (at <035307060cbb4b30b916cd82ebd80490>:0)
(wrapper dynamic-method) Hud.DMD<Hud::UpdateBuild>(Hud,Player,bool)
(wrapper dynamic-method) Hud.DMD<Hud::TogglePieceSelection>(Hud)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<Hud::TogglePieceSelection>?187285504(Hud)
PlanBuild.Blueprints.BlueprintManager.Hud_TogglePieceSelection (On.Hud+orig_TogglePieceSelection orig, Hud self) (at <7c23de4df02740f6b3263f9f9c4f3a9d>:0)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Hook<Hud::TogglePieceSelection>?-505207936(Hud)
Player.UpdateBuildGuiInput () (at <035307060cbb4b30b916cd82ebd80490>:0)
(wrapper dynamic-method) Player.DMD<Player::UpdatePlacement>(Player,bool,single)
(wrapper dynamic-method) Player.DMD<Player::Update>(Player)

[Error  : Unity Log] ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Stack trace:
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <695d1cc93cca45069c528c15c9fdd749>:0)
Player.GetAvailableBuildPiecesInCategory (Piece+PieceCategory cat) (at <035307060cbb4b30b916cd82ebd80490>:0)
(wrapper dynamic-method) Hud.DMD<Hud::UpdateBuild>(Hud,Player,bool)
Hud.Update () (at <035307060cbb4b30b916cd82ebd80490>:0)
sirskunkalot commented 1 year ago

Can't reproduce unfortunately. Works fine for me with mistlands. Any particular action you are doing when this happens?

himpich commented 1 year ago

I just used my normal hammer to open the build menu and went with the mouse over the items.

I cannot reproduce this anymore. Maybe a small client update fixed it? Sorry for your trouble!

(I had the problem even with a r2modman profile only containing PlanBuild (and bepinex, HookGenPatcher + Jotunn as dependencies) but it is now gone, without any mod updates.