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
885 stars 69 forks source link

Windows Local World > Linux Dedicated Server - Pterodactyl Egg | Unfortunately not successful in getting the players data. #47

Open JasmeowTheCat opened 8 months ago

JasmeowTheCat commented 8 months ago

Hello all.

Felt it would be right to add my issue into here so people can keep track of migrating from Windows locally to a Linux Dedicated Server like Pterodactyl's Egg and Nest system.

I am happy to provide sav files if need be. I followed every step down to a T and the script completed successfully but sadly joining still makes me make a new character.

0g6I4K 1

I do want to point out though that the file is NOT being overwritten on the server, it's the same name, so it's got something right, but not entirely.

The world exists and has all the builds, but still, sadly, the player (such as the host, me) has to re-create the character.

Accidentally closed it! Don't mind me.

JasmeowTheCat commented 8 months ago

What is interesting though is that it recognises the old name of "ABC" in the top left but makes me choose a different name anyway.

image

So i've tried:

WukerDev commented 8 months ago

I can confirm it that the error also happens to me when transferring from windows coop to Linux sevrer.

I tried all the above and got same results.

I also noticed that the pals that were in my solo host guild are now marked as wild pals, however they are still working at the base and do not attack players.

JasmeowTheCat commented 8 months ago

@WukerDev Yep, same problem error that you've described. Joining in shows the pals as wild and "aggro" but hitting them doesn't damage their health and they can still hurt you which is SUPER weird behaviour. I got flung across the map by one of them which was quite amusing and fell through the ground. Wish I recorded it.

JasmeowTheCat commented 8 months ago

Still no dice on this. Waiting on any news from @xNul

ceramicwhite commented 8 months ago

It worked for me, didn't have this problem.

I ran the script on my linux server not on a Windows machine: python fix-host-save.py /home/ceramicwhite/.cargo/bin/uesave palworld-server/game/Pal/Saved/SaveGames/0/905335F1BD2141ADA5077023847181ED 8823F3AE000000000000000000000000 00000000000000000000000000000001

Also I used the save that I ran on my linux server to test that my world was indeed there before running the script, then shut the server down and ran the command above. This may also be why it worked as a new save was created by the linux server.

goatrenterguy commented 8 months ago

I just ran into this problem too. I fixed it by doing the following:

  1. Follow the guide
  2. Connect as the host which prompts create character
  3. Create the character (I ran around and pick up a stone IDK if that matters)
  4. Leave the game
  5. Stop the server
  6. Reupload just the player file that was created from the script in the guide
  7. Join and pick your spwan and you should have you character back
Simpuhl commented 8 months ago

I just ran into this problem too. I fixed it by doing the following:

  1. Follow the guide
  2. Connect as the host which prompts create character
  3. Create the character (I ran around and pick up a stone IDK if that matters)
  4. Leave the game
  5. Stop the server
  6. Reupload just the player file that was created from the script in the guide
  7. Join and pick your spwan and you should have you character back

I followed this exactly and still get asked to create a new character.

I went from Windows to Linux (Docker)

WukerDev commented 8 months ago

@goatrenterguy I will try your method tomorrow and give the feedback

Simpuhl commented 8 months ago

Ok so I did things in this order and got a little further:

  1. Shut Down Server
  2. Moved OLD Save (Windows) to Server (Linux) - Including Player File 001 to make it easier when downloading files
  3. Started Server
  4. Logged In
  5. Created Character
  6. Logged Out
  7. Shut Down Server
  8. Downloaded Entire New Server Save
  9. Ran Script
  10. Uploaded New Player Save File only
  11. Started Server
  12. Logged in

Results:

Had to select spawn location but I got my character back, all levels, etc. However, not access to my base, so there is still an issue somewhere.

Hopefully someone can figure out how to link the guild back to the player.

Other:

One thing I noticed is that if I upload the "Level.sav" file after running the script, I loose my character and have to create a new one.

Simpuhl commented 8 months ago

I noticed this is probably why my bases are not getting transfered. What my original level.sav vs new level.sav is missing all my baseids etc.

old: (before running script) image

New: (After running script) image

I copied and pasted the data from old to new and I got my bases back (sort of)

I can now fast travel to them, and it shows the HOUSE icon in the map. But they still say belong to another guild when trying to use the palbox.

JasmeowTheCat commented 8 months ago

In Ref To: https://github.com/xNul/palworld-host-save-fix/issues/47#issuecomment-1913334692

Could you let us know how you copied and pasted that in? Pulled the JSON out while converting, or what the steps to pull it out and put it back in?

Good spot on the base ID's. I'll give this a try later and hopefully works well. I see what you mean by having to copy it to the Linux server first. It fixes any ID jank then running the script.

Simpuhl commented 8 months ago

I used this script to convert .sav to json and then back

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

I need to try and find out where else the data might be linked because I can fast travel and see bases on the map but still can't use palbox as it says it belongs to another base.

I don't got anymore time today but if someone figures it out, please post :)

Maybe they can migrate these with the script as they don't seem to transfer:

Simpuhl commented 8 months ago

In Ref To: #47 (comment)

Could you let us know how you copied and pasted that in? Pulled the JSON out while converting, or what the steps to pull it out and put it back in?

Good spot on the base ID's. I'll give this a try later and hopefully works well. I see what you mean by having to copy it to the Linux server first. It fixes any ID jank then running the script.

When you try it later let me know if you get the same result as me. I might make a new thread about this entirely

FroggMaster commented 8 months ago

It worked for me, didn't have this problem.

I ran the script on my linux server not on a Windows machine: python fix-host-save.py /home/ceramicwhite/.cargo/bin/uesave palworld-server/game/Pal/Saved/SaveGames/0/905335F1BD2141ADA5077023847181ED 8823F3AE000000000000000000000000 00000000000000000000000000000001

Also I used the save that I ran on my linux server to test that my world was indeed there before running the script, then shut the server down and ran the command above. This may also be why it worked as a new save was created by the linux server.

I did try to do this directly from my Linux Server with the original Windows save, I was able to get the world over but not the player data. Seems it doesn't really matter if you run the tool from Windows or Linux.

Edit: After loading the world data, then re-converting on Windows. I was able to copy over JUST the player save data, which allowed me to load my character. It is of course glitched to some degree as I do not have access to my base, I cannot attack more than once, nor do I have access to my guild.

FroggMaster commented 8 months ago

In Ref To: #47 (comment) Could you let us know how you copied and pasted that in? Pulled the JSON out while converting, or what the steps to pull it out and put it back in? Good spot on the base ID's. I'll give this a try later and hopefully works well. I see what you mean by having to copy it to the Linux server first. It fixes any ID jank then running the script.

When you try it later let me know if you get the same result as me. I might make a new thread about this entirely

I did what you did and restored access to my base on the map but I do indeed have the same result where it indicates that the Chests, Palbox, ETC... belong to another guild.

FroggMaster commented 8 months ago

I was able to restore complete access to my base, by copying all the GUIDs that were present in the EPalGroupType::Guild section of Level.sav. I then changed the admin_player_uid and player_uid to match the New UID.

However, all the Pals that had been deployed at my base have been removed from the game.

Simpuhl commented 8 months ago

I was able to restore complete access to my base, by copying all the GUIDs that were present in the EPalGroupType::Guild section of Level.sav. I then changed the admin_player_uid and player_uid to match the New UID.

However, all the Pals that had been deployed at my base have been removed from the game.

Can you try putting all your pals away and then doing it?

FroggMaster commented 8 months ago

I was able to restore complete access to my base, by copying all the GUIDs that were present in the EPalGroupType::Guild section of Level.sav. I then changed the admin_player_uid and player_uid to match the New UID. However, all the Pals that had been deployed at my base have been removed from the game.

Can you try putting all your pals away and then doing it?

I believe this would likely solve the issue of the Pals being missing, but I have someone else playing on the server while I was attempting to restore my base access. So to do this would mean wiping any progress they've made. I'm just going to accept the fact that they're gone.

I do also appear to still have the punching bug where I cannot attack more than once, but I'm sure leaving my guild and re-making it will fix that issue.

Edit: Leaving my guild, by joining a friend, then leaving their guild and remaking mine has corrected the issue with punching. It does seem that the conversion tool is missing numerous sections of save data.

Acru commented 8 months ago

I ran the script on my linux server not on a Windows machine:

I tried running the script on both windows and linux, converting a windows localhost player to join an existing linux dedicated server, and either way the player was asked to make a new character. Player has no guild. or cages. or anything much at all.

I tried just copying the player file alone, as suggested above, but that just caused the server to crash. Here is an excerpt, though it may not be helpful;

Application version 5.1.1.0
[...]
OS version Linux 6.6.10-76060610-generic (network name: [...])
Running 4 x86_64 processors (8 logical cores)
Exception was "SIGSEGV: invalid attempt to write memory at address 0x0000000000000003"
[...]
<CALLSTACK START>
PalServer-Linux-Test!UPalPlayerInventoryData::SetupInventoryMultiHelper_ServerInternal() [D:/works/repos/Pal_SVN/Pal-UE-App/Source/Pal/PalPlayerInventoryData.cpp:1643]
PalServer-Linux-Test!UPalPlayerAccount::ApplyWorldPlayerSaveData(FPalWorldPlayerSaveData const&) [D:/works/repos/Pal_SVN/Pal-UE-App/Source/Pal/PalPlayerAccount.cpp:187]
PalServer-Linux-Test!UPalPlayerManager::ApplyWorldPlayerSaveData(FPalWorldPlayerSaveData const&) [D:/works/repos/Pal_SVN/Pal-UE-App/Source/Pal/PalPlayerManager.cpp:409]

Could it be the script was broken by the most recent update?

ceramicwhite commented 8 months ago

I used another coop save, still worked fine. I swapped GUID back and forth from my different devices, no problems at all.

Could it be the script was broken by the most recent update? I'm using latest update.

Couple other things I forgot to mention that may be why I'm having success:

Only other thing I can think of is I've been playing around with getting mods working on the server and I do have UE4SS_Xinput_v2.5.2.zip contents extracted to ../../Pal/Binaries/Linux/

JasmeowTheCat commented 8 months ago

How we looking on this at the moment? I can try it tonight and document my steps, which I will do to give it a try.

piketz commented 8 months ago

I succeeded using this fork.. https://github.com/JannikBirn/palworld-host-save-fix Apparently the problem was that there were 3 of my characters. the first one created on a home computer (Win11) logged in under A1111, moved the server to another Windows one (Win10), the user crashed. I didn’t mind, I created a new A2222. I moved the server to Docker and the login number was A1111, but nothing was saved inside. Apparently, in addition to the main GUID, there are some other identifiers..

joeflack4 commented 7 months ago

Sorry for not reading the whole issue, but even though I'm also migrating local windows save to a Linux dedicated server, I had no problem following these steps: How to migrate a Windows/Linux dedicated server save to a Linux/Windows dedicated server

I basically followed these steps verbatim. The only thing I needed to do differently was that I only needed to apply the fix to my (the host's) save file. The rest of our players transferred over just fine. So overall less work!