WIP: feat(saves): bean soils, Big Poes and gossip stones, and what the game writes with a Gold Skulltula, a heart piece or a chest #2549

Closed
neotoxic wants to merge 21 commits from neotoxic/Longshot:feat/save-editor-collections into main
Contributor

Summary

Stacked on #1401 (save-file-editor, dce4dc3897): only the last commit is this PR; the others are #1401's and go when
it merges. WIP until #1401 merges or @mooki takes the commit into it. This is the first, smallest part of the logic I offered in #1401 (comments 78907 and
78940), for @mooki to take or leave. One commit, three files: scripts/longshot_save_editor.py, its tests, its guide.

Three categories a 100% walkthrough counts and the report did not. All three are read from the player's game, like the rest:

  • Magic bean soils planted: IsPlantedMagicBean_SmallFarm.<the soil's placement hash> (Obj_SmallFarm_*).
  • Big Poes defeated: the flag each Enemy_Poe_Big placement names (PoeBig_IsCleared).
  • Gossip stones played to: BlewOcarinaByGossipStone.GOSSIP_<ZONE>_<NN>. The maps do not carry the zone or number, so the
    editor tries each map's name in capitals, plus the two zones that are not a map's name (HYRULE_MARKET, LAKE_HYLIA).

On the current nightly that gives 11 soils, 10 Big Poes and 40 stones.

What the game writes with a Gold Skulltula, a heart piece or a chest is now written with it. Before this change:

  • setting a Gold Skulltula gave no token, so a slot could show 14 Skulltulas and 13 tokens;
  • a heart piece did not raise the hearts (the guide said so);
  • an opened chest did not give what it holds.

After a set or clear:

  • the tokens equal the Gold Skulltulas killed;
  • the hearts are the start, plus one per container and one per four pieces, with the pouch keeping the pieces toward the next;
  • an opened chest gives its item if Link keeps that item and does not have it yet.

Each of these shows on an and ... line, in --dry-run too, so the launcher's confirmation already shows it. In --json they
are new keys in changes (no key removed, so SCHEMA stays 1). A command only follows what it changed itself: a count set by
hand (flag:...=N, give hearts=N) stays.

Not in this PR (later parts, if you want them): ordering the entries by story chapter, and what quest scenes write.

Testing

Tested: Windows 11, Python 3.14, with the current nightly's game folder. I made a copy of my own save; nothing from the
game or the save leaves the PC. On that copy I set one entry of each kind: a Gold Skulltula, a heart piece, a chest that
holds an item, a soil, a Big Poe and a stone.

  • Each entry went from missing to had.
  • The tokens went 13 → 14.
  • The heart pieces went 5 → 6, with the hearts staying at 5 and 2 pieces toward the next.
  • The chest's item was given.
  • Nothing else in the report changed.

The game itself was not run: this is a command line tool that the game does not load.

Checks:

  • tests/test_longshot_save_editor.py uses made-up game files only. Its new cases:

    • the three categories, including a soil with no flag, which gets no entry;
    • the tokens on set and on clear;
    • four pieces making a heart, and a container making one;
    • a chest that gives its item and does not take it back;
    • a count set by hand that is left alone.

    The existing text-output test now expects the tokens line.

  • Results (re-run on this head): 93 tests, one error, Safety.test_a_restore_that_fails_too_is_reported_.... It fails the same way on
    dce4dc3897 without this change; it is a Windows file-locking case.

  • ruff 0.12.0 (the pinned version): clean.

Still to test:

  • Linux: run tests/test_longshot_save_editor.py, expecting the 93 tests to pass, the one above included (CI, or by hand).

Measurements

Nothing to measure: a command line tool, outside the game; LONGSHOT_GAME is the tool's path to the game, not a switch: no default to measure.

