hytonhan / Timberborn-SimpleFloodgateTriggers

MIT License
1 stars 3 forks source link

Crash on Experimental Branch #4

Closed alerum68 closed 2 years ago

alerum68 commented 2 years ago

Running the 21-07-2022 version of the experimental branch, and game crashes with the error below. Running normal mode, lightly modded. One stream gauge attached to 3 flood gates next to each other, but set to shut off at various lengths. Attaching a copy of the save file as well.

v0.2.2.1-b44bdea-xsw
ArgumentException: Can't serialize Hytone.Timberborn.Plugins.Floodgates.EntityAction.StreamGaugeFloodgateLink of type Hytone.Timberborn.Plugins.Floodgates.EntityAction.StreamGaugeFloodgateLink
Timberborn.WorldSerialization.PrimitiveTypeSerialization.Serialize (System.Object value) (at <aee47ec7978a4ebfb965970708fbaa52>:0)
Timberborn.WorldSerialization.ObjectSave.SetArray[T] (System.String name, T[] values) (at <aee47ec7978a4ebfb965970708fbaa52>:0)
Timberborn.Persistence.ObjectSaver.Set[T] (Timberborn.Persistence.ListKey`1[T] key, System.Collections.Generic.IReadOnlyCollection`1[T] values) (at <81093724205945d2bcf38adc918217d8>:0)
Hytone.Timberborn.Plugins.Floodgates.EntityAction.FloodgateTriggerMonoBehaviour.Save (Timberborn.Persistence.IEntitySaver entitySaver) (at <3a11c115c1b642cb8e72e426f63505d6>:0)
Timberborn.Persistence.WorldSaveFactory.SaveEntity (UnityEngine.GameObject gameObject, Timberborn.WorldSerialization.EntitySave output) (at <81093724205945d2bcf38adc918217d8>:0)
Timberborn.Persistence.WorldSaveFactory.SaveEntities (Timberborn.WorldSerialization.WorldSave worldSave) (at <81093724205945d2bcf38adc918217d8>:0)
Timberborn.Persistence.WorldSaveFactory.Create () (at <81093724205945d2bcf38adc918217d8>:0)
Timberborn.GameSaveRuntimeSystem.GameSaver.Save (Timberborn.GameSaveRepositorySystem.SaveReference saveReference, System.Boolean skipNameValidation) (at <fb74d2ff515d408a84b82347789206b3>:0)
Timberborn.GameSaveRuntimeSystem.GameSaver.SaveSkippingNameValidation (Timberborn.GameSaveRepositorySystem.SaveReference saveReference) (at <fb74d2ff515d408a84b82347789206b3>:0)
Timberborn.Autosaving.Autosaver.Save () (at <f8c572698f6a4f4180c2f26eaafcbd64>:0)
Timberborn.Autosaving.Autosaver.Update () (at <f8c572698f6a4f4180c2f26eaafcbd64>:0)

Timberborn_ExperimentalSaves_Alhambra_2022-08-01 11h49m, Day 26-4.autosave.zip

hytonhan commented 2 years ago

Hey! This is a known issue. There are breaking changes between stable and experimental on the gamesave system, which causes FloodgateMod to crash when the game saves if there are existing link between floodgates and streamgauges. I will fix this when expeerimental hits stable. Unfortunately that also means that in experimental only the drought/schedule settings will work. Sorry for the inconvinience!