cheahjs / palworld-save-tools

Tools for converting Palworld .sav files to JSON and back
MIT License
798 stars 71 forks source link

Cannot convert Level.sav #124

Open ShadyGame opened 9 months ago

ShadyGame commented 9 months ago

So i had this cheater ruining my server, destroying palboxes from everybody. he even created a new guild where some pals from my server members were all mixed there.

I banned him, and backed up my level.sav and all player data, he cameback and did all again..

I tried to restore my files but when someone joins the server the level.sav resets and we have to start over.

I tried to decompress level.sav to json but i get an error

PS C:\Users\x\Downloads\Compressed\palworld-save-tools-windows-v0.17.1> python convert.py Level.sav
Converting Level.sav to JSON, saving to Level.sav.json
Decompressing sav file
Traceback (most recent call last):
  File "C:\Users\x\Downloads\Compressed\palworld-save-tools-windows-v0.17.1\convert.py", line 140, in <module>
    main()
  File "C:\Users\x\Downloads\Compressed\palworld-save-tools-windows-v0.17.1\convert.py", line 64, in main
    convert_sav_to_json(
  File "C:\Users\x\Downloads\Compressed\palworld-save-tools-windows-v0.17.1\convert.py", line 92, in convert_sav_to_json
    raw_gvas, _ = decompress_sav_to_gvas(data)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\x\Downloads\Compressed\palworld-save-tools-windows-v0.17.1\palworld_save_tools\palsav.py", line 35, in decompress_sav_to_gvas
    uncompressed_data = zlib.decompress(data[12:])
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
zlib.error: Error -3 while decompressing data: invalid code lengths set

any hope in recovering this? too many hours invested

Elyx0 commented 9 months ago

Same issue now, worked before

tonyHALO117 commented 9 months ago

my sav file also came back with a likely corrupted exception, is there anything that can be done to fix it?

jeanibarz commented 6 months ago

I had the same issue. I was able to fix the issue by upgrading palworld-save-tools from 0.17.1* to 0.22.0.

I figured it was unlikely to be a corrupted save because the problem was identical for my local save and the save of my dedicated server.

*it is the version currently indicated in the README here