Risks

  • A heart count set by hand. On a slot whose hearts were set by hand (give hearts=N), the next set or clear of a
    heart piece or heart container resets the hearts to what the pieces and containers give. The same goes for tokens set by
    hand when a Gold Skulltula changes. This is what the game would hold, and each such change is said on an and ... line
    before anything is written (--dry-run).
  • A gossip stone the game names differently gets no entry. The 40 stones the game lists are all found today.
  • Undo is a revert of the one commit. Saves are untouched until someone runs a command, and every write keeps the backup
    that #1401 makes.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit. One topic and a Conventional Commit title, but
    not on main yet: it is stacked on #1401 (by choice: the first to land, the other adapts), so it lands after it and stays WIP
    until then. Merging it into current main (13da6f416e) and into #1401's head (dce4dc3897) gives no conflict.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named). python -I -B tests/run_all.py --strict on
    Windows, on this head: 649 passed, 174 failed, 48 skipped. The same run on #1401's head (dce4dc3897, this PR's base):
    649, 174, 48, the same 168 failing check files and none new; on current main (13da6f416e): 678, 166, 51. Those failures
    are Windows ones (missing Linux tools, paths, file locking), none in a file this change touches except the one named under
    Testing, Safety.test_a_restore_that_fails_too_is_reported_..., which fails the same way on the base. Linux CI still runs the lot.
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary **Stacked on #1401** (`save-file-editor`, `dce4dc3897`): only the last commit is this PR; the others are #1401's and go when it merges. WIP until #1401 merges or @mooki takes the commit into it. This is the first, smallest part of the logic I offered in #1401 (comments 78907 and 78940), for @mooki to take or leave. One commit, three files: `scripts/longshot_save_editor.py`, its tests, its guide. **Three categories a 100% walkthrough counts and the report did not.** All three are read from the player's game, like the rest: - *Magic bean soils planted*: `IsPlantedMagicBean_SmallFarm.<the soil's placement hash>` (`Obj_SmallFarm_*`). - *Big Poes defeated*: the flag each `Enemy_Poe_Big` placement names (`PoeBig_IsCleared`). - *Gossip stones played to*: `BlewOcarinaByGossipStone.GOSSIP_<ZONE>_<NN>`. The maps do not carry the zone or number, so the editor tries each map's name in capitals, plus the two zones that are not a map's name (`HYRULE_MARKET`, `LAKE_HYLIA`). On the current nightly that gives 11 soils, 10 Big Poes and 40 stones. **What the game writes with a Gold Skulltula, a heart piece or a chest is now written with it.** Before this change: - setting a Gold Skulltula gave no token, so a slot could show 14 Skulltulas and 13 tokens; - a heart piece did not raise the hearts (the guide said so); - an opened chest did not give what it holds. After a `set` or `clear`: - the tokens equal the Gold Skulltulas killed; - the hearts are the start, plus one per container and one per four pieces, with the pouch keeping the pieces toward the next; - an opened chest gives its item if Link keeps that item and does not have it yet. Each of these shows on an `and ...` line, in `--dry-run` too, so the launcher's confirmation already shows it. In `--json` they are new keys in `changes` (no key removed, so `SCHEMA` stays 1). A command only follows what it changed itself: a count set by hand (`flag:...=N`, `give hearts=N`) stays. Not in this PR (later parts, if you want them): ordering the entries by story chapter, and what quest scenes write. ## Testing **Tested:** Windows 11, Python 3.14, with the current nightly's game folder. I made a copy of my own save; nothing from the game or the save leaves the PC. On that copy I set one entry of each kind: a Gold Skulltula, a heart piece, a chest that holds an item, a soil, a Big Poe and a stone. - Each entry went from missing to had. - The tokens went 13 → 14. - The heart pieces went 5 → 6, with the hearts staying at 5 and 2 pieces toward the next. - The chest's item was given. - Nothing else in the report changed. The game itself was not run: this is a command line tool that the game does not load. Checks: - `tests/test_longshot_save_editor.py` uses made-up game files only. Its new cases: - the three categories, including a soil with no flag, which gets no entry; - the tokens on set and on clear; - four pieces making a heart, and a container making one; - a chest that gives its item and does not take it back; - a count set by hand that is left alone. The existing text-output test now expects the tokens line. - Results (re-run on this head): 93 tests, one error, `Safety.test_a_restore_that_fails_too_is_reported_...`. It fails the same way on `dce4dc3897` without this change; it is a Windows file-locking case. - ruff 0.12.0 (the pinned version): clean. **Still to test:** - Linux: run `tests/test_longshot_save_editor.py`, expecting the 93 tests to pass, the one above included (CI, or by hand). ## Measurements Nothing to measure: a command line tool, outside the game; `LONGSHOT_GAME` is the tool's path to the game, not a switch: no default to measure. ## Risks - **A heart count set by hand.** On a slot whose hearts were set by hand (`give hearts=N`), the next `set` or `clear` of a heart piece or heart container resets the hearts to what the pieces and containers give. The same goes for tokens set by hand when a Gold Skulltula changes. This is what the game would hold, and each such change is said on an `and ...` line before anything is written (`--dry-run`). - **A gossip stone the game names differently** gets no entry. The 40 stones the game lists are all found today. - **Undo** is a revert of the one commit. Saves are untouched until someone runs a command, and every write keeps the backup that #1401 makes. ## Checklist ### Ready for review - [ ] One topic, on current `main`; the title is a Conventional Commit. One topic and a Conventional Commit title, but not on `main` yet: it is stacked on #1401 (by choice: the first to land, the other adapts), so it lands after it and stays WIP until then. Merging it into current `main` (`13da6f416e`) and into #1401's head (`dce4dc3897`) gives no conflict. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). `python -I -B tests/run_all.py --strict` on Windows, on this head: 649 passed, 174 failed, 48 skipped. The same run on #1401's head (`dce4dc3897`, this PR's base): 649, 174, 48, the same 168 failing check files and none new; on current `main` (`13da6f416e`): 678, 166, 51. Those failures are Windows ones (missing Linux tools, paths, file locking), none in a file this change touches except the one named under Testing, `Safety.test_a_restore_that_fails_too_is_reported_...`, which fails the same way on the base. Linux CI still runs the lot. - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
scripts/longshot_save_editor.py reads a save folder and reports, slot by slot, what the slot has and what it
is missing, by name and area: items, equipment, masks, upgrades, songs, quest items, hearts, heart containers
and pieces, rupees, chests, Gold Skulltulas, each dungeon's map, compass, boss key and small keys, bosses, the
Hall of Fallen Foes, story and side quests. set and clear take a flag, an entry, an area or a whole category;
give takes items (counted ones within the cap the bags and wallets set), hearts, rupees and small keys; start
puts Link at a named start place; copy copies a slot. Every write refuses while a game runs, copies the save
folder first, writes each file whole and swaps it in by a rename, reads it back and puts the files back if
that fails.

