Coder Social home page Coder Social logo

Comments (20)

ps3firebird avatar ps3firebird commented on September 17, 2024 3

@gjano Can you explain how you were able to convert SFS to WGS.

from xgp-save-extractor.

gjano avatar gjano commented on September 17, 2024 2

Would it be possible to implement the other way around? I.e. converting Steam save into XGP

from xgp-save-extractor.

gnobre29 avatar gnobre29 commented on September 17, 2024 1

Yes I have also been unable to understand how to do it only from the comments here... Sorry if it's a stupid question

from xgp-save-extractor.

Z1ni avatar Z1ni commented on September 17, 2024

I could look into it, but I only have the Steam version.

If you have the MS Store / Game Pass version and don't mind sharing your save with me, could you check %LocalAppData%\Packages and see if there's anything related to Starfield. If so, could you share the contents of SystemAppData\wgs inside the Starfield-related folder?

You can send me an email if you don't want to share the save file publicly.

from xgp-save-extractor.

jjorstad2 avatar jjorstad2 commented on September 17, 2024

from xgp-save-extractor.

Z1ni avatar Z1ni commented on September 17, 2024

Can you please test the PR (if you also have the Steam version), as I didn't want to risk my current Starfield save 😄

from xgp-save-extractor.

Z1ni avatar Z1ni commented on September 17, 2024

Oh and the Steam version SFS save files live in C:\Users\username\Documents\My Games\Starfield\Saves

from xgp-save-extractor.

jjorstad2 avatar jjorstad2 commented on September 17, 2024

The saves were out of order in game list but they loded just fine on the steam version of the game thank you

from xgp-save-extractor.

Z1ni avatar Z1ni commented on September 17, 2024

Great, thanks for testing!

from xgp-save-extractor.

Z1ni avatar Z1ni commented on September 17, 2024

Maybe, but the WGS container index (the containers.index file) has some fields that I don't know the meaning of, so I don't really know how to reconstruct those. Maybe the information floats somewhere on the internet or maybe the values are not really used.

Either way it would require some extra research, which I might do some day. No promises here currently.

from xgp-save-extractor.

gjano avatar gjano commented on September 17, 2024

For other, simpler, games where 1 data file in WGS corresponds to 1 file in non-WGS I have just copied data from the non-WGS save into the containerized file (keeping the WGS header) and it worked (the save even works in XCloud then) so I guess at least containers.index does not contain checksums or even sizes (or it did not for those games). My guess is just being able to convert a SFS file into a container (i.e. a container.2 file + bunch of data files) should do it, then you'd just need to replace an existing container with the exported one. However I am missing the logic to split the original SFS file. Reconstructing is easier since you just need to append all of them in the right order but I have noticed they are not the same size so I guess there is a logic behind it. Maybe a container with a single data file would work... will try when I have the opportunity.

from xgp-save-extractor.

gjano avatar gjano commented on September 17, 2024

All "chunks" seem to begin with 78 5e. I have checked my own non-WGS save and in fact if I search for aligned occurrences of 78 5e most of the times they are preceded by some padding. However in some cases they are not, so it is unclear whether the previous block just randomly happened to have the right size or the block is actually a false positive. I guess the size is stored somewhere in that block header but I couldn't figure it out yet (also not sure what size to look for, the full block, the block minus the header for which I don't know the length...)

from xgp-save-extractor.

Z1ni avatar Z1ni commented on September 17, 2024

The chunks are padded to the next 16-byte boundary with the repeating string padding\0, where \0 is NUL. If the chunk size is a multiple of 16, there's no padding.

from xgp-save-extractor.

gjano avatar gjano commented on September 17, 2024

I know, what I mean is if a block happens to have a size which is a exact multiple of 16 (so it does not need any padding) it is hard to tell if it is indeed a block or not. E.g. this one is the beginning of a block for sure:

image

But this one could be a block or maybe a random 78 5e just happened to be aligned:

image

Like I said I guess somewhere after 78 5e you have the size of the block (or part of it) so you could be 100% sure.

from xgp-save-extractor.

gjano avatar gjano commented on September 17, 2024

These 785E blocks are compressed using Zlib. So when a block fails to decompress, that means it's incomplete, so I append the next one. By doing this I think I have managed to convert a SFS file into a container. At least all the individual files except for the one corresponding to the beginning of the SFS file (BCPS header) can be decompressed using Zlib and they seem to contain meaningful information. Will try actually injecting them into the game when it launches on XGP.

from xgp-save-extractor.

gnobre29 avatar gnobre29 commented on September 17, 2024

Anyone test out Steam -> XGP save file conversion yet?

from xgp-save-extractor.

gjano avatar gjano commented on September 17, 2024

I can confirm the method I described above works for this purpose.

from xgp-save-extractor.

NSFLscott avatar NSFLscott commented on September 17, 2024

Yea, I'd love to be able to go from SFS to WGS as well!

from xgp-save-extractor.

Juar99 avatar Juar99 commented on September 17, 2024

Same!

from xgp-save-extractor.

Z1ni avatar Z1ni commented on September 17, 2024

Tracking the Steam -> XGP conversion in #11, so I'm locking this issue.
Thanks @gjano for figuring out the details!

from xgp-save-extractor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.