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
887 stars 68 forks source link

Bug same GUID #90

Closed TheSonic03 closed 5 months ago

TheSonic03 commented 5 months ago

I played the game with my friends in co-op mode. I created the server and I, obviously, tried to trasfer the saving file from my friend's world inside my server. My old GUID and my new GUID is the same. So when i runned the script I got an error. I opened "fix-host-save.py" and I noticed the problem at line 131. So then I modified the script like that:

# We must rename the patched save file from the old GUID to the new GUID for the server to recognize it.
    if os.path.exists(new_sav_path):
        if new_sav_path != old_sav_path:
            os.remove(new_sav_path)
            os.rename(old_sav_path, new_sav_path)

    print('Fix has been applied! Have fun!')

This will resolve the issue. If you want you can update your script. This is my first time I use Python language, and I changed the script quickly, maybe you can change it in an better way than mine.

xNul commented 5 months ago

I don't think adding this code makes sense because there's no point in making the new GUID and the old GUID the same GUID, but thanks for trying to help!