Skip to content
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

Fail to parse the Level.sav by using covert.py after Palworld v0.3.3 patch #182

Open
RickyLottery opened this issue Jul 8, 2024 · 6 comments

Comments

@RickyLottery
Copy link

RickyLottery commented Jul 8, 2024

I have tried to parse the Level.sav after today's patch. However, the covert.py didn't manage to parse the file and reported the following Traceback

    File "xxx/palsave_tools/palworld_save_tools/archive.py", line 488, in property
    raise Exception(f"Unknown type: {type_name} ({path})")
Exception: Unknown type: UInt32Property (.worldSaveData.WorldMetaSaveVersionBitMask)

The reason might be that they had introduced some new data format or class.

Below is the notification of the patch this time.
[Patch Notice]
Palworld version v0.3.3 has been released.

===

・Fixed a bug that caused save data to become unreasonably large
・Other minor bugs fixed

@TheAutomatic
Copy link

I used a savefile transfer tool based on this git, and it fails today. Maybe it's because of the update today.

@raileehhh
Copy link

I was gonna port my savefile from gamepass to steam and i also encountered this problem.

@RickyLottery
Copy link
Author

RickyLottery commented Jul 8, 2024

Authors have merged some code of PR #181 to the main branch. This PR added the support of UInt32Property which is utilized in the new patch of PalWorld. I have managed to execute the source code to parse my .sav file which is:

python -m palworld_save_tools.commands.convert PATH_TO_YOUR_SAV_FILE

You might need to execute this command in the project's root directory (instead of the directory where covert.py is located).

From my perspective, this could be a temporary solution before authors publish a new version of the release package.

@RickyLottery RickyLottery changed the title Failing to parse the Level.sav by using covert.py after Palworld v0.3.3 patch Fail to parse the Level.sav by using covert.py after Palworld v0.3.3 patch Jul 8, 2024
@deafdudecomputers
Copy link

deafdudecomputers commented Jul 8, 2024

You guys need to update the archive.py to accept these.

        elif type_name == "Int32Property":
            value = {
                "id": self.optional_guid(),
                "value": self.u32(),
            }
        elif type_name == "UInt32Property":
            value = {
                "id": self.optional_guid(),
                "value": self.u32(),
            }
        Within def property(
        
        I also threw in Int32Property just in case.
        
        Apply to the Reader.

@TheAutomatic
Copy link

Authors have merged some code of PR #181 to the main branch. This PR added the support of UInt32Property which is utilized in the new patch of PalWorld. I have managed to execute the source code to parse my .sav file which is:

python -m palworld_save_tools.commands.convert PATH_TO_YOUR_SAV_FILE

You might need to execute this command in the project's root directory (instead of the directory where covert.py is located).

From my perspective, this could be a temporary solution before authors publish a new version of the release package.

Thanks for your suggestion, now it's able to create a .json file, is there anyway to transfer from a world to another? I found that there are billions of lines of the .json file, don't know where to change the player information.

@kssalanio
Copy link

kssalanio commented Jul 9, 2024

You guys need to update the archive.py to accept these.

        elif type_name == "Int32Property":
            value = {
                "id": self.optional_guid(),
                "value": self.u32(),
            }
        elif type_name == "UInt32Property":
            value = {
                "id": self.optional_guid(),
                "value": self.u32(),
            }
        Within def property(
        
        I also threw in Int32Property just in case.
        
        Apply to the Reader.

You also need to add the following lines to the def property_inner(...) function:

        elif property_type == "Int32Property":
            self.optional_guid(property.get("id", None))
            self.u32(property["value"])
            size = 4
        elif property_type == "UInt32Property":
            self.optional_guid(property.get("id", None))
            self.u32(property["value"])
            size = 4

This function is used for converting from .json back to .sav. Will work as a temporary solution with the above.

EDIT: Saw the latest release. Just use that instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants