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

Error on saving blueprint when using ModOrganizer #71

Open kyoma opened 1 year ago

kyoma commented 1 year ago

There is an error when trying to save blueprints It occurs even when I have only PlanBuild (and dependencies) installed. When I install them all manually everything works but when I then try to launch Valheim through ModOrganizer (without any actual mods loaded) it produces an error when trying to save a blueprint. It still creates the ".blueprint" file but fails for the ".png" file. After a restart the blueprint is properly recognized, just without a thumbnail.

[Error  : Unity Log] IOException: Cannot create a file that already exist.
Stack trace:
System.IO.File.Move (System.String sourceFileName, System.String destFileName) (at <695d1cc93cca45069c528c15c9fdd749>:0)
PlanBuild.Blueprints.Blueprint.ToFile () (at <a75558544c2f4cd690069f4e49564141>:0)
PlanBuild.Blueprints.SelectionTools.Save (PlanBuild.Blueprints.Selection selection, System.String name, System.String category, System.String description, System.Boolean captureCurrentSnapPoints, System.Boolean keepMarkers) (at <a75558544c2f4cd690069f4e49564141>:0)
PlanBuild.Blueprints.SelectionTools+<>c__DisplayClass4_0.<SaveWithGUI>b__0 (System.String name, System.String category, System.String description) (at <a75558544c2f4cd690069f4e49564141>:0)
PlanBuild.Blueprints.SelectionSaveGUI.OnOk () (at <a75558544c2f4cd690069f4e49564141>:0)
PlanBuild.Blueprints.SelectionSaveGUI.<Register>b__18_0 () (at <a75558544c2f4cd690069f4e49564141>:0)
UnityEngine.Events.InvokableCall.Invoke () (at <80fe1a4e36fe44618284312cb721a597>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <80fe1a4e36fe44618284312cb721a597>:0)
UnityEngine.UI.Button.Press () (at <e97aac8d17514bea83fadfd039e9187a>:0)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at <e97aac8d17514bea83fadfd039e9187a>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <e97aac8d17514bea83fadfd039e9187a>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <e97aac8d17514bea83fadfd039e9187a>:0)
UnityEngine.EventSystems.EventSystem:Update()

I have tried setting the blueprint directory to a fixed folder outside of the Valheim directory but it didn't seem to matter.

Also, since it fails somewhere along the line the blueprint UI remains open and the new blueprint isn't in the list until I refresh them at a Standing Blueprint Rune. I can even create a thumbnail for it there without issues.

sea212 commented 1 week ago

Do you still experience this issue?