The categories, totals and the way each is told apart in the file are read from the player's own game folder
(--game): the flag list, the pouch table, the quests, the maps' placements and the game's text. Nothing of the
game is in the repository. scripts/oot_savefile.py is the layer below: the save file format (a file read and
written unchanged is byte for byte what it was, the 64-bit key table stays sorted), the game's BYML, SARC and
zstd files, and the atomic write.

tests/test_longshot_save_editor.py runs it all on a made-up game and made-up saves: the format, the
catalogue, the report, every command and its refusals.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
docs/save-editor.md says what the report counts and where each count is read, what set, clear, give, start and copy
do and do not do, and what keeps a save safe. The report names a slot that cannot be read and goes on with the
others; the game's text falls back to another English archive, and the output is safe for a console that cannot
print the game's typographic quotes.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Mini-games (the quests with no kind) are their own category: listed, never part of 100%, and `all` leaves them alone. Setting a boss also sets its heart container and its dungeon's boss key, and clearing takes them away. A bigger bomb bag, quiver, wallet or bag keeps the smaller tiers, and the slot card's item flags follow every item edit. The guide says what an edit still does not write.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
--json prints one JSON object on stdout and nothing on stderr: for set, clear, give, start and copy what changed, the files written, the backup folder and a read-back verdict; for items and places the lists; for report a schema version. A refusal is {"ok": false, "error": {"code", "message"}} with a code a program can switch on (running, other_version, out_of_range, would_overwrite ...). The text output is unchanged. docs/save-editor.md has the keys and the codes.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Fail carries a code and every place that raises it names one, so rewording a message cannot change what a program sees in --json. longshot_saves.py's refusals are given their codes where the editor calls it. Two checks: every Fail in the scripts has an explicit code the guide lists, and a patched message leaves the codes as they were.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A check reads the editor's source for the LONGSHOT_ names it reads and fails when one has no row in docs/development.md's switch table.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A command reads a slot, builds the catalogue (the game's files, a second or two) and only then commits. These checks put a newer save on disk after the command has read its slot (the progress or the card, a copy's source or destination, with and without --force), start a game while the catalogue loads, and change the save during the backup. Each expects a refusal (changed_meanwhile, or running) with the newer file still there and, before the backup, no backup; and the running-game check before the first read of the slot. They fail on the branch's head because the command writes its older snapshot over the newer save.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A command read the slot, built the catalogue and only then, in commit, asked whether a game ran; the read commit made was a snapshot for the rollback and was never compared with what the edit was made from. A game that saved and quit while the catalogue loaded, or another editor, had its newer save replaced by the older snapshot.

The running-game and NX2navi checks are now guard(), asked before a command reads a slot and again before it writes. A SaveFile keeps the exact bytes it was read from (original); a command passes commit the files it read (a copy: its source and what its destination held, or that it held nothing), and commit compares the disk with them before the backup and again after it, refusing with the new reason code changed_meanwhile and writing nothing. They are also what a failed write puts back. --force skips only the process check.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A string, a vector, a 64-bit number or an array is kept outside its table entry, at an offset the file itself holds. These checks point each kind of value at the header, the table, the key table, across the end of the data and past the end of the file, give an array a count that runs past the data, and overlap two values; each must be refused as damaged when the file is opened, so that report lists the slot as unreadable and set, give, start, clear and copy end in a refusal with the save and backup folders unchanged. The made-up game gets an array flag for it. They fail on the previous commit: set flag:Sequence_CurrentBanc=Hello exits 0 after overwriting table entries, a value past the end of the file is lost or appended.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
SaveFile checked the data offset and the key table and nothing else: get and set followed a value's offset wherever it pointed. A String, Vector3, 64-bit value or array at an offset in the header, the table or the key table was overwritten by an edit (a start place or set flag: wrote string bytes over table entries, and the file read back as a save), and one past the end of the file made the slice assignment append, so the edit was lost.

When a file is opened SaveFile now checks, for every flag the game's list names, that its value (a vector's 12 bytes, a 64-bit value's 8, a string's size, an array's count word and its elements) lies from the end of the table to the key table, and that no two values share a byte; otherwise the file is damaged, so report lists the slot as unreadable and every edit and the read-back after a write refuse it. A save of another game version whose layout does not fit this game's list is said to be that (other_version), not damaged. A flag the game's list does not name is not judged.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Rollback swallowed every OSError and then printed that the files were put back. These checks make the write of the second file fail and then the restore of the first: a restore that raises, a restore that writes the wrong bytes, and a new slot's file that cannot be removed again. Each expects the command to refuse with restore_failed, naming the files that were not put back and the backup that holds them (text and JSON), and never to say the files were put back; a restore that works is still reported as before. They fail on the previous commit: the OSError of the first failure escapes (text), or the code is io_error with no list of files (JSON), and the live slot still holds the edit.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
When a write failed, commit put every written file back inside try/except OSError: pass and then printed that the files were put back, whatever had happened; with --json the live slot could be left half changed and the object did not say so (in text the first OSError was re-raised as a traceback).

put_back() restores one file (a new file is removed again, with the folder of a slot that was new) and then reads it back: it counts as put back only when the disk holds exactly the bytes the command read, so a restore that raised but left the file as it was is fine, and one that wrote wrong bytes is not. When any file is left, the command refuses with the new reason code restore_failed, naming those files (error.not_restored) and the backup that holds them (error.backup), in text and in JSON, and does not say the files were put back; when all are, the message and the original error are as before.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
give hearts=abc raised ValueError, a number too big for a flag struct.error, a vector of two numbers struct.error, a flag name 0xZZ ValueError, so none reached refuse() and a program got a traceback instead of the one JSON object. These checks run 24 such values through the command line in text and in --json (non-numbers, integers that do not fit 32 or 64 bits, a float too large to store, a vector or array element of the wrong shape, text that is not UTF-8, a bad hash) and through SaveFile.set: each must end in bad_value or out_of_range, one line or one object, with the save and the backup folder unchanged; and values that do fit are still written. They fail on the previous commit with the exceptions above.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The values a person types reached int(), float() and struct unchecked, so give hearts=abc raised ValueError, a number too big for its flag struct.error, a vector of two numbers struct.error, a flag name 0xZZ ValueError, and none got to refuse().

number() turns the whole numbers of give into bad_value; parse_value turns what a type cannot parse into bad_value; GameData.hash_of refuses a hash that is not one; SaveFile.set maps struct.error and OverflowError to out_of_range and ValueError and TypeError (text that is no number, a vector that is not three numbers, an element that is not INDEX:VALUE) to bad_value. set also packs a value before it writes any byte: struct.pack_into wrote the low bytes of a too-big number into the file before it raised, so a refused value no longer leaves the in-memory file changed.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Since the save script moved its Linux backups beside the saves (where the launcher keeps its own), the folder named in the editor's guide was the old one on Linux. The backup is still edit-<profile>-<date>-<time> in the save script's backup folder, which its guide names.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
docs/save-editor.md moves to docs/user/save-editor.md and its links follow the saves pages (docs/user/saves.md,
docs/dev/reference/saves.md). The user saves page points to it under the save script, and the developer saves page lists the
editor and its format layer. The script, the library and the checks name the new path; the check that LONGSHOT_GAME is
documented reads the guide, since the development guide's switch table is gone.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
chore(saves): the save editor and its check pass ruff, which the lint job runs now
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
PR description / Description follows the template (pull_request_target) Successful in 12s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 16s
CI / Workflow lint (actionlint) (pull_request) Successful in 16s
Third-party parts / As their notes say (pull_request) Successful in 17s
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval approved by mooki (reviewed)
beanstalk/any 1/1 fail
CI / Website build and checks (pull_request) Failing after 3m17s
dce4dc3897
Four assigned-and-never-read locals in scripts/longshot_save_editor.py and an unused import and two unused locals in its check
are gone; nothing they computed was used.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
feat(saves): bean soils, Big Poes and gossip stones, and what the game writes with a Gold Skulltula, a heart piece or a chest
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 16s
PR description / Title and description (pull_request_target) Has been cancelled
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
dbd62c246b
A 100% walkthrough counts three things the editor did not list: the magic bean soils planted, the ten Big Poes and the gossip
stones played to. Each is one Bool flag the editor now reads from the player's own game: a soil's flag is named by its
placement's hash (Obj_SmallFarm_*), a Big Poe's by its placement (PoeBig_IsCleared), and a gossip stone's names its zone and
number (BlewOcarinaByGossipStone.GOSSIP_<ZONE>_<NN>), which the maps do not carry, so the editor tries each map's name in
capitals and the two zones that are not a map's name (the market, and the lake inside Hyrule Field's map). On the current
nightly that is 11 soils, 10 Big Poes and 40 stones, the same counts as the game's own logic.

An edit also left the counters the game keeps with them behind: setting a Gold Skulltula did not give its token, a heart piece
did not raise the hearts (the guide said so), and an opened chest did not give what it holds, so a slot could say 14 Gold
Skulltulas and hold 13 tokens. Now, after a set or clear, the tokens are the Gold Skulltulas killed, the hearts are the start
plus one per container and per four pieces (the pouch keeps the pieces toward the next, and a heart won fills the hearts), and a
chest opened gives its item when Link keeps that item and lacks it. Each is said on an "and ..." line, in --dry-run too, and
recorded in --json's changes (new keys only). Only what the command changed is followed: a count set by hand stays.

Tested with made-up game files only (tests/test_longshot_save_editor.py: the new categories, tokens, hearts, chests, and a
hand-made count left alone); the existing text-output test now expects the tokens line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Contributor

Tested in game: not applicable: a command line tool the game does not load. Tested with my own game folder on a copy of my own save (see Testing).

Tested in game: not applicable: a command line tool the game does not load. Tested with my own game folder on a copy of my own save (see Testing).
Author
Contributor

@mooki: the first part of what I offered in #1401, as one commit on top of your branch. Take it into #1401, or leave it; I won't push more parts until you say.

@mooki: the first part of what I offered in #1401, as one commit on top of your branch. Take it into #1401, or leave it; I won't push more parts until you say.
Member

