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

Possible fix for not being able to pick up Pals #69

Open Bananeeee1109 opened 5 months ago

Bananeeee1109 commented 5 months ago

Dunno if this is the right place for this but I thought I'd share this.

EDIT: This seems to only work for the other members once, once they rejoin its gone. So this doesn't work fully yet. Trying to figure out a way to make it work for the other members as well. EDIT 2: Seems like it created more guilds again, deleting them seems to have fixed it for now, not sure what's causing them to show up, might be people joining the guild, for now no new instances of the guild are being created, will keep updating this issue. EDIT 3; It mostly works now, sometimes the other members need to relog, haven't gotten a new guild entry in the level.sav file yet.

This is from a server where we switched from Windows -> Linux.

We had the issue with not being able to pick up Pals after the migration, I was able to find a fix that seems to work.

After doing some testing with my friends I found out after looking into the level.sav file that there were 2 instances of our guild. Presumably this happened with the migration or some time after, since we only had one guild I was easily able to find the data for our guild and the second "fake" guild that also included our data, since they were both the largest ones inside the level.sav. There might be multiple of these "fake" guilds in there, not sure how they are being created, or what the cause is. By deleting the second guild everyone was able to pick up Pals. This might not work for other instances of this bug but I saw other people have the same problem like in #55 and #58, so I thought I'd share how I solved this.

-> Main issue: Multiple guild instances are being created in the level.sav with what seems to be the same data. What causes them to show up I'm not sure yet. But they seem to be the cause of the pick up bug.

Process: This might destroy your world save to be sure to backup the save.

Side note: Searching for GUIDs of the guilds can show which one is original one, since the original one had more entries than the guild entry itself, being some kind of references to objects that have the guild GUID in their data.

This all seems to have been a permanent fix in my case, so far even after restarts and stuff everything seems to still work (only 100% sure for the guild master), will keep updated on this though. If there are any remaining issues with Pals, dropping them and picking them back up might solve those. If members of the guild can't pick them up after rejoining or a server restart then there probably was a new guild instance created in the level.sav.

If this also works for other people then maybe writing up a guide and putting it in the ReadMe would be a good idea.

n4t3py13 commented 5 months ago

@JannikBirn I was able to manually fix it by editing the file by hand, so dont worry about my last post >_<. Thanks everyone here.

Ericatriver commented 5 months ago

I just deleted the part highlighted here.

Screenshot 2024-02-01 182002

Ericatriver commented 5 months ago

