SL2 Analyzer
Read a FromSoftware .sl2 save and report what is in it
Loading...
Searching...
No Matches
convert.py File Reference

Go to the source code of this file.

Classes

class  sl2.convert.SaveData
 One parsed save: the game it is, its file-level fields, and its characters. More...
 

Namespaces

namespace  sl2
 
namespace  sl2.convert
 

Functions

 sl2.convert.disclaimer_for (cfg)
 One-line header note for a generated file: the repo, and how this game is read.
 
 sl2.convert.save_format_version (data, entries, cfg, game)
 The save-format version this file was written with, or None.
 
 sl2.convert.steam_owner (data, entries, game)
 The Steam account that owns this save, or None.
 
 sl2.convert.ds2_steam_owner (data, entries, game)
 DS2's account, read as text rather than as a number.
 
 sl2.convert.steam_folder (game, owner)
 The folder name the game will look for this save under, or None where the convention has not been verified for that game.
 
 sl2.convert.er_game_patch (data, entries)
 Elden Ring's game patch, decoded from its regulation version, or None.
 
 sl2.convert.footer_for (cfg, n, version=None, patch=None, owner=None, folder=None, meta=None)
 The closing "about this file" block: game, tier, slot count and the how-it-works note.
 
 sl2.convert.parse_save (data, base_dir)
 Read one save file into plain data: which game it is, and every populated character slot already augmented with its progress.
 
 sl2.convert.convert (data, filename, base_dir, meta=None, validate=False)
 Build the Markdown document for one save file.
 
 sl2.convert.render_markdown (save, filename, meta=None, validate=False, data=None)
 Render an already-parsed save as the Markdown document.
 

Variables

str sl2.convert.REPO_URL = "https://github.com/darthdemono/sl2-analyzer"
 Public source repository, printed in every generated file.
 
dict sl2.convert.GAMES
 Per-game config: title, tier, db, decrypt/parse, slot range, and a one-line "how it works" for the file header.
 
dict sl2.convert.SAVE_VERSION_GAMES = {"dsr", "ds3", "er"}
 Games that stamp a save-format version as a uint32 at slot +0.
 
int sl2.convert.SAVE_VERSION_MAX = 4095
 Above this a slot-0 word is not a version counter but data.
 
dict sl2.convert.STEAM_ID_GAMES
 Where each game stores the Steam account that owns the save: (menu entry, offset of the uint64 inside it).
 
int sl2.convert.DS2_STEAM_ID_OFF = 53
 Dark Souls II keeps the same account, but as ASCII TEXT — entry 0, offset 53, sixteen characters of lowercase hex.
 
int sl2.convert.DS2_STEAM_ID_LEN = 16
 
int sl2.convert.STEAM_ID64_HIGH = 0x01100001
 High dword of every individual-account SteamID64 (universe 1, type 1, instance 1).
 
dict sl2.convert.STEAM_FOLDER_HEX = {"ds3", "ds2sotfs", "ds2vanilla"}
 Games whose save folder is named with the SteamID64 in HEX rather than decimal.
 
dict sl2.convert.STEAM_FOLDER_DEC = {"sdt", "nr"}
 Games whose save folder is named with the decimal SteamID64.
 
int sl2.convert.ER_REG_ENTRY = 11
 Elden Ring ships its regulation (the game's own param data) inside the save, in BND4 entry 11 behind a " GER" magic — and that block is versioned.
 
str sl2.convert.ER_REG_MAGIC = b" GER"
 
int sl2.convert.ER_REG_VER_OFF = 8
 
dict sl2.convert.META_LABEL
 Display labels for metadata keys whose acronym capitalize() would mangle ("dlc" -> "Dlc", "os" -> "Os").
 
tuple sl2.convert.ER_NOTE
 Elden Ring's item-coverage caveat.
 
tuple sl2.convert.SDT_NOTE
 Sekiro's own caveat.