Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added SnowRunner support. #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Legend: ✅ Confirmed working, ❔ Unconfirmed, - Not available in the store
| Final Fantasy XV | ✅ | - |
| Atomic Heart | ✅ | - |
| Chorus | ✅ | ❔ |
| SnowRunner | ❔ | ❔ |

## Running
⚠️ **NOTE**: If the save file extraction fails, wait for a bit and try again. The Xbox cloud save sync can take some time and produce invalid files while syncing is in progress.
Expand Down
12 changes: 11 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"A Plague Tale: Requiem": "FocusHomeInteractiveSA.APlagueTaleRequiem-Windows_4hny5m903y3g0",
"High on Life": "2637SquanchGamesInc.HighonLife_mh7dg3tfmz2cj",
"Lies of P": "Neowiz.3616725F496B_r4z3116tdh636",
"Totally Accurate Battle Simulator": "LandfallGames.TotallyAccurateBattleSimulator_r2vq7k2y0v9ct"
"Totally Accurate Battle Simulator": "LandfallGames.TotallyAccurateBattleSimulator_r2vq7k2y0v9ct",
"SnowRunner": "FocusHomeInteractiveSA.SnowRunnerWindows10_4hny5m903y3g0"
}

filetime_epoch = datetime(1601, 1, 1, tzinfo=timezone.utc)
Expand Down Expand Up @@ -267,6 +268,15 @@ def get_save_paths(store_pkg_name, containers, temp_dir):
for c_file in container["files"]:
save_meta.append((c_file["name"] + '.sav', c_file["path"]))

elif store_pkg_name in [supported_xgp_apps["SnowRunner"]]:
# Handle SnowRunner saves just as Chorus above, but with different extension.
# All of these games use containers in a "1 container, n files" manner (1cnf), where there exists only one
# container that contains all the savefiles.
# The save files seem to be the same as in the Steam version.
container = containers[0]
for c_file in container["files"]:
save_meta.append((c_file["name"] + '.cfg', c_file["path"]))

elif store_pkg_name == supported_xgp_apps["Control"]:
# Handle Control saves
# Control uses container in a "n containers, n files" manner (ncnf),
Expand Down