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
888 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.

TRULYSICKENINGX commented 5 months ago

something else I noticed; issue seems to be fixed if my character levels up then reconnects to the server.

in my experience this breaks once the server restarts again.

edit: not a fix, found at end!

PaddyS commented 5 months ago

Phew. Thanks for letting us know. Unfortunately we've got PLENTY of guilds and I have no clue how to figure out the issue here now. We're like 15 players and none in the guild of another player. I'm the only one facing the said issue.

JannikBirn commented 5 months ago

I also have this issue. Sadly, both “fixes” didn't seme to work for me. In the converted level.sav json I could only find one instance of "guild". And the level up and reconnect didn't helped either. But fyi, newly catched pals on the server can be picked up by the player, only pals catched before the server conversion are bugged.

PaddyS commented 5 months ago

I also have this issue. Sadly, both “fixes” didn't seme to work for me. In the converted level.sav json I could only find one instance of "guild". And the level up and reconnect didn't helped either. But fyi, newly catched pals on the server can be picked up by the player, only pals catched before the server conversion are bugged.

Not the case for me. Just caught some, also can't pick them up. Ugh, that's really a pain, since we can't use the breeder this way.

guksg commented 5 months ago

could you explain where the beginning of GUIDs data column start and end ? I cut out the parts that expected would be beginning and end that column. u can see guild_name column. "key": "9df335d5-4fad-fdb5-bc22-8487e76e440b", "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": "9df335d5-4fad-fdb5-bc22-8487e76e440b", "group_name": "", "individual_character_handle_ids": [ { "guid": "00000000-0000-0000-0000-000000000001", "instance_id": "2e7b6a58-4b2b-f6f3-d563-32b4bdf27c0d" }, { "guid": "00000000-0000-0000-0000-000000000001", "instance_id": "2f7d29bc-4bae-2896-cb54-599c1f425d20" } ] }, "type": "ArrayProperty" } } }, { "key": "d4afd619-48d3-41f3-9faf-6d9ee2ed80b3", "value": { "GroupType": { "id": null, "value": { "type": "EPalGroupType", "value": "EPalGroupType::Guild" }, "type": "EnumProperty" }, "RawData": { "array_type": "ByteProperty", "id": null, "value": { "group_type": "EPalGroupType::Guild", "group_id": "d4afd619-48d3-41f3-9faf-6d9ee2ed80b3", "group_name": "34DD734B000000000000000000000000", "individual_character_handle_ids": [ { "guid": "34dd734b-0000-0000-0000-000000000000", "instance_id": "f6465586-4325-647e-72cc-d89348d4a075" } ], "org_type": 0, "base_ids": [], "base_camp_level": 1, "map_object_instance_ids_base_camp_points": [], "guild_name": "無名のギルド", "admin_player_uid": "34dd734b-0000-0000-0000-000000000000", "players": [ { "player_uid": "34dd734b-0000-0000-0000-000000000000", "player_info": { "last_online_real_time": 702778830000, "player_name": "John" } } ] }, "type": "ArrayProperty" } } } ], "type": "MapProperty", "custom_type": ".worldSaveData.GroupSaveDataMap" }, "GameTimeSaveData": { "struct_type": "PalGameTimeSaveData", "struct_id": "00000000-0000-0000-0000-000000000000", "id": null, "value": { "GameDateTimeTicks": { "id": null, "value": 34237640000000, "type": "Int64Property" }, "RealDateTimeTicks": { "id": null, "value": 702778830000, "type": "Int64Property" } }, "type": "StructProperty" },

Diogoperei29 commented 5 months ago

