XGP-save-extractor icon indicating copy to clipboard operation
XGP-save-extractor copied to clipboard

Possible to go the other way from steam save to xgp?

Open SirShaw opened this issue 1 year ago • 42 comments

Not an issue but some folks (including myself) bought this on steam only to realize that it was included with game pass later and have some progress we want to import from steam. I dont know how easy this would be to implement or if its even possible to have this tool go the other way. So steam to xgp.

SirShaw avatar Sep 06 '23 00:09 SirShaw

Agreed. Would love to have the other way supported.

jakest avatar Sep 06 '23 00:09 jakest

Is this really necessary! A lot of people started playing the version that was pirated (steam) and now that it was released on gamepass, they want to change the version...

rubensmello avatar Sep 06 '23 01:09 rubensmello

I would absolutely love this if at all possible. Thanks for all your hard work

murder46 avatar Sep 06 '23 01:09 murder46

Agreed would love this feature

DrDoakes avatar Sep 06 '23 01:09 DrDoakes

Same here would love to go from Steam to XGP!

NSFLscott avatar Sep 06 '23 01:09 NSFLscott

I really need this feature now that I'm moving to gamepass

tggoulart avatar Sep 06 '23 02:09 tggoulart

this would be extremely helpful

Mapedmaker avatar Sep 06 '23 02:09 Mapedmaker

Need this too. Thanks for the developer!

JupiterOdyssey avatar Sep 06 '23 04:09 JupiterOdyssey

I detect the save game folder but Gamepass use another system for store saved points. Is posible reverse the .sfs files to the model of Gamepass? Thanks!

Xmentiroso avatar Sep 06 '23 04:09 Xmentiroso

I think soulution i here: https://github.com/Z1ni/XGP-save-extractor/issues/5#issuecomment-1705730567 but... I dont understand it.

tosziro avatar Sep 06 '23 05:09 tosziro

I'm also waiting for a decision, I want to switch to game pass, but I don't want to lose the progress received in the torrent version. I will be grateful for the answer

MiriaWeakSmile avatar Sep 06 '23 05:09 MiriaWeakSmile

I'll try to look into this later today.

Z1ni avatar Sep 06 '23 05:09 Z1ni

If you need any help testing the steam -> xpg conversion, I've got appropriate savegames and installations that aren't a big loss if broken.

alexdie avatar Sep 06 '23 11:09 alexdie

Yeah I would really appreciate this too!

Amnessie avatar Sep 06 '23 12:09 Amnessie

I was hoping to be able to use the 'load' command in console to load my save, I've tried putting it everywhere during the game running hoping I find some cache folder, but that did not work out for me. I hope you will be able to convert the saves, or at least that somebody else will read this post and manage to implement my idea.

Whatevser avatar Sep 06 '23 12:09 Whatevser

I'll try to look into this later today.

thank you, really need this feature, starfield

z7ui avatar Sep 06 '23 12:09 z7ui

You're all absolute legends, you got this!

MoonlitWisp avatar Sep 06 '23 12:09 MoonlitWisp

This is not only helpful to pirates @rubensmello being able to download steam saves and use them for game pass games would be an excellent software that someone should have made a while ago. The process of getting a steam save to a game pass save is a pain and would be nice to have a software that does it especially if it works on other gamepass games😁

Bcawesomer avatar Sep 06 '23 13:09 Bcawesomer

I think the problem is that the saves are encripted (i think) and the encryption key is changed with each game, you have some tools like GPSaveConverter, i tried and wasn't able to get anywhere (no updates since January) and also another was this MollysGameSaveMule witch alow the bi-directional save transfer only for Deep Rock Galactic, but with the idea of the games on gamepass being temporary and that now with this services even your saves are not your's anymore i think this aplication would be a great thing for people who would like to have their saves... well safe Also for new game plus saves on nexus would work either if it is steam or XGP

MrN0ss avatar Sep 06 '23 13:09 MrN0ss

GPSaveConverter can be helpful but not in the way it supposed to function being how it does not work you can use it to find the name of each sting and change the time modified in order to find which one is the save. Thats what im here for too i want a new game plus save.

