|
SL2 Analyzer
Read a FromSoftware .sl2 save and report what is in it
|
Functions | |
| _save_globs () | |
| Folders a Souls save can live in, per OS. | |
| auto_find_save () | |
Find a .sl2 when none was given on the command line. | |
| main () | |
| Program entry point. | |
| print_validation (save, data) | |
| Print each character's validation block to the terminal. | |
| warn_foreign_folder (path, save) | |
| Warn when a save is sitting in a folder belonging to a different account. | |
| write_out (path, text) | |
| Write the document, making the output folder if it does not exist yet. | |
Command line: argument parsing, save auto-detection, and main().
|
protected |
Folders a Souls save can live in, per OS.
Each game keeps its .sl2 in a game-named subfolder, hence the trailing */. Steam/Proton, Heroic, Lutris, and plain Wine all mirror the Windows APPDATA% tree inside a prefix, so the tail of every glob is the same .../AppData/Roaming/<game>/*.sl2.
Definition at line 23 of file cli.py.
Referenced by sl2.cli.auto_find_save().
| sl2.cli.auto_find_save | ( | ) |
Find a .sl2 when none was given on the command line.
Globs the current folder and the usual Steam/Proton and Windows save locations, and returns the most recently modified match — the live character is almost always the newest file. Exits with a clear message if nothing is found.
Definition at line 67 of file cli.py.
References sl2.cli._save_globs().
Referenced by sl2.cli.main().
| sl2.cli.main | ( | ) |
Program entry point.
Output format follows the -o extension (.json → JSON, anything else → Markdown) unless –format says otherwise, so the common case is one flag, not two.
Definition at line 90 of file cli.py.
References sl2.cli.auto_find_save(), sl2.cli.print_validation(), sl2.cli.warn_foreign_folder(), and sl2.cli.write_out().
| sl2.cli.print_validation | ( | save, | |
| data | |||
| ) |
Print each character's validation block to the terminal.
The findings are already in the document; this is so a run that was only asking "does this save add up" answers without opening the file. Stdout, one block per character, in the shape validators/text.py defines.
| save | The parsed sl2.convert.SaveData. data The file bytes, for the file-level rules. |
Definition at line 216 of file cli.py.
Referenced by sl2.cli.main().
| sl2.cli.warn_foreign_folder | ( | path, | |
| save | |||
| ) |
Warn when a save is sitting in a folder belonging to a different account.
DS3, Sekiro and Elden Ring write the owning account into the save, and the game only reads a save back from the folder named for that account — so a save whose account id changed underneath it (a Steam emulator reconfigured, a different profile) will not load, and the game says nothing useful about why. Comparing the two is free once both are known.
| path | The save file's path. |
| save | The parsed sl2.convert.SaveData. |
Definition at line 238 of file cli.py.
Referenced by sl2.cli.main().
| sl2.cli.write_out | ( | path, | |
| text | |||
| ) |
Write the document, making the output folder if it does not exist yet.
Definition at line 260 of file cli.py.
Referenced by sl2.cli.main().