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

Add Scorn support #123

Open
wants to merge 5 commits 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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Legend: ✅ Confirmed working, ❔ Unconfirmed, - Not available in the store
| Railway Empire 2 | ❔ | ❔ |
| Remnant 2 | ✅ | ❔ |
| Remnant: From the Ashes | ❔ | ❔ |
| Scorn | ✅ | - |
| Starfield | ✅ | - |
| State of Decay 2 | ❔ | ❔ |
| Totally Accurate Battle Simulator | ✅ | - |
Expand Down Expand Up @@ -77,4 +78,4 @@ Run `main.py` with Python 3.10+. The script produces ZIP files for each of the s
## Thanks
Thanks to [@snoozbuster](https://github.com/snoozbuster) for figuring out the container format at https://github.com/goatfungus/NMSSaveEditor/issues/306.

Also thanks to everyone that has [contributed](https://github.com/Z1ni/XGP-save-extractor/graphs/contributors) by adding support for new games.
Also thanks to everyone that has [contributed](https://github.com/Z1ni/XGP-save-extractor/graphs/contributors) by adding support for new games.
8 changes: 8 additions & 0 deletions games.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@
"suffix": ".sav"
}
},
{
"name": "Scorn",
"package": "KeplerInteractive.1439274AB3A46_ymj30pw7xe604",
"handler": "1c1f",
"handler_args": {
"is_scorn": true
}
},
{
"name": "Yakuza 0",
"package": "SEGAofAmericaInc.Yakuza0PC_s751p9cej88mt",
Expand Down
9 changes: 9 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,20 @@ def get_save_paths(
if handler_name == "1c1f":
# "1 container, 1 file" (1c1f). Each container contains only one file which name will be the name of the container.
file_suffix = handler_args.get("suffix")
is_scorn = handler_args.get("is_scorn")
for container in containers:
fname = container["name"]
if file_suffix is not None:
# Add a suffix to the file name if configured
fname += file_suffix
if is_scorn:
# Scorn has extensions at the end, but without the dot separator, so re-add them with the dot
if fname.endswith('sav'):
fname = fname.removesuffix('sav') + '.sav'
elif fname.endswith('info'):
fname = fname.removesuffix('info') + '.info'
elif fname.endswith('dat'):
fname = fname.removesuffix('dat') + '.dat'
fpath = container["files"][0]["path"]
save_meta.append((fname, fpath))

Expand Down