Hi,
Nice to meet you! I am a fellow user.
The easiest way is to sign in on a friends device who owns the game.
The hard way
If you don't have a friend who owns the game accessing the save is rather difficult. There is no GUI to download saves, but there is an API.
You will need the games SCID, PackageIdentityName, and PublisherCertificateName.
Finding the product ID
Find the game on the Xbox store website. Make sure you are on the page for the game itself, not a bundle containing the game. Example:
❌https://www.xbox.com/en-AU/games/store/minecraft-java-bedrock-edition-for-pc/9nxp44l49shj (this is a bundle)
✅https://www.xbox.com/en-AU/games/store/minecraft-for-windows/9nblggh2jhxj (this is a game)
The product ID, a.k.a bigId, is the numbers and letters at the end of the address. In this case (9nblggh2jhxj)
Finding the package name and title ID from product ID
Go to this address, replacing <productID> with the product ID you found in the previous step:
https://displaycatalog.mp.microsoft.com/v7.0/products?bigIds=<productID>&market=US&languages=en-US,neutral
Search the page (ctrl+F) for XboxTitleId, PublisherCertificateName, and PackageIdentityName.
Record these values.
Finding the probable SCID from XboxTitleId
Convert the title ID into base 16. E.g. 896928775 -> 35760C07
Prefix the hexadecimal tilte ID with 0s so it looks similar to this:
00000000-0000-0000-0000-000035760C07 (Don't try using this example value.)
This isn't guarantied to be the SCID but it often is.
Recovering your save
After you have the SCID and PublisherCertificateName and PackageIdentityName, create a file called MicrosoftGame.Config:
<?xml version="1.0" encoding="utf-8"?>
<Game xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
configVersion="1">
<Identity
Name="replace this with the game's PackageIdentityName"
Publisher="replace this with the game's PublisherCertificateName"
/>
<ExtendedAttributeList>
<ExtendedAttribute
Name="Scid"
Value="replace this with the game's SCID" />
</ExtendedAttributeList>
</Game>
Remember to replace all placeholders with the correct values.
Using the Game Development Kit compile the following:
#include <stdio.h>
#include <windows.h>
#include <xgameruntime.h>
const char SCID[] = "Replace this with the games SCID";
char done = 0;
void AfterUserAdd(XAsyncBlock *asyncblock)
{
HRESULT hr;
XUserHandle xuser;
XGameSaveProviderHandle providerHandle;
hr = XUserAddResult(asyncblock, &xuser);
if (FAILED(hr)) {
printf("XUserAddResult HRESULT: %x\n", hr);
return;
}
hr = XGameSaveInitializeProvider(xuser, SCID, false, &providerHandle);
printf("XGameSaveInitializeProvider HRESULT: %x\n", hr);
if (FAILED(hr)) {
printf("Failed to download save.\n");
return;
}
XGameSaveCloseProvider(providerHandle);
printf("Done. Your save should be somewhere in AppData\\Local\\Packages.");
done = 1;
}
int main(void)
{
HRESULT hr;
hr = XGameRuntimeInitialize();
if (FAILED(hr)) {
printf("Failed to initialize xgamruntime: %x\n", hr);
return -1;
}
XUserAddOptions options = XUserAddOptions::AddDefaultUserSilently;
XAsyncBlock xasync;
ZeroMemory(&xasync, sizeof(xasync));
xasync.callback = AfterUserAdd;
hr = XUserAddAsync(options, &xasync);
if (FAILED(hr)) {
printf("XUserAddAsync HRESULT: %x\n", hr);
}
while(!done) {} /*Prevent the program returning before the save is downloaded.*/
return 0;
}
After placing the .config and the .exe in the same directory, running the .exe should download your save to C:\Users\YourUsername\AppData\Local\Packages\NameOfGame\wgs\.
Recovering the save from Mac or Linux: Work in progress
Thank you for the fun challenge. I hope a GUI or at least a CLI will be added in the future.
Kind regards,