Skip to content

PLZA AutoStory slice 2b: 01.02, Pancham's chase to the battle area - #582

Closed
dayfine wants to merge 17 commits into
plza/slice2/afrom
plza/slice2/b
Closed

dayfine wants to merge 17 commits into
plza/slice2/afrom
plza/slice2/b

Conversation

@dayfine

@dayfine dayfine commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Depends on #580 (base plza/slice2/a; the diff shows only this change).

Checkpoint 01.02 needs the choice box: the scene machine can now stop at it (text_to_choice, B through the text), and choose_0/choose_1 move the highlight with the D-pad by the choice rows reading and press A, on the story backend, so FakeStoryBackend tests cover them. A run that starts after 01.01 now loads the latest save with load_checkpoint_start(), which stops when that save is still the station platform, and rows marked reload_when_chained reload there (shared Pokemon::story_run_segments(); no row sets it yet, since 01.01's autosave is unverified). Rows the game does not save at log "[Save] 01.01: not saved (save unverified)" instead of "save failed", and 01.00 is now "autosave" (the run log showed the badge on the platform).

Tested with unit tests on Fork Draft CI: StoryFiles segments, StoryEngine save lines, PLZA AutoStoryGame run/load/chain, scene machine, and the choice rows reader on synthetic menus plus CommandLineTests frames (the tourist, the bag scene, the elevator, light pavement). za2_m3w_s2 is not in CommandLineTests, so the old screen-events choice test is skipped; ArrivalToAd 0065 checks the choice box instead. Not run on the console yet.

The choice box (the selection arrow in the dialogue's choice area, and a
reader for its rows), text_to_choice and choose_0/choose_1 on the story
backend, mash_to_move_hints' min_length_ms, load_checkpoint_start (the
latest save, refused when it is the station platform but the row starts
later), and run_plza_segments for reload_when_chained rows
(Pokemon::story_run_segments). A row that the game does not save at now
logs "[Save] 01.01: not saved (save unverified)" (Pokemon::NOT_SAVED).
01.00 ends on an autosave: run logs show the badge on the platform.
dayfine added a commit that referenced this pull request Nov 15, 2026
Brings the reviewed slice chain (#572-#582) into the long-lived branch.
Where both sides add the same file, plza/autostory's later version is kept
and the slices' review fixes are applied on top: StoryRangeOptions moves to
Pokemon/AutoStory/Options with #572's review fixes, SV takes the slices'
version, the shared Outcome and Pose functions move to their own .cpp files,
and add_tests_AutoStory() also registers the slices' new suites
(StoryBackend, CheckpointAttempts, ScreenMachine, PLZA AutoStoryDialogDetector).
The slices' PLZA AutoStoryGame tests are left out: they are written against
the slices' smaller game API (make_plza_story_game_without_console(),
unverified autosaves), which this branch has not adopted; its
AutoStoryEngine tests cover the same game.
The nine AutoStoryScreenEvents frames missing from CommandLineTests #18 are
skipped as pending a recapture.
dayfine and others added 13 commits November 15, 2026 17:36
# Conflicts:
#	SerialPrograms/Source/Pokemon/AutoStory/Engine/Pokemon_StoryEngine_Tests.cpp
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStoryGame.cpp
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStorySceneMachine.cpp
The choice state and scene_screen_presses() go into the .cpp with the other scene states; the
timeline cases this PR added become runs.
# Conflicts:
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStorySceneMachine.cpp
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStorySceneMachine.h
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStorySceneMachine_Tests.cpp
# Conflicts:
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStory.cpp
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStoryGame.cpp
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStorySceneMachine.cpp
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStorySceneMachine.h
# Conflicts:
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStoryGame.cpp
…eloads

Every look of every step of a checkpoint goes through AutosaveSightings
(a backend wrapper the story game puts around each action): a badge with
none in the 5 s before it logs "[PLZA] autosave badge at <t>s in <step>".
A checkpoint whose badge showed saves for the run ("[Save] X: the game
autosaved (seen)"); else not saved, whatever the plan claims.

run_plza_segments() decides between rows instead of the plan's
reload_when_chained true: on from the live screen when the next row's
start check passes or cannot tell (logged "START UNCHECKED"); a reload
only onto an autosave seen in this run; otherwise fail as no_start_save
rather than rewind to an older save.

Ported from plza/newgame a9f6195 (its engine part); the plan flag
changes go to the slices that add 02.07, 03.01, 03.02 and 03.11. The
wrapper has no battle() here: the story backend gains it in slice 2c.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine

dayfine commented Nov 17, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #644 (one lean branch; split for review later)

@dayfine dayfine closed this Nov 17, 2026
@dayfine
dayfine deleted the plza/slice2/b branch November 17, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant