jmkl009 / PalworldCharacterTransfer

This script transfers character between worlds in Palworld, which allows friends to transfer their characters to each other's server without losing one's progress.
93 stars 5 forks source link

50mb .sav takes 30 minutes and 8GB .json file #4

Open parsamanesh opened 5 months ago

parsamanesh commented 5 months ago

Hello As the title says, using char_export tool, its converting my .sav to a 8GB .json file. Using other .sav to .json converter tools usually results in a 800mb file. Is there something wrong here?

parsamanesh commented 5 months ago

Also, can this be updated so that the level.sav.json file isn't deleted when the application is closed, that way I don't have to wait 30+ minutes per player export?

jmkl009 commented 5 months ago

For debug purposes and indexing purposes, this tool exports .sav to json with richer indexing and use pretty print by default. Sorry you have to go through this but one way to keep the 8GB .json file is to ctrl+c to exit the application instead of closing the application normally.

jmkl009 commented 5 months ago

I can modify the script to output a more compact json file but I don't think that saves much time here, as writing to and reading from the hard disk should only contribute to 2-3 minutes of time out of the 30+ minutes you are experiencing if you are doing this on a SSD.

jmkl009 commented 5 months ago

You can test if the output file size drops and the speed gets boosted by modify the line return SaveConverter.convert_sav_to_json_data(file, file.replace(".sav", ".sav.json"), False) to return SaveConverter.convert_sav_to_json_data(file, file.replace(".sav", ".sav.json"), True) Which minifies the output json and let me know if it is much faster.

parsamanesh commented 5 months ago

For debug purposes and indexing purposes, this tool exports .sav to json with richer indexing and use pretty print by default. Sorry you have to go through this but one way to keep the 8GB .json file is to ctrl+c to exit the application instead of closing the application normally.

Thanks for such a quick reply. As a suggesstion: it would be fine if the application utilized the already created .json file? Currently only .sav files can be selected so we're forced to wait each time?

jmkl009 commented 5 months ago

.json file can be selected if you managed to keep the generated json from last time by ctrl+c out of the last session of the application

parsamanesh commented 5 months ago

.json file can be selected if you managed to keep the generated json from last time by ctrl+c out of the last session of the application

Ok great will try this! Thanks

parsamanesh commented 5 months ago

image Is there any reason why it would report "success" but logging on results in no transfers?

Old Char: lvl 44 (400+ pals) New Char: lvl 2 (empty)

player .sav is 100% correct

jmkl009 commented 5 months ago

I have never heard of the case you are reporting. Please check the procedure again. Let's say the player .sav is 100% correct, what about the world saves? The source world save should be the world you are transferring from and the target is the world to transfer to and from your screenshot it seems the target should be the server's save.

parsamanesh commented 5 months ago

Thanks, upon further research it became clear I had two separate Palworld ID's. Everything works excellent and thank you so much for your time.

Would it be possible to create a version of this which pulls ALL player saves from one level.sav on server 1 to another server? Effectively this would create a new Palworld with all original characters / pals / items in inventory. I'm thinking that this could potentially be an excellent tool for server hosts to wipe server structures to recover Server FPS without wiping all players who actively play?

jmkl009 commented 5 months ago

It would be possible, but I don't intend to do it right now. Maybe sometime in the future when I get time to work on this. Currently it is still doable just a bit less efficient, LOL.

magicbear commented 5 months ago

I have write a super fast tools for the big file, not need to convert json again~ And have the GUI, you can see https://github.com/magicbear/palworld-server-toolkit

parsamanesh commented 4 months ago

I have write a super fast tools for the big file, not need to convert json again~ And have the GUI, you can see https://github.com/magicbear/palworld-server-toolkit

Thanks, though it seems this tool does not have GUI to allow transfer to a different server .sav

magicbear commented 4 months ago

I have write a super fast tools for the big file, not need to convert json again~ And have the GUI, you can see https://github.com/magicbear/palworld-server-toolkit

Thanks, though it seems this tool does not have GUI to allow transfer to a different server .sav

The tools have, use backup file to open different server.sav

parsamanesh commented 4 months ago

I have write a super fast tools for the big file, not need to convert json again~ And have the GUI, you can see https://github.com/magicbear/palworld-server-toolkit

Thanks, though it seems this tool does not have GUI to allow transfer to a different server .sav

The tools have, use backup file to open different server.sav

Thanks for response. But sorry its a little unclear to me. I can only select 1 main source file OR 1 backup file, I cant select both at the same time to select players.

Could you write a brief step by step for moving a player from server to server please?

magicbear commented 4 months ago

I have write a super fast tools for the big file, not need to convert json again~ And have the GUI, you can see https://github.com/magicbear/palworld-server-toolkit

Thanks, though it seems this tool does not have GUI to allow transfer to a different server .sav

The tools have, use backup file to open different server.sav

Thanks for response. But sorry its a little unclear to me. I can only select 1 main source file OR 1 backup file, I cant select both at the same time to select players.

Could you write a brief step by step for moving a player from server to server please?

You need to copy the Players sav file to Players folder for move.

Reference: https://github.com/magicbear/palworld-server-toolkit/blob/master/README.en.md#migrate-difference-server-to-single-server

jmkl009 commented 4 months ago

@parsamanesh The current version improves over loading speed and is 100x times faster than before, 1/3 faster than magicbear's implementation.

parsamanesh commented 4 months ago

@parsamanesh The current version improves over loading speed and is 100x times faster than before, 1/3 faster than magicbear's implementation.

beautiful - will check it out