Puts a short plain-text block (25 lines at most) on the clipboard: the Leonida commit, Windows version, the card the newest d3d12 play log names, the play settings in effect and up to 10 scrubbed error lines of that log. The block builder and the scrub (home folder, hex runs, 0x values, hex-like names after shader stage words, program/shader/pipeline/pso/hash values, 200-character cut) are pure functions in tools/bug_report_info.py. The driver version and, mostly, the video memory are not in the runtime's log and read "not in the log". No game data, no paths. Claim: LAUNCHER-COPY-REPORT (#3312) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 KiB
The Mandy Launcher
The Python launcher has the Mandy name and the layout of the launcher mockup, its indigo taken toward a neutral night:
violet and pink only on the PLAY pill, the rail's mark and the switches that are on; Mandy in the rail with the
update state (the same coloured dot as the Updates card), commit, card and driver under it; and cards on every page. The folders it
reads and writes keep the Leonida names (%APPDATA%\Leonida, %LOCALAPPDATA%\Leonida), so no setting, cache or
save moves.
A desktop window for the port, in the usual shape of a game launcher: a narrow navigation column on the left and pages of cards. It is Leonida's own design: no other company's name, logo, font or artwork, no picture files, and no game assets in the repository. It is not an official product.
Starting it
- Windows: double-click
Launcher.batat the repository root. It looks for Python 3.12 or newer with Tcl/Tk (the window needs it): thepylauncher's versions,pythonon PATH, then the per-user installs under%LOCALAPPDATA%\Programs\Python. Without one it asks, then installs Python 3.12 for your user account only (no admin): winget if present, else the python.org installer pinned and checked against its SHA-256, the same oneBuild.batuses, with Tcl/Tk.LEONIDA_PY_INSTALL_DRYRUN=1prints those commands and runs nothing. - Linux:
python3 tools/leonida_launcher.py(needs Tkinter: thepython3-tkpackage).
Standard library only (tools/leonida_launcher.py). The window tells Windows it draws at the screen's own scale, so
its text is sharp at 125-200 %; sizes in pixels follow that scale. Nothing slow runs on the window's thread before
it first draws (no picture is read at all; git and the card's name are read by workers), so it cannot open white.
An error in a button's code is written into the output box instead of being lost.
Languages
English, French, Spanish, Portuguese and German. The launcher follows Windows' display language
(GetUserDefaultUILanguage; on Linux the LANG-style variables) and falls back to English; Language in
Settings overrides it. The translations are tools/launcher_i18n/<code>.json, each mapping the English text in
tools/leonida_launcher.py to its translation: a text without one shows in English. A new text in the launcher
needs its line in every file, which tests/test_leonida_launcher.py checks (same keys, same {fields}).
Pages
-
Play: three cards.
- Play: the PLAY pill runs
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\play-d3d12.ps1 -Game <folder> -Data <folder>plus the switches chosen in Settings (on Linuxscripts/play-linux.sh <folder>/game_scarlett_master.exe, with--series-xif chosen). Under it: the state, the game folder (while none holding the game is set, a box with Choose game folder, the same picker as Settings', saved at once; PLAY without one opens that picker and starts once a folder with the game is chosen), a one-line warning while the profile the next PLAY runs is Series X and the commit limit is under 64 GiB (as in Settings, below; that profile is the launcher's when it was changed since the last PLAY, otherwise the F1 menu'sLEONIDA_MENU_CONSOLEwhen the menu saved one, as the scripts decide it, below), the options PLAY passes and what the in-game F1 menu saved (below). The state reads a few of the script's own messages: Starting, Building the runtime, Preparing shaders, Running (a guess from the text; the log is the truth); at the end it says the game closed, closed right after starting (with what to send), or stopped with an error code. Only one thing runs at a time: while it runs PLAY becomes Stop, which, after a confirmation, ends the process and everything it started (taskkill /T /F; on Linux the process group). - Updates: up to date, how many updates there are, or why it cannot tell (a zip copy, no git, no branch to
follow, a failed fetch); the time of the last check with Check now; what is new, one line per new commit on
the followed branch's first-parent line (a merged pull request is named
#Nand its title), six at most and "+ n more"; and Update Mandy when there is something to take. - Output: the script's output, with Run in diagnostic mode and Copy my info. The window takes at most
2 000 lines a turn, each run of them in one insert, and comes back after 10 ms while more is waiting, so a run
that floods the pipe (the runtime's stderr without
-Log) leaves the window answering (take_output, the design of #3192).
The rail shows the same update state at its bottom, with the time of the last check.
Copy info for a bug report (the Output card and the Tools page;
tools/bug_report_info.py) puts at most 25 short lines of plain text on the clipboard, to paste in Discord or in a GitHub issue: the commit and date, Windows' version, the card the newest%LOCALAPPDATA%\Leonida\logs\play-*.lognames (the runtime logs no driver version, and the video memory only withLEONIDA_ADAPTER: those read "not in the log"), the profile, resolution, upscaler, frame generation, switches andLEONIDA_*values PLAY runs with, and up to 10 error lines of that log. Each log line is scrubbed: home folders become%USERPROFILE%, hex runs of 8 digits or more,0xvalues, hex-like names after a shader stage word and the values ofprogram=,shader=,pipeline=,pso=andhash=are removed, and lines are cut at 200 characters. It holds no game data and no paths; read it before pasting anyway. - Play: the PLAY pill runs
-
Settings: the page of the launcher mockup OreoFR chose: cards in two columns with switches, segmented choices and lists, a short line under some options and the longer text when the pointer rests on one; saved with Save (PLAY saves too):
- Picture: the profile (Series S is
-SeriesS; Series X is the script's default), DLSS (off is-NoDlss), the DLSS mode (-Dlss quality|balanced|performance|ultra, Auto = none; on Series X DLSS makes the picture only with one), the resolution (-Resolution, Default = none, left out with a DLSS mode), the window shape (-Aspect: Default = none, which is 16:9; your screen's =auto, 21:9, 32:9 or 16:10; a shape saved otherwise,W:Hor a decimal, is kept as a choice of its own; the game still draws 16:9 inside it), how the picture fills that window (-PresentScale: Fit, the script's default with-Aspect, passes nothing, or Stretch; greyed while the shape is Default, since the script only takes it with-Aspect) and-Quality. With Series X chosen and Windows' commit limit (RAM + page file,GlobalMemoryStatusEx) under 64 GiB, a warning-coloured line under the profile gives the PC's RAM and limit: the profile commits about 59 GB, so expect stutters and frame generation cutting in and out (every frame over 100 ms resets it); it suggests Series S or a fixed page file that brings the limit to about 80 GB, and the pointer on it shows the steps (sysdm.cpl> Advanced > Performance Settings > Advanced > Virtual memory > Custom size) with a size for this PC. It follows the profile control before Save, blocks nothing and changes no switch; when the F1 menu saved another console, the profile's "F1 menu: Series X" line (below) says so. The page-file steps and the measurements are in d3d12/docs/windows-memory.md. - Frame generation: the mode, DLSS, FSR 3 (
-FsrFrameGen, AMD's FSR 3 frame generation) or Off (-NoFrameGen); the multiplier of DLSS's, Auto (nothing passed: the script's own choice, 2x on RTX 40 and 50 with NVIDIA's files) or 2x to 6x (-FrameGen n, the rangeplay-nvidia.ps1takes), passed with the DLSS mode only (Off wins over FSR 3, FSR 3 over the multiplier). 3x and up are marked RTX 50: the scripts pass any of them whatever the card, and the runtime makes no more than the card does (fg.rsasks Streamline for its most), so an RTX 40 makes 2x and logs that it was asked for more; a card without DLSS frame generation starts none. On Series X a multiplier also brings DLSS in (-Dlss qualityunless a mode is chosen), where Auto leaves the title's own path. A multiplier saved by the older launcher shows as chosen and can be set back to Auto. Then the frame limit, Auto (nothing passed: the runtime's followed limit), 30, 40, 60 or No limit (LEONIDA_FG_LIMIT_FPSthrough-More);-SmoothMotion. With hardware ray tracing the card followsplay-nvidia.ps1's rule (#3230): frame generation runs only when asked for (the script's automatic 2x never comes with ray tracing), so with the DLSS mode and the multiplier on Auto a muted note says to choose 2x; the launcher never picks it. On the Series X profile with under 20 GB of video memory the script leaves it off, so the mode, multiplier and limit are greyed with a note giving that reason, unless the advanced options holdLEONIDA_FG_WITH_RT=1(then they stay live and the note says it is unlocked);LEONIDA_FG_WITH_RT=0greys them on both profiles. The profile is the one the next PLAY runs (the F1 menu's console when the launcher's has not changed since the last PLAY, as for the memory note), and the video memory is read as the script reads it:HardwareInformation.qwMemorySizeunder the display adapter class (below), the largest, or the chosen card's when a card is chosen in Graphics card; unknown (0) holds nothing back. The launcher never addsLEONIDA_FG_WITH_RTitself. - Ray tracing: Off or Hardware (
-HardwareRT, a trial). Software ray tracing (-RayTracing) is no longer offered; a software choice saved by an older launcher is dropped at the next Save or PLAY. On an AMD or Intel card a muted note says it is not tested there yet; it is never greyed. - Shaders: shader preparation (off is
-NoPrecompile) and full pipeline precompilation; fresh settings enable both, and turning the full one off with the preparation on passes-PrecompileUsed. Turning the full one on turns the preparation on. With the note on NVIDIA's shader cache size. - General, diagnostics & advanced: the language, the graphics card (
-Adapter: Default = none, Windows' own choice; otherwise a card of this PC by its name, which the runtime looks for in each card's name, any case),-Log, crash tracing (LEONIDA_D3D12_DRED=1), the update check, and Advanced options:LEONIDA_*variables asNAME=valueseparated by;, for when someone asks you to try one (they win over the frame limit above). A part that is not such a pair is shown in red and not passed. With variables to pass, PLAY starts the script withpowershell -Command "& '...\play-d3d12.ps1' ... -More @{NAME='value'}", since-Filecannot hand over a hashtable (play-nvidia.ps1clears inheritedLEONIDA_*variables, so-Moreis the way in); every argument is single-quoted, a quote doubled. The graphics card list is read from the registry,DriverDesc(and the card's memory,HardwareInformation.qwMemorySize, for the rules above) underHKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\00NN(winreg, about 10 ms the first time and under 1 ms after), each name once, without Windows' software adapters (Microsoft Basic Render Driver and the like) and drivers that are not on the PCI bus (virtual displays). A driver left by a card taken out of the PC can still be listed; chosen, the runtime logs that it names no card and uses Windows' default. Off Windows, or when nothing reads, the list has Default only; a saved value no card gives (#1) is kept as a choice. Advanced mode…, beside that field, opens a second window (one at a time; a second click brings it to the front) with everyLEONIDA_*variable of d3d12/docs/switches.md, read from the repository when it opens (682 names today; without the file the window says so). That file is not a list of recommended settings, and the window opens with that warning and a link to d3d12/docs/findings.md. Each row has the name, its section, how the code reads it, whetherLEONIDA_ABcan turn it, the NVIDIA launcher script sets it or findings.md names it, the code's comment (two lines; the pointer on it shows all of it) and the value: a switch for the kinds "off unless set and not0" (on writes1) and "on,0turns it off" (off writes0), a text otherwise. Names and comments come from the code and stay in English. A search over names and comments, a section filter, Only what I set and Only those the play script sets narrow the list; only the rows on screen exist, so filtering the 682 names takes a few milliseconds. It edits the same field, nothing else: Apply or Close writes the changed names into it (a value set adds or updates its pair, a value cleared removes it), so the field's checks and the frame generation + ray tracing unlock run as if it had been typed; pairs the list does not know and parts that are not pairs are kept as they were written, and a value with"or;is refused. Reset all (after a confirmation) clears every listed name. Nothing is set by default, so PLAY's command does not change until a value is applied. Like the field, these go through-More, which wins over the F1 menu's file at a normal start. - Game folders (not in the mockup, under its cards): the game folder (a picker, and a check that
game_scarlett_master.exeis in it), the data folder (empty = the script's default) and the mods folder.
-Captureis in the diagnostics card. A control another choice makes pointless is greyed (its value is kept, and comes back when that choice is undone): frame generation's mode, multiplier and limit with hardware ray tracing on the Series X profile under 20 GB of video memory unlessLEONIDA_FG_WITH_RT=1, and withLEONIDA_FG_WITH_RT=0(see Frame generation above; a note gives the reason), the frame generation multiplier with FSR 3 or Off, the DLSS mode with DLSS off, the resolution with a DLSS mode, the frame limit with frame generation off, how the picture fills the window while the shape is Default, and shader preparation, kept on, while every pipeline is precompiled. Without an NVIDIA card (none whoseDriverDeschas "NVIDIA" among this PC's, or the card chosen in Graphics card is not one) DLSS, the DLSS mode, the DLSS button of frame generation's mode, the multiplier and Smooth Motion are greyed, with the muted note "DLSS and Smooth Motion need an NVIDIA RTX card"; FSR 3 stays. PLAY then passes them off (for_card:-NoDlss, no DLSS mode, no-FrameGenmultiplier, no-SmoothMotion; the options line on Play says so), the two switches are drawn off, and the Resolution stays live (one above the Series S's 1080 lines that a DLSS mode had left out stays out);-CardMask NoDlss,NoFrameGen,SmoothMotiongoes with it (card_mask): play-nvidia.ps1 leaves the F1 menu's saved DLSS, DLSS frame generation and Smooth Motion out of that start only, and its file keeps them for a later start on an NVIDIA card (-Chosenwould remove them from it); the menu's FSR 3 frame generation stays. With -Adapter naming a card on a PC with several, play-nvidia.ps1's automatic DLSS frame generation judges that card. The saved choices are kept and come back when an NVIDIA card is chosen. Off Windows, or when no card is read, nothing is greyed for the card. On Linux only the game folder and Series X are used. Under frame generation, DLSS, ray tracing, the profile and Smooth Motion a muted line "F1 menu: " says that the F1 menu's file holds a value for the same setting. - Picture: the profile (Series S is
-
Run in diagnostic mode (Play, Settings and Tools): PLAY with
-LogandLEONIDA_D3D12_DRED=1; when the game ends the logs folder opens, for the newest file to go with a report. -
Copy my info (the same three places): puts on the clipboard what a report needs and shows it first: the Leonida commit and its date, each graphics card with its driver (NVIDIA's own number, 621.47, from the Windows one, 32.0.16.2147), Python, Tk and Windows versions, the RAM and Windows' commit limit, the switches and variables PLAY passes, and whether the game folder holds the game. No folder names: they can carry the user's name.
-
Controls: the keyboard and mouse binds of the D3D12 runtime's stand-in pad,
LEONIDA_KBM_BINDS(gameinput.md, "Your own binds"; the runtime reads it once #3276 is in). The main default keys in short, then the player's binds as rows: where (Both, On foot, In a vehicle), the key (its button reads "Press a key…" and takes the next key or the left or right mouse button; Esc cancels; F1, F3, F4, F8, F9, Alt, Caps Lock and keys the runtime cannot read are refused with a red line) and the pad input (Cross, Circle, Square, Triangle, the shoulders, triggers, stick clicks and pushes, the d-pad, View, Menu, or Nothing, which frees the key). Add bind, a cross to remove a row, Reset to defaults after a confirmation. Every change is saved at once askbm_binds, in kbm.rs's syntax (scope:key=action;...), and PLAY passes it to-More(extra_variables); aLEONIDA_KBM_BINDSin Settings' advanced options wins, and the page says so. Entries of a saved value the page cannot read are kept as they are, shown, and written back after the rows when it saves (adding a row keeps them). Copy my info lists it with the other variables. -
Mods: the
mods\*\mod.jsonof the mods folder (this repository'smodsunless changed), with the enabled flag written back as the mod manager does it (tools/leonida_mods.py); a button opens that manager. -
Saves: the D3D12 runtime's saves under the data folder,
<data>\data\7952987A\saves\<user id>\<configuration>\<Name>~<FNV-1a 64 hex>\v<N>\{0, 1, manifest}(d3d12/crates/leonida-hle/src/modules/xgamesave.rs;tools/leonida_saves.py). Containers and their blobs are listed with size, modified time and the newest readable version. Actions: Import saves (below), back up one container or all (a ZIP in<data>\save-backups), restore one of those backups (confirmation, and the current saves are backed up first), duplicate a container under a new name, delete (the folder is moved tosave-backups\deleted, not erased), export and import a single blob, and a read-only hex and strings viewer. All of them are refused while the game is running. -
Import saves puts saves this runtime wrote elsewhere (an older install, another data folder, another PC, a kept copy; never console saves) back where the runtime reads them. The source is a ZIP or a folder, chosen in a small dialog with one button for each (Windows' pickers choose a file or a folder, not either): a launcher backup, a ZIP or folder holding saves at any level (the
7952987A\savesfolder, the user folder, a configuration folder, one<Name>~<hash>container), or a whole old data folder. Every folder named<Name>~<16 hex digits>with av<N>whose manifest reads is a save; anything else is ignored and the skipped ones are counted. Each goes to<data>\data\7952987A\saves\0009000000000001\<configuration>\<Name>~<hash>: the user folder is the runtime's constantxuser::XUID; the configuration folder is the one the source's path names (<16 hex>\<configuration>\ <container>), else this PC's only one. The runtime names that folder after the service configuration id the title passes toXGameSaveInitializeProvider(Provider::open;defaultwhen the id is empty), not after a constant of its own, so with neither the launcher asks you to start the game once and invents no name. A list (name, newest version, date, new or replaced) is shown before anything is written; when one replaces a save already there, all the current saves are backed up first (before-import). Each container is copied toimport.newbeside the saves folder and moved in with one rename; a ZIP's entries are checked as Restore checks them (no.., drive or absolute path). -
Updates: at every start the launcher runs
git fetchin its own folder and, when the clone is behind the branch it follows, lists the new commits in the Play page's Updates card (git log --first-parent HEAD..@{u}) with an Update Mandy button. Update runsgit pull --ff-only(it stops, changing nothing, if local changes or another branch are in the way), then, on Windows, rebuilds the runtime whend3d12/changed; on Linux it only says thatd3d12/changed, and the rebuild is yours to run (linux.md). A missing git, a failed check (with git's reason) or a branch that follows no upstream is shown in the Updates card and the rail instead of an update. -
A copy downloaded as a zip has no
.git. Its Updates card says so, with Update Mandy, which makes the folder a clone in place (zip_to_clone):git init,originset tohttps://github.com/ProjectLeonida/mandy.git, a fetch ofmain, a localmainfollowing it, and the index set to it with the files left as they are. Every tracked file that differs (the zip's older version or your own edit: they cannot be told apart) is then copied to%LOCALAPPDATA%\Leonida\zip-copy-backup-<date>-<time>, andmain's version is checked out over the tracked files. Files git does not track (builds underd3d12\target, caches,game_path.txt, anything you added) are left alone. Then the runtime is rebuilt whend3d12/changed, as above. If a step fails, the new.gitis removed, so the next start finds a zip copy again, never half a clone. From then on Update is thegit pullabove. Without Git, the question before the update says that Git is installed first: on Windows withwinget install --id Git.Git -e --source winget --silent(Windows may ask for permission). The launcher then findsgit.exewhere Git for Windows puts it, since its own PATH is older than the install. Without winget, and on Linux or macOS, it says how to install Git and changes nothing. From a console,python -I tools\leonida_launcher.py --update <folder>asks before installing;--install-gitanswers yes. -
Tools: update Leonida (as above), fetch NVIDIA's DLSS files (
d3d12\Get-NVIDIA-DLSS.cmd, after a confirmation: about 70 MB from NVIDIA's GitHub), rebuild the runtime (d3d12\scripts\build-nvidia.ps1), clear the shader cache (the data folder'scache-2,LEONIDA_CACHE_DIRofscripts\play-d3d12.ps1: translated shaders, pipelines and the title's prepared images; after a confirmation that gives its size, refused while the game runs; the saves indata\are not touched and the next start makes it again), fetch AMD's FidelityFX files (d3d12\scripts\get-amd-fidelityfx.ps1, alsod3d12\Get-AMD-FidelityFX.cmd, after a confirmation: about 29 MB, the two signed DLLs FSR 3 frame generation needs,amd_fidelityfx_loader_dx12.dllandamd_fidelityfx_framegeneration_dx12.dll, from FidelityFX SDK v2.4.0'sKits/FidelityFX/signedbinon AMD's GitHub intod3d12\amd-sdk\FidelityFX\bin, the folderplay-nvidia.ps1reads; each kept only with its pinned size and git blob hash and a valid signature of Advanced Micro Devices, otherwise nothing is kept), open the logs folder (%LOCALAPPDATA%\Leonida\logs) and the screenshots folder. The scripts are Windows only. -
The files the card needs, by itself (Settings > Picture > Download the files my card needs, on by default): at PLAY, before the game,
needed_filesnames the fetches the card the game runs on lacks (card_facts, the chosen Graphics card or every card): NVIDIA's DLSS and Streamline files on an NVIDIA RTX card, and AMD's FidelityFX DLLs on a card DLSS frame generation does not run on (not an RTX 40 or 50 byplay-nvidia.ps1's own test of the card's name). They run one after another in the Output panel ("Fetching the files your card needs"), then the game starts, also when one failed (the script starts without DLSS or FSR 3 then, and says so). Once the files are there nothing runs again; with the setting off, or no card read, or off Windows, nothing at all. Stop during a fetch ends the game's start too. Under Frame generation, FSR 3 chosen without AMD's files gives a note: PLAY downloads them first, or, with the setting off, where Tools fetches them. -
About: what the port is, that it runs your own copy, the credits (see
d3d12/README.md) and the licence.
The launcher and the F1 menu: which one wins
The in-game F1 menu saves its choices in d3d12\leonida-settings.txt (LEONIDA_*=value lines;
d3d12/scripts/play-nvidia.ps1 reads it at every start), and the launcher keeps its own options in launcher.json
and passes them as switches at every PLAY. For one setting, the newest choice wins:
- an option you changed in the launcher since the last PLAY is passed as chosen (
-Chosen): it wins over the F1 menu's value for the same setting, and the script drops that value from the menu file; - an option you did not change is passed again but does not count as chosen: the F1 menu's saved value, if there is one, wins;
- the advanced options, the frame limit and crash tracing (
-More) always win at a normal start.
So the launcher can show one value while the game starts with the F1 menu's. The Play card lists what the F1 menu saved ("Saved in the F1 menu", read again when the window comes back to the front and when a run ends), and Clear F1 settings deletes that file, after a confirmation and only while the game is not running: the next start then uses the launcher's options and the game's defaults. With no file or nothing in it the card says "Nothing saved in the F1 menu" rather than hiding the section, so a clear shows its result where it was asked for.
The Play card's commit-limit warning uses the same order for the console (effective_console): the launcher's
profile if it changed since the last PLAY, otherwise the menu's LEONIDA_MENU_CONSOLE (series-x or series-s)
when the file holds one, otherwise the launcher's. At the first PLAY nothing counts as changed (-Chosen none), so
the menu's console wins there too. It is read again with the menu file (focus, end of a run).
Settings file
%APPDATA%\Leonida\launcher.json (Linux: ~/.config/leonida/launcher.json), written when you press Save or close the
window. Unknown or mistyped keys are ignored.
Tests
python -I tests/test_leonida_saves.py does the same for the Saves page on fake save trees. python -I tests/test_leonida_launcher.py covers the parts without a window: reading and writing the settings, the
command line each option produces (checked against the switch names in scripts/play-d3d12.ps1), the advanced
options and their quoting, the Advanced mode window's reading of switches.md and its edits of the advanced
options (unknown pairs kept, " and ; refused), the F1 menu's file (reading it and deleting only that file), which
console the warning follows, Settings' greying (settings_rules: frame generation with hardware ray tracing over
Series S / X, 8 / 16 / 24 GB and LEONIDA_FG_WITH_RT unset / 1 / 0, and the NVIDIA-only controls on NVIDIA, AMD,
Intel or a chosen card, the registry stubbed), the output pump's batches (take_output: 10 001 lines are one insert a turn), the
translations (every text of the window in every language), the language choice, the driver number, Copy my info, the
mod list, what is new upstream (the pull requests' titles) and the Python offer of Launcher.bat.
Saves: what the bytes are, and what is not edited
- Layout. A container's folder is its name with every byte but letters, digits,
-and_written%XX(cut at 100 characters),~, and the 64-bit FNV-1a of the exact name in 16 hex digits. Inside, the highestv<N>whosemanifestparses is the container; the manifest is u32-LE-length-prefixed strings: container name, display name, then the blob names, and blobiis the filei. The runtime writes a new version asv<N>.newand one rename commits it, and drops older versions the next time it opens the container. Duplicate therefore writes a folder with the new name's hash and a manifest naming it; any change to a blob is written the same way, as a newv<N+1>beside the old one, after a backup. - Blobs. Every container measured has two:
Save Game DataandSave Game Header(296 bytes).Save Game Datais anASAVfile (saves.md). The profile and settings containers are plain ASAV (mode 1: the body is the record or hash-keyed JSON text, entropy 0.4 to 4.6 bits per byte). The story-save containers are mode 3 and their body has an entropy of 8.00: compressed or encrypted, and no format note indocs/names an algorithm for it. - Editing. The launcher shows a packed save as "this save is packed (compressed or encrypted); editing is not supported" and does not try to decode, decompress or work around it. For the plain ones the ASAV header carries a checksum at 0x160 whose algorithm is open (docs/saves.md), and the header blob repeats the size, so the launcher does not edit values: that would write saves the title may reject, on the strength of a guess. What is offered is replacing a whole blob with a file you changed yourself (export, change, import), with the backup and the new version described above; a changed size no longer matches the header blob, which the page warns about.
- Nothing from a real save is in the repository:
tests/test_leonida_saves.pybuilds its own fake trees.
The HTML launcher (launcher/, in progress)
launcher/index.html is a second front end in the layout of a publisher's game launcher (a slim rail with the
game's tile, a picture over the whole window, the sections top right, the logo with a large PLAY button), and
launcher/serve.py the small server behind it. python -I launcher/serve.py serves it on 127.0.0.1 only and opens
it in a window of its own (Edge or Chrome in app mode, else the default browser). --no-run only looks: PLAY and the
tools print the command they would run. Launcher.bat still opens the Tkinter window above.
- Who may ask: a request must name this machine in Host and carry the token written into the page for that run (a
header for
/api, a cookie for pictures and the event stream). Mods, saves and captures are named by folder, name or index, never by path. - The picture behind PLAY: the one chosen in Settings, else the newest
background.webp,.pngor.jpgin the launcher's settings folder (%APPDATA%\Leonida), else the newest capture, else art the page draws. When there is none, the server fetches the game's key art from rockstargames.com once and keeps it there asbackground.jpg(or.webp, by what comes back);--no-artleaves it. The request names a plain browser and nothing about you or the project. The picture is never part of the repository. That download is the launcher's only internet access. python -I tests/test_launcher_serve.pycovers the above without a browser or the internet.