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
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2549
Loading…
Reference in a new issue
No description provided.
Delete branch "neotoxic/Longshot:feat/save-editor-collections"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Stacked on #1401 (
save-file-editor,dce4dc3897): only the last commit is this PR; the others are #1401's and go whenit 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:
IsPlantedMagicBean_SmallFarm.<the soil's placement hash>(Obj_SmallFarm_*).Enemy_Poe_Bigplacement names (PoeBig_IsCleared).BlewOcarinaByGossipStone.GOSSIP_<ZONE>_<NN>. The maps do not carry the zone or number, so theeditor 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:
After a
setorclear:Each of these shows on an
and ...line, in--dry-runtoo, so the launcher's confirmation already shows it. In--jsontheyare new keys in
changes(no key removed, soSCHEMAstays 1). A command only follows what it changed itself: a count set byhand (
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.
The game itself was not run: this is a command line tool that the game does not load.
Checks:
tests/test_longshot_save_editor.pyuses made-up game files only. Its new cases: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 ondce4dc3897without this change; it is a Windows file-locking case.ruff 0.12.0 (the pinned version): clean.
Still to test:
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_GAMEis the tool's path to the game, not a switch: no default to measure.Risks
give hearts=N), the nextsetorclearof aheart 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 ...linebefore anything is written (
--dry-run).that #1401 makes.
Checklist
Ready for review
main; the title is a Conventional Commit. One topic and a Conventional Commit title, butnot on
mainyet: it is stacked on #1401 (by choice: the first to land, the other adapts), so it lands after it and stays WIPuntil then. Merging it into current
main(13da6f416e) and into #1401's head (dce4dc3897) gives no conflict.mise run testpasses (any failure that also fails onmainis named).python -I -B tests/run_all.py --strictonWindows, 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 failuresare 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.main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
--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]>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).
@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.
Possibly related, for context:
Description moved to the PR template (Testing, Risks, Checklist).
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.
Pull request closed