sirskunkalot / PlanBuild

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

Planbuild not working with latest ValheimRAFT (v1.4.2 - v1.4.4) #59

Closed himpich closed 1 year ago

himpich commented 1 year ago

There was a mistlands update for valheimRaft and this breaks planbuild. I can place a blueprint but when I want to build it, I get the following error:

[Error  : Unity Log] MissingMethodException: void ValheimRAFT.MoveableBaseRootComponent.AddNewPiece(Piece)
Stack trace:
(wrapper dynamic-method) PlanBuild.Plans.PlanPiece.DMD<PlanBuild.Plans.PlanPiece::OnPieceReplaced>(UnityEngine.GameObject,UnityEngine.GameObject)
PlanBuild.Plans.PlanPiece.SpawnPiece (UnityEngine.GameObject originatingObject, System.Int64 creatorID, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation, UnityEngine.GameObject prefab, System.String additionalInfo) (at <7c23de4df02740f6b3263f9f9c4f3a9d>:0)
PlanBuild.Plans.PlanPiece.RPC_SpawnPieceAndDestroy (System.Int64 sender, System.Int64 creatorID) (at <7c23de4df02740f6b3263f9f9c4f3a9d>:0)
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 <35c0f7aa1999477788815a7bf78200d7>:0)
ZNetView.HandleRoutedRPC (ZRoutedRpc+RoutedRPCData rpcData) (at <35c0f7aa1999477788815a7bf78200d7>:0)
ZRoutedRpc.HandleRoutedRPC (ZRoutedRpc+RoutedRPCData data) (at <35c0f7aa1999477788815a7bf78200d7>:0)
ZRoutedRpc.InvokeRoutedRPC (System.Int64 targetPeerID, ZDOID targetZDO, System.String methodName, System.Object[] parameters) (at <35c0f7aa1999477788815a7bf78200d7>:0)
ZNetView.InvokeRPC (System.String method, System.Object[] parameters) (at <35c0f7aa1999477788815a7bf78200d7>:0)
PlanBuild.Plans.PlanPiece.Build (System.Int64 playerID) (at <7c23de4df02740f6b3263f9f9c4f3a9d>:0)
PlanBuild.Plans.PlanPiece.Interact (Humanoid user, System.Boolean hold, System.Boolean alt) (at <7c23de4df02740f6b3263f9f9c4f3a9d>:0)
(wrapper dynamic-method) Player.DMD<Player::Interact>(Player,UnityEngine.GameObject,bool,bool)
(wrapper dynamic-method) Player.DMD<Player::Update>(Player)

This happens regardless of an existing raft or not.

I also reported the bug on nexusmod for valheimRAFT: https://www.nexusmods.com/valheim/mods/1136/?tab=bugs

Regards

himpich commented 1 year ago

ValheimRaft got an update:

Hmm, I see, that mod called a method that I changed. I'll add the method back in the next patch for compatibility with that mod.
himpich commented 1 year ago

closed as valheimRAFT 1.4.5 re-implemented the missing method