Bcawesomer avatar Sep 06 '23 14:09 Bcawesomer

I managed to split save file to container parts based on this comment. I tested it by converting XGP saves to nonXGP and splitting them back. They seem to be identical except for the padding part. I also tried to run it on my nonSGP 10 MB save, it created 115 parts. It would be great if someone confirms if it is okay for large saves in XGP. Now need to understand how to create index files. ps Please don't judge my code, I'm not a programmer and first time working on a byte level 😅 image

import os
import zlib

tmp_files_path = "F:\\TEMP\\saves"
save_file_path = "C:\\Users\\miffr\\Documents\\My games\\Starfield\\Saves"
save_file_name = "1.sfs"

def write_file(file_index, data):
    with open(os.path.join(tmp_files_path, f"container{file_index}"), "wb") as container_part:
        print("Writing file")
        container_part.write(bytes(data))
        print(f"File name container{file_index}")
    return

def main():

    with open(os.path.join(save_file_path, save_file_name), "rb") as save_file:
        position = 0
        byte_1 = b"x"
        byte_2 = b"^"
        tmp_bytearray = bytearray()
        files_found = 0
        while(byte := save_file.read(1)):
            if(byte == byte_1):
                position = save_file.tell()
                next_byte = save_file.read(1)
                save_file.seek(position)
                if(next_byte == byte_2):
                    if(files_found == 0):
                        write_file(files_found, tmp_bytearray)
                        files_found += 1
                        tmp_bytearray = bytearray()
                    else:
                        try:
                            print("try to decompress")
                            zlib.decompress(tmp_bytearray)
                        except zlib.error as z_exept:
                            print(f"Failed to decompress: {z_exept=}")
                        except Exception as e:
                            print (f"Failed to decompress: {e=}, {type(e)=}")
                        else:
                            write_file(files_found, tmp_bytearray)
                            files_found += 1
                            tmp_bytearray = bytearray()

            tmp_bytearray += byte
        write_file(files_found, tmp_bytearray)
        print(f"Containers found {files_found}")

if __name__ == "__main__":
    main()

miffril avatar Sep 06 '23 14:09 miffril

hello, tell me what to do with this code?

berdmanus avatar Sep 06 '23 15:09 berdmanus

@berdmanus It's not entirely complete yet.

EffortlessFury avatar Sep 06 '23 15:09 EffortlessFury

@miffril Would it not be possible just to paste that into the containers that are already there?

I was looking into it before but staring at hex for too long hurts my brain.

SherbyHomes avatar Sep 06 '23 16:09 SherbyHomes

Please, someone make it happen. I like to play on XBOX Series X, but I did start game before lunch on pirate version. Now I stuck on PCMR.

SzzzAK999 avatar Sep 06 '23 16:09 SzzzAK999

Zencq created a great save game editor that works both ways for No Man's Sky. https://github.com/zencq/NomNom The saves in Steam and in Xbox are very similar to Starfield.

jibs92 avatar Sep 06 '23 16:09 jibs92

@SherbyHomes I don't know how names are generated. I guess they are just random numbers. Those names should be put inside index file. I'm trying to understand right how those indexes are working. If their only purpose is to list filenames, I think it's possible to just create a savefile from the game and then replace this XGP save files with renamed files generated using my script. Quantity of files generated from big saves is the open question right now. I generated 115 files from my save as I mentioned above. In this case you can't just replace dummy save from XGP because it have something about 10 files.

miffril avatar Sep 06 '23 16:09 miffril

Not sure if useful to cross the data but in https://github.com/Fr33dan/GPSaveConverter we can check those 10 file like in this image up is xbox game pass down is my "Steam" saves ;)

MrN0ss avatar Sep 06 '23 17:09 MrN0ss

starfield xgp extraction.txt heres a txt file with the container names and blob id's from my saves

MrN0ss avatar Sep 06 '23 17:09 MrN0ss

it seems that it has 10 copies of the same save in each set, i do only have the start of the game up until right after the char creation like you can see here image

MrN0ss avatar Sep 06 '23 17:09 MrN0ss