Can someone help guide me through this please? Under my guild block i see what seems like hundreds of lines similar to this { "key": "8857efca-48ba-4226-0e5e-4c812169ef49", "value": { "GroupType": { "id": null, "value": { "type": "EPalGroupType", "value": "EPalGroupType::Neutral" }, "type": "EnumProperty" }, "RawData": { "array_type": "ByteProperty", "id": null, "value": { "group_type": "EPalGroupType::Neutral", "group_id": "8857efca-48ba-4226-0e5e-4c812169ef49", "group_name": "", "individual_character_handle_ids": [ { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "44987eb1-499d-49fb-a449-3ab91c144761" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "c9c77d7e-4166-cb5a-f946-7fb4cfc1de28" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "c4f5a2d3-4070-7839-b0e8-b79dc1739798" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "84a5b16f-4bbd-f2ee-e8e0-03abc58c7d39" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "8c3f8118-4984-8283-f1a8-929a6945196a" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "7733553f-434d-9b43-2135-0686a17adab4" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "124ac876-4547-b2d6-95e2-8e8c806b0874" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "85602832-4371-c31e-c314-bb881b7e841e" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "a18877ff-49de-2060-3aff-6aa28b130a4e" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "ed9becd9-4b74-4e3b-49a5-d8b680bf0143" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "ed657955-4125-9c0b-8615-bcab4bf674ea" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "b72a1c97-4e83-5c75-790d-08b82d1a7aad" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "29e71fca-425a-e192-075b-b49232ae8043" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "192cfa5c-4e6e-e960-b13c-308d3287b09c" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "1f116fb9-47c5-5e08-0dd7-b4a21e018ff4" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "fe0dc6ff-4913-5937-250c-16996cf0b852" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "7c9173a1-4a8a-e671-931b-55a1fd02daca" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "d31767f0-4073-0796-8b66-84ae58063ff4" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "4ccdd078-4494-51f5-9e9b-d7ab1184e84a" }, { "guid": "00000000-0000-0000-0000-000000000000", "instance_id": "d9d45d20-4a90-6c42-651b-5784dd6d758b" } ] }, "type": "ArrayProperty" } } }, { Unfortunately my friends and i have played 100 hours combined with the ability to pick up pals intermittently being a problem for everyone. now it seems to be just affecting me.

delete the highlighted area

image

BMK2 commented 5 months ago

For those that don't see duplicate guild GUIDs in their save file, I found that the Pal Bug fix corrects the issue of not being able to pick up Pals for reassignment https://github.com/xNul/palworld-host-save-fix?tab=readme-ov-file#pal-bug

ficarra1002 commented 5 months ago

If I wanted to try and fix my guild issue, how do I convert the .json back to .sav without transferring a character? My character is already transferred (from a week ago, just been letting my friends do all the basebuilding stuff), so I am curious how I can fix the save, as it looks like the tool requires you to transfer a character for it to finish. Also, is it normal for my json to end up being about 500mb? I am struggling to open and edit it because of that, as I type the loading bar for sublime text is only ~15% done after a few minutes.

XxInvictus commented 5 months ago

If I wanted to try and fix my guild issue, how do I convert the .json back to .sav without transferring a character? My character is already transferred (from a week ago, just been letting my friends do all the basebuilding stuff), so I am curious how I can fix the save, as it looks like the tool requires you to transfer a character for it to finish. Also, is it normal for my json to end up being about 500mb? I am struggling to open and edit it because of that, as I type the loading bar for sublime text is only ~15% done after a few minutes.

My Level.sav is 1.3GB so perfectly normal! Assuming you used palworld-save-tools to go from SAV to JSON, to convert JSON back to SAV you just need to run it through palworld-save-tools again 😄

XxInvictus commented 5 months ago

Has anyone got a reliable way to cleanup if they used xNul's version of the script? When transferring the last two characters on my server I noticed that JannikBirn's tool shows the two characters I first transferred with xNul's tool still show the original level 0 accounts as existing.

jbibi commented 4 months ago

If I wanted to try and fix my guild issue, how do I convert the .json back to .sav without transferring a character? My character is already transferred (from a week ago, just been letting my friends do all the basebuilding stuff), so I am curious how I can fix the save, as it looks like the tool requires you to transfer a character for it to finish. Also, is it normal for my json to end up being about 500mb? I am struggling to open and edit it because of that, as I type the loading bar for sublime text is only ~15% done after a few minutes.

I used Visual Studio Code. Make sure you have a good amount of RAM. Mine was about 2 GB. Give it some time to process as much as it can but do not expect the full linter to work. After that search for guild as the guide suggests. In my case, the guilds that were giving me trouble were called "Unnamed Guild". Just delete the full instance from bracket to bracket. If the guild has a lot of pals it will be a bit of a struggle to scroll while selecting but not impossible. The fast scrolling in my mouse helped a lot since one of them had about 300 pals. After that the fix should be permanent. Another tip I would say is to rename your guild to something you haven't used before, before exporting your save. That way you are sure you have the correct guild untouched.

jbibi commented 4 months ago

Has anyone got a reliable way to cleanup if they used xNul's version of the script? When transferring the last two characters on my server I noticed that JannikBirn's tool shows the two characters I first transferred with xNul's tool still show the original level 0 accounts as existing.

The best way is to follow the steps in the OP. I tried everything else and nothing worked. Some suggested tools, did not work. In the end, I did what the OP instructed and fixed the issue permanently. The only downside is that your file may be very big. I would say do it ASAP. I knew about this solution very soon after I did the transfer but had issues opening the JSON and ignored it. I did it after capturing many more pals, making the bases bigger so the file was even bigger than the first time.