Z1ni / XGP-save-extractor

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

Support for TUNIC #106

Closed jacobhokanson closed 3 months ago

jacobhokanson commented 9 months ago

Game name: TUNIC

Game package name: Finji.TUNIC_tys0ffscxatjj

wgs.zip

jacobhokanson commented 9 months ago

More info:

steam.zip contains

The contents of my extracted SAVEDATA file are similar to what is stored in my steam .tunic files, but theres some metadata at the top as well as a bunch of other binary junk that doesn't display in text ( 001018044196~001018044334.tunic on left , SAVEDATA from XGP-save-extractor on right) image

Heres the head of that SAVEDATA in hex editor image

Also, my save file is mostly complete, so the SAVEDATA generated is ~13k lines

jacobhokanson commented 9 months ago

ALSO I don't know why I didn't try this first, but I copied the save from wgs/xxxx/xxxx to %userprofile%\appdata\locallow\Andrew Shouldice\Secret Legend\SAVES and renamed it to 001018044196~001018044334.tunic (replacing the starter save I created).

I'm able to load up the save but it sort of seems like it combined my original save with a special puzzle save that gets created for you after reaching a certain point in the game (most things seem correct except playtime)

File 1 is the starter file, steam cloud sync put it back File 2 is my gamepass file but it shouldn't have max playtime or that gold icon image

Here is what a normal save and the special save normally look like: image

Z1ni commented 9 months ago

I just saw the same save format for Death's Door, which seems to use serialized .NET classes, like Tunic here. See #79. It seems that like in Death's Door, the Steam version uses separate files whereas the Game Pass version uses serialized .NET lists that contain the data for multiple files.

It's maybe possible to extract the saves by parsing the serialized data, but that requires more work than just renaming files.

Z1ni commented 9 months ago

Maybe some Googling would find the save system the games use? As the structure and class names are so similar/identical, I'm guessing that these are created by some Unity plugin etc. I did some quick searching by the class names, but didn't find anything (but I spent maybe a minute or two, so your mileage may vary).