This worked for me the first time, but after restarting the server I was back to not being able to interact with pals again :(

Diogoperei29 commented 5 months ago

Okay, I think I got it to work, i did this:

Deleting the second block that had the "bad" guild's key associated with made the fix "permanent", at least on my side

TRULYSICKENINGX commented 5 months ago

thanks for this, will try! what are you using to edit the .sav/.json file?

Diogoperei29 commented 5 months ago

thanks for this, will try! what are you using to edit the .sav/.json file?

https://github.com/cheahjs/palworld-save-tools

ShadyGame commented 5 months ago

i would also like to know what @guksg mentioned, its a bit messy, i can see guild with my new guid and old guid, i dont know which to delete

shmove commented 5 months ago

Okay, I think I got it to work, i did this:

* As per the issue instructions you look for a guild in the file that does not make sense, in my case I found a guild where I was alone in.
  -Assuming this is the extra guild that is causing the problems you want to delete all the contents associated with that guild in the .json file. BUT FIRST copy the key value that is associated with this category.

* Searching for that key value of the guild block that you just deleted will lead you to another block. Delete this block as well.

Deleting the second block that had the "bad" guild's key associated with made the fix "permanent", at least on my side

This seems to have worked for me, thank you so much for this fix!

TRULYSICKENINGX commented 5 months ago

Chiming in to say deleting the extra blocks worked for me as well! Ty for the find. To add some context:

I had my true guild with all player names inside, as well as 3 extra "fake" guilds with their own IDs. For two of those "fake IDs," I had to delete one extra block. For my last "fake ID," I actually had to go and delete 68 blocks. All working now after doing so though!

Sivarius commented 5 months ago

For me i can't find any extra guild in json files. Can you guys make a video or some screenshots how should it looks like? Btw what program do u use for edit a json file? I used Notepad++ but it seems very not confortable

Lofty34 commented 5 months ago

Okay, I think I got it to work, i did this:

* As per the issue instructions you look for a guild in the file that does not make sense, in my case I found a guild where I was alone in.
  -Assuming this is the extra guild that is causing the problems you want to delete all the contents associated with that guild in the .json file. BUT FIRST copy the key value that is associated with this category.

* Searching for that key value of the guild block that you just deleted will lead you to another block. Delete this block as well.

Deleting the second block that had the "bad" guild's key associated with made the fix "permanent", at least on my side

This seems to have worked for me, thank you so much for this fix!

I only see one EPalGroupType:Guild listed but i see a lot of key vaules with my old local save GUID (0000000000000001) saying EPalGroupType:Neutral. Is this what is getting deleted?

JannikBirn commented 5 months ago

I made changes to the script to delete the newly created group and update the old group with the new player ID. I also adjusted the OwnerPlayerUId and OldOwnerPlayerUIds of the Pals. This resolves the pickup problem on my site. Since I didn't want to interfere with binary data, I had to modify the script significantly. Consequently, I created a new repository for it at JannikBirn/palworld-host-save-fix instead of submitting a pull request.

If this solution works for most of you, I can submit a pull request if @xNul agrees. This would involve substantial changes to the code. Alternatively, you can adjust your code to incorporate the adjustments I made to work with your binary modifications.

linus551000 commented 5 months ago

@JannikBirn my friend, is there any way you could guide me through this in a dc call or something, i am completley lost. been sitting with this for 4 hours

Lofty34 commented 5 months ago

I made changes to the script to delete the newly created group and update the old group with the new player ID. I also adjusted the OwnerPlayerUId and OldOwnerPlayerUIds of the Pals. This resolves the pickup problem on my site. Since I didn't want to interfere with binary data, I had to modify the script significantly. Consequently, I created a new repository for it at JannikBirn/palworld-host-save-fix instead of submitting a pull request.

If this solution works for most of you, I can submit a pull request if @xNul agrees. This would involve substantial changes to the code. Alternatively, you can adjust your code to incorporate the adjustments I made to work with your binary modifications.

What steps would you do if you already moved to the dedicated server? We are a day into the dedicated server with this issue? So doing the host-save-fx will just remove all progress.

JannikBirn commented 5 months ago

I made changes to the script to delete the newly created group and update the old group with the new player ID. I also adjusted the OwnerPlayerUId and OldOwnerPlayerUIds of the Pals. This resolves the pickup problem on my site. Since I didn't want to interfere with binary data, I had to modify the script significantly. Consequently, I created a new repository for it at JannikBirn/palworld-host-save-fix instead of submitting a pull request. If this solution works for most of you, I can submit a pull request if @xNul agrees. This would involve substantial changes to the code. Alternatively, you can adjust your code to incorporate the adjustments I made to work with your binary modifications.

What steps would you do if you already moved to the dedicated server? We are a day into the dedicated server with this issue? So doing the host-save-fx will just remove all progress.

I don't think this is easily possible, you probably need to look manually into the save files (you can convert these with this tool). Then you need to find the different guilds with your old and new player guid and remove the new guild and replace the player guids in the old one with your new player guid. But this might have unintended consequences, that you will be unable to pick up your newly caught pals since these might now be associated with the new guild. Tbh. this all sounds pretty difficult and might not work, so the best thing could be to lose this day of progress and start with the save state before you moved to the dedicated server.

JannikBirn commented 5 months ago

@linus551000 write me your dc name, and I'll see what I can do for you. But maybe you can tell us with what you're struggling so we can help other people as well.

linus551000 commented 5 months ago

@JannikBirn dc: gizmo551000. tbh i was struggeling with getting my own save file into the world at first, im not very good at understanding all this but after a couple of hours and many yt vids i managed to get the savefile to work, but the problem i encounterd when loggin in is that all the pals captured BEFORE trandering from co-op world to server is not able to pick up, and the ore on my ore farm is not farmable by any pals. able with my pickaxe tho, and i tried to understand this, but when i succesfully made the file into a json file i lost it, might aswell been in chinese. Did not understand anything xD

Gerkenator commented 5 months ago

I tried removing this unnamed guild and I either did it wrong or it didn't work. I got the new character creation. I also tried adding another account to the world and transferring ownership which seemed to partially work. Some pals I could lift and others I couldn't. It seemed to be new catches were fine and old were not. So I purged my box and got to work. But what I found was some newly caught pals were bugged while others were not. This is pretty much game breaking since I can't consistently breed.

What I believe caused this issue. I used the "Palworld Host Save Fix" to change my dedicated server save from the Old player ID to the New player ID post 0.1.3 release. I followed some general directions of join server create the new player save and then use the script. I have my 0.1.2 backup still. But I really put a lot of time into this before I realized I couldn't pick up pals anymore. I'm not sure what to do at this point try and roll back or wipe server. Both kind of take the wind out of my sails for a bit.

JannikBirn commented 5 months ago

@linus551000 I wasn't able to get in touch with you, but I might have something even better. I created a simple UI for my tool and added an executable to the latest realese, this should be pretty easy to use. You can find it here: https://github.com/JannikBirn/palworld-host-save-fix

mxfrxsx commented 5 months ago

So, i did a little digging myself in our Level.sav and this is what i found out:

After Running the Script and People have joined the Server again, i have found two Playerentrys with the same GUID (i suspect one is the old, transferred and the other is the newly created.) The newly created had a different groupid, which seems to be the identifier for which Guild the Player belongs to. When the new Character is created, a new Guild is also created.

So i deleted the new Guild (most likely called "Unknow Guild"), and all corresponding Data (Take the Key and search the Dokument for it. You may finde other entries, like Pals connect to them). Then i deleted the new Account and double checked if the old account has the correct Key in the groupid, corresponding to the original Guild.

After a bit of testing, this seems to have eliminated the Problem of not beeing able to pick up pals.

JannikBirn commented 5 months ago

So, i did a little digging myself in our Level.sav and this is what i found out:

After Running the Script and People have joined the Server again, i have found two Playerentrys with the same GUID (i suspect one is the old, transferred and the other is the newly created.) The newly created had a different groupid, which seems to be the identifier for which Guild the Player belongs to. When the new Character is created, a new Guild is also created.

So i deleted the new Guild (most likely called "Unknow Guild"), and all corresponding Data (Take the Key and search the Dokument for it. You may finde other entries, like Pals connect to them). Then i deleted the new Account and double checked if the old account has the correct Key in the groupid, corresponding to the original Guild.

After a bit of testing, this seems to have eliminated the Problem of not beeing able to pick up pals.

Yes, this is exactly what I did with my script. The problem was that the newly created player and group didn't get deleted, when running xNal's script.

mxfrxsx commented 5 months ago

So, i did a little digging myself in our Level.sav and this is what i found out: After Running the Script and People have joined the Server again, i have found two Playerentrys with the same GUID (i suspect one is the old, transferred and the other is the newly created.) The newly created had a different groupid, which seems to be the identifier for which Guild the Player belongs to. When the new Character is created, a new Guild is also created. So i deleted the new Guild (most likely called "Unknow Guild"), and all corresponding Data (Take the Key and search the Dokument for it. You may finde other entries, like Pals connect to them). Then i deleted the new Account and double checked if the old account has the correct Key in the groupid, corresponding to the original Guild. After a bit of testing, this seems to have eliminated the Problem of not beeing able to pick up pals.

Yes, this is exactly what I did with my script. The problem was that the newly created player and group didn't get deleted, when running xNal's script.

Yes, I thought so, unfortunately I had made the original transfer with xNal's script and could no longer use yours. I'll probably do the next characters with your script, then I won't have to do it by hand anymore

dungtranhoang commented 5 months ago

So the easy method I think just remove any guild record that not correct one right? Then restart the server

mtsmfm commented 5 months ago

In my case, I noticed some players who can't pickup belong to multiple guilds. I've removed such guilds with comparing last_online_real_time.

Here's the actual script I executed: https://github.com/mtsmfm/palworld-utils/blob/2c54db823fcea86211fca9e752a6e4a96284e3f0/cli/index.ts#L114-L160

Hope it helps.

Timmphy commented 5 months ago

Hi @mtsmfm , thanks for the script but actually i cant execute this because my level.sav.json is to big. The error encountering is a limitation of the Node.js runtime environment. The maximum length of a string that can be created using the Buffer.toString() method is 0x1fffffe8 characters, which is approximately 2GB. My save file to load is likely larger than this limit, which is causing the error.

spoopy-dot 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.

FaultyToilet commented 5 months ago

Has anyone tried removing guid values with all "0"'s for pals within your active guild? I have a ton that are registered to the host but towards the end of the list there are some empty guid values that are similar to the empty guilds. Just want to make sure I'm not deleting my buddies party pals or something

EnergyVenom commented 5 months ago

So I've gone through my level.sav and deleted the fake guild (unknown guild) but when i save and transfer the new file back to my server, it would appear that the save is corrupted or something is making it not work. Any attempt to join the server is met with a connection timed out error. When I revert the server to the level.sav before i edited it, the server works just fine. I've also noticed when the server is running the edited level.sav the server ram constantly fluctuates between ~1.2-3.2GB and when trying to stop the server it doesn't stop, I have to kill the process for it to come to a stop.

Has anyone else gotten this error? If so, how did you fix it. If anyone is able to help me with this it would be appreciated.

sirzuidy commented 5 months ago

@linus551000 I wasn't able to get in touch with you, but I might have something even better. I created a simple UI for my tool and added an executable to the latest realese, this should be pretty easy to use. You can find it here: https://github.com/JannikBirn/palworld-host-save-fix

@JannikBirn, thank you for saving me after many hours of struggling with this. Your GUI-based method/script allowed me to successfully migrate from Steam/Windows co-op to Linux dedicated. I used Filezilla for all file transfers, to be transparent.

In my case: 1 - I used the GUI to apply the host fix exactly as described in your branch, deleting WorldOption.sav too. When merging the old host save (...0001), for some reason the final merged filename was all lowercase (Ex. - b3a5a0 versus B3A5A0). I uploaded the entire save folder to the server, changed the DedicatedServerName in GameUserSettings.ini to match our save folder name, and started the server.

2 - I had all players join as a good measure. The other players were not prompted to create new saves and maintained everything tied to their original co-op save. When the host rejoined after the fix was applied though, they were prompted to create a new character, and it created a fresh save file for them. I noticed that the fresh .sav file for the host was the same filename as the merged file, except in all capitals.

3 - I stopped the server, deleted the new host .sav that was generated, and renamed the merged host file produced by the script to be all capitals instead of lowercase. I then started the server.

When the former host rejoined this time, all they had to do was choose their spawn point. We then confirmed everything was functional for the host.

We did nothing else, and the other 3 players (non-hosts) were able to join and maintained all of their stuff as well. As of a lengthy session today, we have surprisingly encountered no issues (Pals, Guilds/Bases, nothing). Things remain fine after server restarts.

The only thing worth noting is that our egg spawn timers were set to 72 (hard difficulty), but that was likely a server host issue and was easy to correct in PalworldSettings.ini.

Again, a million thanks @JannikBirn! I would be glad to work with you to share this knowledge, and am happy to answer any questions the community might have about how I finally got this to work. Seems I got luckier than many.

Emellious commented 5 months ago

@linus551000 I wasn't able to get in touch with you, but I might have something even better. I created a simple UI for my tool and added an executable to the latest realese, this should be pretty easy to use. You can find it here: https://github.com/JannikBirn/palworld-host-save-fix

@JannikBirn, thank you for saving me after many hours of struggling with this. Your GUI-based method/script allowed me to successfully migrate from Steam/Windows co-op to Linux dedicated. I used Filezilla for all file transfers, to be transparent.

In my case: 1 - I used the GUI to apply the host fix exactly as described in your branch, deleting WorldOption.sav too. When merging the old host save (...0001), for some reason the final merged filename was all lowercase (Ex. - b3a5a0 versus B3A5A0). I uploaded the entire save folder to the server, changed the DedicatedServerName in GameUserSettings.ini to match our save folder name, and started the server.

2 - I had all players join as a good measure. The other players were not prompted to create new saves and maintained everything tied to their original co-op save. When the host rejoined after the fix was applied though, they were prompted to create a new character, and it created a fresh save file for them. I noticed that the fresh .sav file for the host was the same filename as the merged file, except in all capitals.

3 - I stopped the server, deleted the new host .sav that was generated, and renamed the merged host file produced by the script to be all capitals instead of lowercase. I then started the server.

When the former host rejoined this time, all they had to do was choose their spawn point. We then confirmed everything was functional for the host.

We did nothing else, and the other 3 players (non-hosts) were able to join and maintained all of their stuff as well. As of a lengthy session today, we have surprisingly encountered no issues (Pals, Guilds/Bases, nothing). Things remain fine after server restarts.

The only thing worth noting is that our egg spawn timers were set to 72 (hard difficulty), but that was likely a server host issue and was easy to correct in PalworldSettings.ini.

Again, a million thanks @JannikBirn! I would be glad to work with you to share this knowledge, and am happy to answer any questions the community might have about how I finally got this to work. Seems I got luckier than many.

So I used the original script and instructions from dunk to replace the player guids when I migrated from one dedicated host to another. Is there any way to fix this issue after the transfers have been done?

JannikBirn commented 5 months ago

@sirzuidy thanks, great to hear that it worked for you. I'll take a look at the GUI script why the filename was in lower case, that should be an easy fix but went unnoticed so far.

HPTD1 commented 5 months ago

@linus551000 I wasn't able to get in touch with you, but I might have something even better. I created a simple UI for my tool and added an executable to the latest realese, this should be pretty easy to use. You can find it here: https://github.com/JannikBirn/palworld-host-save-fix

moin. I found this thread because I have that same bug where I cant pickup pals to assign them. using your tool it shows that multiple people have multiple chars on my server at different levels. even people that haven't played on the server before using the PY script to migrate characters.

one person exists as lvl 38, 12 and 3 for example, 2 players as highlevel and 0 level. but the corresponding savefile in the players folder doesn't exist (only 1 per players as expected).

trying to migrate the higer level onto the lower level doesn't work with your tool (removing the low/0 levels).

Is there a way to delete these wrong level chars from the save. might that fix the problem with the not-pick of pals? in our case the actual high level chars work and don't need any migration with the tool.

JannikBirn commented 5 months ago

@linus551000 I wasn't able to get in touch with you, but I might have something even better. I created a simple UI for my tool and added an executable to the latest realese, this should be pretty easy to use. You can find it here: https://github.com/JannikBirn/palworld-host-save-fix

moin. I found this thread because I have that same bug where I cant pickup pals to assign them. using your tool it shows that multiple people have multiple chars on my server at different levels. even people that haven't played on the server before using the PY script to migrate characters.

one person exists as lvl 38, 12 and 3 for example, 2 players as highlevel and 0 level. but the corresponding savefile in the players folder doesn't exist (only 1 per players as expected).

trying to migrate the higer level onto the lower level doesn't work with your tool (removing the low/0 levels).

Is there a way to delete these wrong level chars from the save. might that fix the problem with the not-pick of pals? in our case the actual high level chars work and don't need any migration with the tool.

That sounds really weird, the real question tho is why:

trying to migrate the higer level onto the lower level doesn't work with your tool (removing the low/0 levels).

Doesn't work. Are you able to provide me with your save files, so I can check what's going wrong.

Ma5onic commented 5 months ago

@sirzuidy thanks, great to hear that it worked for you. I'll take a look at the GUI script why the filename was in lower case, that should be an easy fix but went unnoticed so far.

Thanks @JannikBirn! Your patch worked for me too! Maybe make a pull request? I also had lowercases, but the it didn't cause issues with the game.

@HPTD1, If you were the host, your original game save file should be 00000000000000000000000000000001.sav and I assume that you are the lvl 38 character. As mentioned in steps 4-6 of the readme: Once you put your save on the dedicated server and connect to it, you will be asked to create a character. Once you create a character and unlock first fast-travel statue (or just exit to title), the game will save and you will notice a new .sav file in the Players directory. That new .sav file is for the new lvl 0 character that you just created and will be character that you want to migrate to/overwrite, similar to this: image

As for figuring out which game save is for which player, you can convert the .sav files to JSON and open it in a text editor using this tool: https://github.com/cheahjs/palworld-save-tools?tab=readme-ov-file#terminal

Emellious commented 5 months ago

Does anyone know if there is a script or something to delete the extra guilds and stuff after a transfer? Does the script by Jannikbirn prevent the issue? If I already did a transfer with the xNul script can I use the modified one by Jannik on the new server?

JannikBirn commented 5 months ago

Does anyone know if there is a script or something to delete the extra guilds and stuff after a transfer? Does the script by Jannikbirn prevent the issue?

Yes, my script will delete the new player and associated guild of that new player. I am able to pick up Pals again.

If I already did a transfer with the xNul script can I use the modified one by Jannik on the new server?

That is currently not supported. I would recommend starting from a backup before you ran xNul's script.

Emellious commented 5 months ago

@JannikBirn Any idea what would happen if I did run your modified script on a .sav that’s already been through xNul’s script? Only considering it because the people have already put in considerable time after the transfer.

HPTD1 commented 5 months ago

@Ma5onic we had some weird situation, we moved a dedicated server from a private win11 pc to a windows data server dedicated server. it wasn't from a coop savegame, but from one dedicated palworld server to another dedicated palworld on, but the save file IDs did still switch. there were no 00001.sav, everyone had regular IDs already. but the new server created new IDs for existing players. with this py script we managed to migrate the different player IDs to their new IDs (login, see what new ID is created, migrate the existing ID onto that person, repeat)

your tool shows some weird leftovers in the save files One person with 2 additional entries at lower levels. One person with 1 additional lvl 0 and another person with a lvl 0, but this person started playing after the switch onto the new server. As mentioned, there are no "leftover" IDs in the save folder. your tool makes them selectable but cant complete the migration (probably because there is no #.sav file of them)

My best guess is, that our problems with the pal assignment in bases is due to these duplicate players that your tool detects in the save files, even though they dont have a #.sav in the players folder. I need to find a way to clean them out of the level.sav file

Kaaaaarrrll commented 5 months ago

I made changes to the script to delete the newly created group and update the old group with the new player ID. I also adjusted the OwnerPlayerUId and OldOwnerPlayerUIds of the Pals. This resolves the pickup problem on my site. Since I didn't want to interfere with binary data, I had to modify the script significantly. Consequently, I created a new repository for it at JannikBirn/palworld-host-save-fix instead of submitting a pull request.

If this solution works for most of you, I can submit a pull request if @xNul agrees. This would involve substantial changes to the code. Alternatively, you can adjust your code to incorporate the adjustments I made to work with your binary modifications.

I just made my dedicated server yesterday, converting the file with this yesterday, and I'm dealing with this issue now - what do I do?

Ma5onic commented 5 months ago

I made changes to the script to delete the newly created group and update the old group with the new player ID. I also adjusted the OwnerPlayerUId and OldOwnerPlayerUIds of the Pals. This resolves the pickup problem on my site. Since I didn't want to interfere with binary data, I had to modify the script significantly. Consequently, I created a new repository for it at JannikBirn/palworld-host-save-fix instead of submitting a pull request. If this solution works for most of you, I can submit a pull request if @xNul agrees. This would involve substantial changes to the code. Alternatively, you can adjust your code to incorporate the adjustments I made to work with your binary modifications.

I just made my dedicated server yesterday, converting the file with this yesterday, and I'm dealing with this issue now - what do I do?

I think you used the the tool by @xNul, not by @JannikBirn. Use this one for now: https://github.com/JannikBirn/palworld-host-save-fix

Ma5onic commented 5 months ago

@HPTD1 it is not my tool, I had nothing to do with the development, I am just documenting my findings.

If you started with a dedicated server windows server & are migrating, I don't think that you need to use this tool, if I am not mistaken, all you needed to do was transfer the game save to the new server and set the GameUserSettings.ini so that the DedicatedServerName variable matches the name of your save folder, otherwise it will create a new save folder. As for the additional players, if people joined while you were troubleshooting and you try to reuse the same save folders, it is possible that there will be artifacts.

I would try again from scratch since you only migrated yesterday, taking into consideration what I said about the GameUserSettings.ini

HPTD1 commented 5 months ago

the problem I had with the pals not able to pickup to assign to jobs is fixed for me. I don't know a thing how exactly the savegame file is linked together, so I avoided deleting stuff out of it. I converted the level.sav to json, searched the name of the affected players. they were listed in two guilds at once. I simply changed the name of the player and their ID of the "unknown guild" to some random number, as well as the owner of that guild to that random number. no more "in two guilds at once". fixed it for me and another player on my server.

Emellious commented 5 months ago

@HPTD1 how were you able to tell which player name and which guild id to change. Any chance you’d have a screenshot so I know what to look for?

onegamer1 commented 5 months ago

In my case, I noticed some players who can't pickup belong to multiple guilds. I've removed such guilds with comparing last_online_real_time.

Here's the actual script I executed: https://github.com/mtsmfm/palworld-utils/blob/2c54db823fcea86211fca9e752a6e4a96284e3f0/cli/index.ts#L114-L160

Hope it helps.

@mtsmfm sorry im new, how do i run this script?

Kaaaaarrrll commented 5 months ago

I made changes to the script to delete the newly created group and update the old group with the new player ID. I also adjusted the OwnerPlayerUId and OldOwnerPlayerUIds of the Pals. This resolves the pickup problem on my site. Since I didn't want to interfere with binary data, I had to modify the script significantly. Consequently, I created a new repository for it at JannikBirn/palworld-host-save-fix instead of submitting a pull request. If this solution works for most of you, I can submit a pull request if @xNul agrees. This would involve substantial changes to the code. Alternatively, you can adjust your code to incorporate the adjustments I made to work with your binary modifications.

I just made my dedicated server yesterday, converting the file with this yesterday, and I'm dealing with this issue now - what do I do?

I think you used the the tool by @xNul, not by @JannikBirn. Use this one for now: https://github.com/JannikBirn/palworld-host-save-fix

Ah shit you are right... damn. With saying "use this one for now" are you saying I can fix the save just by putting it through this other host-save-fix? Already put a lot of work into the save where pals can't be picked up, so don't want to lose that work. Sooounnddss like I'm gonna need to scrub through and delete lines in json files or something?

n4t3py13 commented 5 months ago

@JannikBirn Thank you for your work, my friends and I appreciate it. I'm trying to run the tool to fix the pal pickup issue and running into this error as it seems to be wrapping up:

image

failed

Any ideas? If you're available to chat on discord I am zennagos

HPTD1 commented 5 months ago

@HPTD1 how were you able to tell which player name and which guild id to change. Any chance you’d have a screenshot so I know what to look for?

the problem was double entries for guilds, both the real and the fake guilds had the same player in it, searching for the player name or ID works. the guilds were unnamed guilds, unlike the real guilds, also the buggy guilds were lvl 1. changing the players in those guilds by changing the player name and ID in the fake guild and the Guilds ID itself, which use the same ID the player does (founder?) worked for me.