hollowstrawberry / PolyConverter

Converts Poly Bridge 2 Sandbox .layout files into .json and back, for easy editing
The Unlicense
2 stars 1 forks source link

Error converting .slot? #3

Open eparavizo opened 1 year ago

eparavizo commented 1 year ago

Hi there! I was trying to convert the auto save file (.slot) I got from the game, using the self contained executable (v1.4) and I've been getting this error:

[Fatal Error] Couldn't convert "Lowest Budget (No Breaks).slot":
 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.InvalidOperationException: Invalid binary data stream: could not parse peeked BinaryEntryType byte '0' into a known entry type.
   at Sirenix.Serialization.BinaryDataReader.PeekEntry(String& name)
   at Sirenix.Serialization.BinaryDataReader.ExitNode()
   at Sirenix.Serialization.ComplexTypeSerializer`1.ReadValue(IDataReader reader)
   at Sirenix.Serialization.SerializationUtility.DeserializeValue[T](IDataReader reader)
   at Sirenix.Serialization.SerializationUtility.DeserializeValue[T](Stream stream, DataFormat format, DeserializationContext context)
   at Sirenix.Serialization.SerializationUtility.DeserializeValue[T](Byte[] bytes, DataFormat format, DeserializationContext context)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at PolyConverter.PolyConverter.InnerSlotToJson(String slotPath, String jsonPath)
   at PolyConverter.PolyConverter.SlotToJson(Strin
[ErrorPolyCOnventer_SelfContained.txt](https://github.com/orchidalloy/PolyConverter/files/10117530/ErrorPolyCOnventer_SelfContained.txt)
g slotPath, String jsonPath)///
[>] Done.

I don't really know c#, so I'm really out of my depth - do you have any ideas or pointers on how could I try to fix it?

Thanks!!

hollowstrawberry commented 1 year ago

It might just be that the converter is outdated, it might be as simple as compiling it again targeting the newest game version, or it might need a rewrite

eparavizo commented 1 year ago

Ah cool, thanks for the quick reply! Can you point me to the file/variables that I should update to recompile it? I was looking at the files but I'm kinda lost :(

hollowstrawberry commented 1 year ago

I opened the project and it seems it should load the latest game version automatically. So it must be a compatibility issue with the latest version. I'll take a look at the game files to see if anything changed.

hollowstrawberry commented 1 year ago

I don't know how to fix it, it all seems correct compared to my reverse engineered code. Maybe ask in the poly bridge 2 modding server.

eparavizo commented 1 year ago

Thank you so much for looking into this! I'll try to see if they have any other ideas on the mod server. Thanks!