Possibly related, for context:

  • PR #1411 feat(menu): a Progress editor in the Debug tools (chests, Gold Skulltulas, hearts, bosses, start place) and Inventory amounts that keep every press — Open in-game progress editor overlaps editing chests, Gold Skulltulas and heart pieces.
Possibly related, for context: - PR #1411 feat(menu): a Progress editor in the Debug tools (chests, Gold Skulltulas, hearts, bosses, start place) and Inventory amounts that keep every press — Open in-game progress editor overlaps editing chests, Gold Skulltulas and heart pieces.
Author
Contributor

Description moved to the PR template (Testing, Risks, Checklist).

Description moved to the PR template (Testing, Risks, Checklist).
The save editor no longer waits for #1401: with the maintainers' go-ahead this pull request carries mooki's commits (their authorship kept) and lands on its own, so it is brought onto main's head.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(saves): the save editor names the game neutrally
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
PR description / Title and description (pull_request_target) Successful in 5s
684baaa38b
Main's test_no_game_title (added after the save editor was written) found the game's title in the editor's module
name, its docstring and its guide. scripts/oot_savefile.py becomes scripts/game_savefile.py (its importers, test and
docs follow), and the docstring and the guide say "the game". Nothing else changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Contributor

Closing: superseded. With the maintainers' go-ahead we no longer build on #1401's script; the save's progress and its marks are read and written by the builder in #2957 (progress_ops, save-progress and save-progress-mark), and the launcher shows them in LongshotLauncher#366. The two commits pushed here today (main merged in, the module renamed for test_no_game_title) go with it.

Closing: superseded. With the maintainers' go-ahead we no longer build on #1401's script; the save's progress and its marks are read and written by the builder in #2957 (progress_ops, save-progress and save-progress-mark), and the launcher shows them in LongshotLauncher#366. The two commits pushed here today (main merged in, the module renamed for test_no_game_title) go with it.
neotoxic closed this pull request 2026-12-04 04:04:15 +00:00
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
PR description / Title and description (pull_request_target) Successful in 5s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2549
No description provided.