xNul / palworld-host-save-fix

Fixes the bug which forces a player to create a new character when they already have a save. Useful for migrating maps from co-op to dedicated servers and from one dedicated server to another.
MIT License
886 stars 65 forks source link

Level 30 - 40+ save file not working #178

Open ewm250 opened 1 month ago

ewm250 commented 1 month ago

Level 30-40+ save file not working. Here is the result.

C:\Users\Eric> python C:\Users\Eric.cargo\bin\fix_host_save.py H:\PlayerRecovery\9C3BF6614A500ED94892D2BBE1C766D3 6750AAD7000000000000000000000000 00000000000000000000000000000001 False WARNING: Running this script WILL change your save files and could potentially corrupt your data. It is HIGHLY recommended that you make a backup of your save folder before continuing. Press enter if you would like to continue.

Converting H:\PlayerRecovery\9C3BF6614A500ED94892D2BBE1C766D3/Level.sav to JSON...Traceback (most recent call last): File "C:\Users\Eric.cargo\bin\fix_host_save.py", line 155, in main() File "C:\Users\Eric.cargo\bin\fix_host_save.py", line 76, in main level_json = sav_to_json(level_sav_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Eric.cargo\bin\fix_host_save.py", line 130, in sav_to_json gvas_file = GvasFile.read( ^^^^^^^^^^^^^^ File "C:\Users\Eric\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\palworld_save_tools\gvas.py", line 131, in read gvas_file.properties = reader.properties_until_end() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Eric\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\palworld_save_tools\archive.py", line 273, in properties_until_end properties[name] = self.property(type_name, size, f"{path}.{name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Eric\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\palworld_save_tools\archive.py", line 286, in property value = self.struct(path) ^^^^^^^^^^^^^^^^^ File "C:\Users\Eric\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\palworld_save_tools\archive.py", line 397, in struct value = self.struct_value(struct_type, path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Eric\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\palworld_save_tools\archive.py", line 424, in struct_value return self.properties_until_end(path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Eric\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\palworld_save_tools\archive.py", line 273, in properties_until_end properties[name] = self.property(type_name, size, f"{path}.{name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Eric\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\palworld_save_tools\archive.py", line 359, in property value = self.prop_value(value_type, value_struct_type, value_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Eric\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\palworld_save_tools\archive.py", line 381, in prop_value return self.struct_value(struct_type_name, path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Eric\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\palworld_save_tools\archive.py", line 424, in struct_value return self.properties_until_end(path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Eric\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\palworld_save_tools\archive.py", line 273, in properties_until_end properties[name] = self.property(type_name, size, f"{path}.{name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Eric\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\palworld_save_tools\archive.py", line 283, in property value = self.custom_properties[path][0](self, type_name, size, path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Eric\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\palworld_save_tools\rawdata\item_container.py", line 13, in decode value["value"] = decode_bytes(reader, data_bytes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Eric\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\palworld_save_tools\rawdata\item_container.py", line 30, in decode_bytes raise Exception("Warning: EOF not reached") Exception: Warning: EOF not reached PS C:\Users\Eric>

The file is to big to add so I put it on my dropbox for you. https://www.dropbox.com/s/64hxa32u4f2zq34/9C3BF6614A500ED94892D2BBE1C766D3.zip?dl=0