-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tipps & Hints for a rewrite :) #78
Comments
Yeah you're correct the save file is CLZF compressed, then it's json for some part, until If you're familiar with typescript, I have also set up working deserialization/serialization in ts, here: tldParser.ts, ObjectParser.ts. But I'm not really planning on working on that anymore, already did the interesting part of it, just can't bother to make the UI 😄 Let me know if you have any problems or questions! |
Oh and at least in one point the profile file was invalid json, which is why I do this when deserializing and this when serializing the file. As for the stuff in Serialization folder it's all pretty much for being able to deserialize/serialize stuff without losing any fields I don't know about. Previously I was having the problem that I had to hardcode every single field in the game save and after update the editor would lose all the new fields it didn't know about. You'll probably run into the same issue unless you use some kind of fully dynamic serialize/deserialize (which I didn't want to do, since I wanted types for the save file). |
Hi Fin, With your tips on hand, Ill try to make the deserialization work today and the days after and will start to implement from there on. Thanks a lot again and if you really dont mind, I would like to contact you again when I need some council here and there? |
Hi once again Fin,
EDIT: |
That's what you should do, convert it to binary assuming that every value in the array is one byte. After that decompress it with CLZF and it'll be json. The save format doesn't make sense for sure, but it is what it is 😄 I remember once making an experiment where I removed all of this nested serialization and ended up shaving ~80% of the save size off without losing any data.
I don't mind. You can also contact me on discord if you wish (FINDarkside#1337), but github is fine as well.
You too :) E: Ok I see you solved it, but I'll send this anyway since I wrote it already. |
Hello Fin,
I thought about rewriting your tool in java (thats my native language) and took a look over your fantastic project.
As I dig a bit into the TLD save files and compared to your code, a it was clear here no clear json was used and b you went to decode the save file form CLZF, is that correct?
I started fiddling around a bit with CLZF and the save and could not make out any success there.
Can you give me a hint where to start the journey the best?
Kind regards!
The text was updated successfully, but these errors were encountered: