Skip to content

Instantly share code, notes, and snippets.

@cheahjs
Last active January 16, 2025 00:15
Show Gist options
  • Save cheahjs/300239464dd84fe6902893b6b9250fd0 to your computer and use it in GitHub Desktop.
Save cheahjs/300239464dd84fe6902893b6b9250fd0 to your computer and use it in GitHub Desktop.
Converting PalWorld saves to JSON and back
@ShadyGame
Copy link

Got an error when trying to convert from sav to json.

Converting .sav files in ...\4790F9AF9E344A9987A3DE28B3762C72 to JSON (using uesave.exe)
Traceback (most recent call last):
File "...\convert-to-json.py", line 94, in
main()
File "...\convert-to-json.py", line 57, in main
uncompressed_data = zlib.decompress(data[12:])
^^^^^^^^^^^^^^^^^^^^^^^^^^
zlib.error: Error -3 while decompressing data: invalid stored block lengths

Env info

  • Python: 3.11.4
  • Game Ver: Steam Dedicated Server v0.1.2.0
  • Server: Ubuntu 22.04
  • Script running machine: Windows 11

i have the same error any solution ?

@Croock92
Copy link

Croock92 commented Feb 7, 2024

Got a keyerror: 'groupsavedatamap' someone can help me ? :(

@Iceender22
Copy link

Hey Guys. I got an error while converting the Level.sav

Checking if Python is installed as python3
C:\Users\khorn\AppData\Local\Microsoft\WindowsApps\python3.exe
Found Python at python3
Python version:
Python 3.12.8
Converting D:\Palworld\Server\Saved\SaveGames\0\FD2EEA69451A3FD485BD80A4CC4025FE\Level.sav to JSON, saving to D:\Palworld\Server\Saved\SaveGames\0\FD2EEA69451A3FD485BD80A4CC4025FE\Level.sav.json
Decompressing sav file
Loading GVAS file
Traceback (most recent call last):
File "D:\Palworld\convert.py", line 118, in
main()
File "D:\Palworld\convert.py", line 52, in main
convert_sav_to_json(args.filename, output_path, args.minify_json)
File "D:\Palworld\convert.py", line 77, in convert_sav_to_json
gvas_file = GvasFile.read(raw_gvas, PALWORLD_TYPE_HINTS, PALWORLD_CUSTOM_PROPERTIES)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\gvas.py", line 124, in read
gvas_file.properties = reader.read_properties_until_end()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 168, in read_properties_until_end
properties[name] = self.read_property(type_name, size, f"{path}.{name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 177, in read_property
value = self.read_struct(path)
^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 289, in read_struct
value = self.read_struct_value(struct_type, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 325, in read_struct_value
return self.read_properties_until_end(path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 168, in read_properties_until_end
properties[name] = self.read_property(type_name, size, f"{path}.{name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 251, in read_property
value = self.read_prop_value(value_type, value_struct_type, value_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 273, in read_prop_value
return self.read_struct_value(struct_type_name, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 325, in read_struct_value
return self.read_properties_until_end(path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 168, in read_properties_until_end
properties[name] = self.read_property(type_name, size, f"{path}.{name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 174, in read_property
value = self.custom_properties[path][0](self, type_name, size, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\rawdata.py", line 132, in decode_character_data
value["value"] = decode_character_data_bytes(char_bytes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\rawdata.py", line 139, in decode_character_data_bytes
char_data["object"] = reader.read_properties_until_end()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 168, in read_properties_until_end
properties[name] = self.read_property(type_name, size, f"{path}.{name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 177, in read_property
value = self.read_struct(path)
^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 289, in read_struct
value = self.read_struct_value(struct_type, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 325, in read_struct_value
return self.read_properties_until_end(path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 168, in read_properties_until_end
properties[name] = self.read_property(type_name, size, f"{path}.{name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\lib\archive.py", line 267, in read_property
raise Exception(f"Unknown type: {type_name} ({path})")
Exception: Unknown type: ByteProperty (.SaveParameter.Level)

@Iceender22
Copy link

i used the wrong version of it. i downloaded the newest now. but i got another exception

Checking if Python is installed as python3
C:\Users\khorn\AppData\Local\Microsoft\WindowsApps\python3.exe
Found Python at python3
Python version:
Python 3.12.8
Converting D:\Palworld\Server\Saved\SaveGames\0\FD2EEA69451A3FD485BD80A4CC4025FE\Level.sav to JSON, saving to D:\Palworld\Server\Saved\SaveGames\0\FD2EEA69451A3FD485BD80A4CC4025FE\Level.sav.json
Decompressing sav file
Loading GVAS file
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02df12d2bae7c39e45b47d96985124b5a9
Unknown EPalWorkTransformType, please report this: 65: EPalWorkableType::Progress: 024a68e382b45a754993ad9884c6327787
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 021c9dc81464e0844180f83486bc52d032
Unknown EPalWorkTransformType, please report this: 63: EPalWorkableType::Progress: 02e5b2eb7ce6467042a3fa55c4d68f9072
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02488be24bbec70f448a99ac6714985fdb
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 023bbab464aaa2bc4eab1b96bb05101818
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02c0418b584eb84f47a73d9e657a0d7bd6
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 022ac005c35839494ab3c10939fd130f19
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0292738ff782522e46a676a2a01f13b83a
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 029a642234722ea543a9a28e5fed4ff4c2
Unknown EPalWorkTransformType, please report this: 66: EPalWorkableType::Progress: 02ef5d8e02d7fc824a9568ae5410d751c5
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02b580179b14634f43aedde31b13eb7021
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 027a769945ba136844be1141a6d2292cee
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0220a70b8405e96d46b34159bf1c686d5b
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0265b709374abb1041a8788ec8015241b9
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02167608157b41c348837144f7c20a6eb4
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02613f960cdff7844c9efe283842f35a47
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0214a5081d7eedb74f90493e079a415292
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02614640e8e59bd840837e8c7d4b3eeaf6
Unknown EPalWorkTransformType, please report this: 65: EPalWorkableType::Progress: 025a4ddbf8e7fa5a4ca4506ae502042578
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02b072bff31d51e342b042acc41e3256df
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02e9d56effdb43714bab6b63c85a18f6f8
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02ce9b5fe6aa8db540b0a47d7dd1c5dea1
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 027b4f8debef28cc40a7499f6a6d189388
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02fbc9ed81385a1b4f8067f05239783797
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0269f14821789a3f46b538375432f90b0d
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 025d717b6c75207a4c94c6143965c6cd62
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0250f05f31b506d744b439495502a6e35a
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0206487465daf9234591cff5ea4a04df74
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02a3345c4e8e449243b7144c73dcfde2a3
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02e9459e573287034fa93a9cbf1bb50b48
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 027a6f61239083f540afcd7cb04b1154a3
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 021cbe19adc1257744bdacce4f038fbe81
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0244a0c435bf0ddd4db973c79e0fb0dad6
Unknown EPalWorkTransformType, please report this: 66: EPalWorkableType::Progress: 02984d0d57c449134095f4a06b15b64957
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02525524297b1b224398ba68542e1cd78f
Unknown EPalWorkTransformType, please report this: 66: EPalWorkableType::Progress: 02dcb9d06063fc6d4c91f905ca48cc9596
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02c8952c91a8bc1b4aa495ee8f378b2ce1
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 021cedc753facba143bdefbfd143d3b312
Unknown EPalWorkTransformType, please report this: 63: EPalWorkableType::Progress: 02a4aa64c438118e4e866d994bc7b082bc
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02e6d268d0bae2844d92e2bba87ab955ba
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02baf31e03b5f52d4a87143cbaf1d36575
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0232c7762d490f564e97c44f671951d7e2
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02db62fc517469694a858016362c58efc5
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02bbfac35c8486b4429eaf1576ceec29d6
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 023dde58cab2d7d44f84793c87b57c7e40
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 024001153505fde1409ce389d99c98f220
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02686c60aa25eac04192ba9a0e8748f5bc
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 029457c89483915446842cf13c9a0112d0
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0230951e5bfe7e954997e1052e18f93b8c
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02d5110331e533d549ae55d619fef2fc20
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0266cab8628ba8994f817d799ac10d5fca
Unknown EPalWorkTransformType, please report this: 66: EPalWorkableType::Progress: 02c890ea5168e09b49835a9394dff33b9a
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 023e9f70f747345e45b09c39777ba1a82e
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 020d55069ffc3ffc49a0f323655509af88
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 027ed3c072a96c544ab8945022a3064974
Unknown EPalWorkTransformType, please report this: 63: EPalWorkableType::Progress: 029a0bd9557cca3742a76d49d56682f781
Unknown EPalWorkTransformType, please report this: 66: EPalWorkableType::Progress: 02635f9e1d4f45ce4f87a286ef5c302f0d
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0203e703156506ed41a13a01b32475d300
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 023b67aa574da34b4ea9ef3cf84e936f19
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02204e41ca82da6240bbd6253249e595e7
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0253b3e2efcfe36348ac914ced4b0ac7d3
Unknown EPalWorkTransformType, please report this: 66: EPalWorkableType::Progress: 025182285c6663d348a83111fedd9000bc
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 020ef883da76ac0646a9ec454e9298c4d8
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 023ad1f480272d854b9335240f019f344f
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0202bb970fb67b5446b3fbd576e88d2c39
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 021f1bea31d775614a862c35d0a3ae33c5
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02c0eaec328e83f34d9e9371174c151515
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02090fc9304c7fef41833ecbf4e7510d25
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02acc09042bc36ec41a37b0812d41279e8
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02be4c914716710e4fa1e928af633be5ad
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02a79dc45b89a7bc4b9e7fce5e97aad22f
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 023898a280a9c14a40ac3ba2a5991bac10
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02a8286ac2c43c3e4789069a4b4fb14023
Unknown EPalWorkTransformType, please report this: 66: EPalWorkableType::Progress: 0252134fe7adbf184b97cde57bcffcf051
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0253694058d313b84eae23e5cee52ad877
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 025c848eec969df846a82cc23bfe4d93ae
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 0207812047a7ffc04f84c5814472bd4e17
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 024c252bc704190649a5d52c6c68c8b1ed
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02fe05c56278d3414aa0696fdb90c592c0
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 023e362c7015b81f4e8274096644afc0b0
Unknown EPalWorkTransformType, please report this: 66: EPalWorkableType::Progress: 0211bfda6861de474b9d17d3056bf34bae
Unknown EPalWorkTransformType, please report this: 0: EPalWorkableType::Progress: 02eec0b2b86d49984e8016e0acba5ad31a
Traceback (most recent call last):
File "D:\Palworld\convert.py", line 164, in
main()
File "D:\Palworld\convert.py", line 75, in main
convert_sav_to_json(
File "D:\Palworld\convert.py", line 118, in convert_sav_to_json
gvas_file = GvasFile.read(
^^^^^^^^^^^^^^
File "D:\Palworld\palworld_save_tools\gvas.py", line 131, in read
gvas_file.properties = reader.properties_until_end()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\palworld_save_tools\archive.py", line 386, in properties_until_end
properties[name] = self.property(type_name, size, f"{path}.{name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\palworld_save_tools\archive.py", line 399, in property
value = self.struct(path)
^^^^^^^^^^^^^^^^^
File "D:\Palworld\palworld_save_tools\archive.py", line 534, in struct
value = self.struct_value(struct_type, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\palworld_save_tools\archive.py", line 561, in struct_value
return self.properties_until_end(path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\palworld_save_tools\archive.py", line 386, in properties_until_end
properties[name] = self.property(type_name, size, f"{path}.{name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\palworld_save_tools\archive.py", line 396, in property
value = self.custom_properties[path][0](self, type_name, size, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Palworld\palworld_save_tools\rawdata\group.py", line 17, in decode
group["value"]["RawData"]["value"] = decode_bytes(
^^^^^^^^^^^^^
File "D:\Palworld\palworld_save_tools\rawdata\group.py", line 77, in decode_bytes
raise Exception("Warning: EOF not reached")
Exception: Warning: EOF not reached

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment