Z1ni / XGP-save-extractor

Python script to extract savefiles out of Xbox Game Pass for PC games
MIT License
519 stars 32 forks source link

[Palworld] XGP-Save-Importer? #101

Open Connergood opened 5 months ago

Connergood commented 5 months ago

Hello! Love this tool, and with Palworld being on both XGP and Steam I was looking into ways of popping a save back in forth to play with xbox and steam friends. Also want my steam progress on XGP as I didn't realize it was released there. I see that there was a previous issue where another user created a tool to do this for Starfield.

You mentioned at the end of that thread you're considering adding this script to your tool. Since I have no knowledge of the structure of the Palworld save file, was wondering if you think this is possible, and if you had done any work to add this to your script.

I'd be happy to help, but figured asking before doing work that may already be in progress.

serenity44 commented 5 months ago

Would love this as well. There are already save editors and other tools being made which can be used once the saves are extracted but no way to put them back in.

PVPM commented 5 months ago

import.txt So basically i tried to write python code to import it but somehow its not working at all and i dont know why. Would really appreciate any clues what to do.

PVPM commented 5 months ago

Would love this as well. There are already save editors and other tools being made which can be used once the saves are extracted but no way to put them back in.

Oh and if ya want just to edit your gamepass save through steam editor just go to User/AppData/Local/Packages/(something that starts with PocketPair)/SystemAppData/wgs and choose last edited folder. Then change the file with long string of letters and numbers (copy that name before) to Level.sav and you can edit it with your program. Afterwards change it back to coppied name and all should work. P.S. Remember toalways backup your save files before attemting to edit them

BrianApfelbaum commented 5 months ago

Would love this as well. There are already save editors and other tools being made which can be used once the saves are extracted but no way to put them back in.

Oh and if ya want just to edit your gamepass save through steam editor just go to User/AppData/Local/Packages/(something that starts with PocketPair)/SystemAppData/wgs and choose last edited folder. Then change the file with long string of letters and numbers (copy that name before) to Level.sav and you can edit it with your program. Afterwards change it back to coppied name and all should work. P.S. Remember toalways backup your save files before attemting to edit them

You are an absolute genius. This works perfectly, I can finally transfer my save from Steam to Xbox X again

HarukaMa commented 5 months ago

Importing saves into Xbox is always a finicky process as the cloud save container binary format is not documented (I believe even in the NDA-gated Xbox developer documentation), and not all fields are reverse engineered. My importer should be considered a hack because of that. It might break the container.

For save editing for this game, you can just directly edit the files in the containers as they have the same format (unlike Starfield where Bethesda decided to store individual chunks in Xbox version), but you will need to play with the container format if you want to add new things to the container.

I haven't tried but probably you can create a new game in Xbox version, then replace the save files with the steam save (file names are difficult without tools, probably comparing the file size would work?)

I'm porting the Starfield importer right now.

Z1ni commented 5 months ago

Thanks @HarukaMa.

There's some open documentation from Microsoft regarding the XGameSave API, for example this and this, but it doesn't help much when taking a look at the "raw" files. There's also some tooling (like xgamesaveutil), but I've had no success using those with existing production containers.

As this tool currently stands, I'd like to keep it one-way until we have a deeper understanding of the data format and the requirements, in which case this tool could support easy two-way transfers. It might be that we can't create valid containers without some magic Microsoft code.

HarukaMa commented 5 months ago

Yeah, those documents only described how to use it, but not the internal file structure. I believe the container is called Connected Storage, and there is another tool called gamesaveutil for that (docs here), but the XML file referred there is behind the NDA I did see somewhere that some XML formats are behind NDA but seems this one is actually documented. Haven't tried to run it though. However, as this tool is a part of Windows SDK instead of GDK, the symbols are available from Microsoft symbol server. I didn't try to look into it more though, as I wanted a clean room approach for my tool.

C3S4RM3W commented 4 months ago

@HarukaMa I see that you have created the Palworld and Starfield importers, can you maybe create one for Forza Horizon 5 as well?