Repository navigation
Conversation
dayfine
added a commit
that referenced
this pull request
Nov 10, 2026
What PLZA (#335) had to work around, now in the engine: - FakeStoryBackend and its script are templated on the pose (GridPose and ZonePose instantiated); ZonePose moves into the engine (cherry-picked). - StoryBackend::stick(degrees, duration, pace) for free-moving games, and the "heading" reading (STORY_HEADING, story_heading()). - ScreenEvent gains CHOICE_BOX and INTERACT_PROMPT. - run_screen_machine_on_observations(): ScreenMachine states over looks, failures returned; ScreenMachineChecks::problem() for observations; StepTrace without video (lines to a log, no screenshots). - Handlers get a StoryActionCall {step, args}; StoryGame::save gets the checkpoint. - StoryEngine::run_segment() and verify_checkpoint(): retries only when a reload returns to the checkpoint's start save (#329), no reload for lint, console_only or game-not-running failures; verify saves only on the last run when every run passed. - StoryActionSpec::console_only, refused off a console as "console_only"; StoryBackend::kind(). - StoryPoseTraits: TILE_MOVES (legs/face only for tile games) and from_declared() (a checkpoint's start and declared_after read as the game's pose; the lint fails what does not fit). A declared pose may omit "tiles". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Story action handlers take (backend, call, state); run_checkpoint() names its SavePoint; verify_checkpoint(), run_segment() and run_screen_machine_on_observations() take their outputs last, and record_story_counts() takes (counts, stats). flood_blob(), fill_box() and track_since() put their output parameter last, and the PLZA strings use std::format instead of +. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…s free control Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…ete card Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
- MissionCompleteDetector: the green "COMPLETE" word over the mission's yellow bar. MISSION_COMPLETE_READING wins over the banner reading; the scene machine presses A at the card (MISSION_COMPLETE), and it counts as busy, so no blind press or quiet end while it shows. - A mission banner still up after 10 s gets A up to 3 times, 1 s apart (01.03's MAIN MISSION 02 stayed), so the step ends with control. - 01.03 saves through the menu (the menu can save from the start of the story). save_story_game() opens the menu and report itself: when R does not bring up the Save button (the first menu's tutorial card), A once and R again; a failed save gets B back to the overworld and one retry. - Tests: synthetic and lab frames for the card (01.01 run 4, 01.03 run 2), the card and the banner presses in the scene machine and engine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
It passed twice on console B (2026-11-10), so a passing run saves at its end through the menu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The camera recenter and the turn tap now release after 150 ms and 100 ms (were 400 ms and 300 ms), so the legs run back to back as when played. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Rows of integers, for args a game reads as pairs, such as PLZA's walk legs [turn, ms]. Belongs with the arg types of #332; kept here as its own commit so it can move there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…rom disk The walks' legs move from C++ tables into their events' args: one "walk" action with "legs" [[turn, ms], ...] and optional "end" (a fade) and "heading"; approach_starter takes one legs arg per starter. The lint checks every leg is a [turn, ms] pair in range. Each run reads the story anew, with files in <user files>/AutoStoryDev/plza/ in place of the built-in checkpoints of the same name, so walks can be retimed in the lab without a rebuild. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
A walk with "held": true holds the stick at each leg's angle for the whole leg and presses L only before a later turning leg; "wait_ms" waits first for the NPCs to move off. L near Taunie turns to her, so the first leg goes without one. 02.01's battle_zone_to_brigitte uses it, as played on console B over CFR (2026-11-10). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The game autosaves after Brigitte's talk, so a reload lands there: 02.01 ends at after_brigitte and 02.02 starts with the walk to the blocked street. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…reet scene ends The street scene leaves the player at the gate's "A Leave" (console B, 2026-11-10); the 5 s walk to it took the player away from the gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
leave_battle_zone was a scene, which ended at once on the overworld without pressing A at the gate; it is now a talk, with Taunie's lines after it as their own scene. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Played on console B over CFR (2026-11-10) and replayed through AutoStory into the Hotel Z arrival scene. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
A reload after the Hotel Z arrival scene lands in front of the hotel (console B, 2026-11-10), so 02.03 starts with the walk to its door. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…he lobby scene Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…he autosave after it
At Hotel Z's counter the first A talks to Taunie ("come say hello"); a
short stick tap up-right turns to AZ, and A there starts the check-in
scene. A reload after the scene lands in the lobby facing the elevator
(console B, 2026-11-10), so 02.04 starts there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…o "Which floor?" B closes the elevator's talk before the floor choice shows (console B, 2026-11-10), so text_to_choice takes "advance_with_a". The bed's "Rest until tomorrow morning?" uses it too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…eck; 02.04 waits out the elevator ride On 2F of Hotel Z there is no party bar or prompt, so the scene step after the elevator ride never saw control and timed out (console B, 2026-11-10). The walk to Room 202 now waits 4 s for the ride's fade to start, then its free-control check waits the fade out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…through the night Hotel Z's 2F hall and Room 202 show no party bar or prompt (console B, 2026-11-10), so mash_to_move_hints takes "quiet_is_control": the quiet time ends the step with control instead of failing. 02.04's ride, the room door and waking up use it; the bed walk is held (measured by hand), and the room door's "A Leave" is pressed before the first-evening scenes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
run_scene_machine() went past the 50-line limit with quiet_is_control. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Keeps the catch plan's header and catches file under code health's limits.
Up first, then B + X, only showed the title again, whose A loaded the latest save. Held together on the title they open the BACKUP card (console B, 2026-11-14: play time 0:52, 3 registered).
…s pillars The objective marker is not on Wild Zone 1's far gate but past it to its left, behind the zone's fence: walking at it from the catch spot at 60 was held up at 36 and wandered to 49 inside the zone twice. walk_to_zone_gate becomes walk_back_to_zone_road (the road stops only), and the plan walks on through the gate with walk_to_zone_gate_entrance, as at the entrance gate. Walked by hand on console B: from 60 straight down the road, the A Leave prompt in about 4.7 s.
StoryCheckpoint::postconditions gets = {} so designated initializers that
leave it out build on Windows Clang (-Wmissing-designated-field-initializers).
The eight AutoStory test tables now hold each case's name next to its input
and expectation, as code health's test-case rule asks; the step JSON tests
pass the name to the readers as the parse source.
Windows Clang errors on designated initializers that skip a field (-Wmissing-designated-field-initializers). A syntax check of every .cpp nav/shared touches, with the Compiler.h pragma disabled, found only these.
…turn back where caught, level only after ZL From the user watching console B (2026-11-14 17:2x-17:4x): - A stop watched 1.5 s more after the first brackets (and reset the pitch first) before locking on; Pokemon walked off meanwhile. The watch now ends at the first brackets (BRACKET_SETTLE). - After a throw that missed or broke free, the stop swept again and often found nothing. With ZL held on, a plate not known caught that locks on again gets another throw at once (after_throw(), 3 in a row at most). - Back at 100 with Scatterbug caught there, the patrol stopped and locked on to Scatterbugs. A spot where a new species was caught is now only turned back at (spot_visit()), unless a wild battle is on. - level_camera() ran at every stop's start, after every try and at the end. It now runs only after ZL was held (CameraPitch). The species count rule is unchanged. CatchStop_Tests cover the spot visit, after-throw and pitch choices.
A dropped A Leave leaves the player at the far gate inside Wild Zone 1 with the prompt and party bar up, which leave_zone_1 takes for control. 03.08's new last step, check_out_of_wild_zone, fails there when the minimap's arrow stays in the zone's green on 4 frames 0.5 s apart.
…xit look From the catch spot at 60 the far gate is small at first and the gate walk missed it in its 1 s once. Just outside the gate the minimap's arrow still touches the zone's green edge, so the exit check failed with the player out on the street: it now walks on 600 ms away from the gate before each look after the first (console B, 2026-11-14).
Twice the player was out on the street (the street name showing) while the minimap's arrow still read in the zone's green just outside the far gate, so the check failed good runs: 03.08 ends on leave_zone_1 again. The walk back to 60 stopped at 58 once and was refused: a road stop within 3 counts (console B, 2026-11-14).
# Conflicts: # SerialPrograms/Source/Pokemon/AutoStory/Engine/Pokemon_StoryLaunch_Tests.cpp # SerialPrograms/Source/Pokemon/Options/Pokemon_StoryRunOptions.cpp
throw_ball() now runs the throw under run_watched() with REGISTERED_BANNER_WATCH (max gap 500 ms, tail = the 100 ms hold, 2 s cap): a banner that could have shown in a gap between frames reads UNKNOWN instead of "not seen", and the plate fallback decides as before. Count rule unchanged. Tests: banner watch cases on scripted frames (seen on covered frames, unknown inside a 3 s gap).
The street's way through a gate, to set as the plan's heading so the walk faces the gate before it starts (03.08's far gate was off screen after the catches once in 3 tries, console B 2026-11-14).
After the catches the camera faces wherever the last lock-on left it, and once in 3 runs the far gate was off screen for the gate walk's first 3 s. The camera read 259 at the gate's prompt with the gate right of centre (console B, 2026-11-14).
This reverts commit 6e7db1b.
story_turn() turns the player with the left stick, but the camera stayed on the old facing, so the gate walk's forward hold and the pillar reader went the old way. face_heading() now ends with L, which puts the camera behind the player. 03.08's far gate leg faces 265 first again (the camera read 259 at the prompt). Engine test expects the L.
The "Registered!" banner is missed at times (console B 2026-11-14 19:36: plate "not caught", a throw, no banner over 208 frames, yet Mareep in the party), so the banner tally undercounted and the patrol walked on after all five species were in the party. PartyBarDetector counts the overworld party bar's filled slots: a slot's HP bar (green, yellow or red over the dark trough) under its icon, plus the slot whose partner is sent out (the D-pad down marker's, a Poke Ball and no bar). Measured on 1920x1080 frames: bars on rows 1028-1031, slot i at x = 0.045 + 0.0398 i, 0.026 wide; the card rows 1021-1025 above give the trough's reference brightness. Three frames in CommandLineTests/PokemonLZA/PartyBarDetector/ expect 5 (local for now, as for the other PLZA frames). patrol_and_catch() reads the count before the first stop and after each stop that threw, and party_has_species() (SpeciesCheck, with a case table) ends the patrol at goal.dex_species. The tally stays for the log and the failure message; the plan's why says the bar decides.
…the skip badge's icon via ButtonDetector choose_dialog_option() read the selection arrow's y and compared it after each down press, so a choice that opens with the cursor off row 0 picked the wrong row. It now reads the row with upstream's get_current_selector_index() on dialog_choice_rows_box() (anchored on the tourist choice: arrow y 656-712, rows 80 apart at 1080p), presses the difference up or down, and reads the row again before A. dialog_choice_moves() carries the press math; its cases are in PokemonLZA_AutoStoryDialogs_Tests. SkipPromptDetector's icon test is ButtonDetector(ButtonType::ButtonPlus) on a 38x38 box around the badge's (+) disk instead of a white share; the text and strip tests stay. The synthetic badge frame draws the disk with its dark plus.
…alog 03.08b to_research_lab: the lab gate scene takes the marker away and starts its talk 9 to 11 s later. The walk's camera sweep ends about then, and a single frame after it missed the dialog in one run of four (console B, 2026-11-14 21:19).
choose_dialog_option() read the arrow's row with get_current_selector_index() on dialog_choice_rows_box(), whose top fit only 2-row menus: the panel is bottom-anchored and grows upward, so the Research Lab elevator's 3-row "which floor?" put the arrow above the box (console B, 03.09, 2026-11-14). read_dialog_choice_rows() now counts the rows from the bottom up, one 80 px pitch each at 1080p: a slot is a row when its right strip is the white highlight, or the panel's dark blue with text at the row's start; the first slot that is neither ends the menu. The selected row is counted from the top. Tests: synthetic 2/3/4-row menus and flat frames, the tourist's 2-row frame and the elevator's 3-row frame (CommandLineTests pin bumped).
r6 on console B (2026-11-14) passed 03.09 without Mable's talk or the TM:
- a walk with no end event returned once its inputs were queued, before
they ran: it now ends with one look (finish_walk(), which waits for them)
and logs where it stopped;
- to_mable holds its last leg until her dialog box ("end": "dialog") and
fails as walk_no_end without it;
- mable_talk is a "talk" scene (SceneOpening::TALK_FIRST): free control
before a box or choice no longer ends it, the start window fails it;
- press_a_until_quiet() counts quiet and timeout from its first look
(QuietPresses), not from before the menu's A ran, and
claim_mable_research_reward() fails when no dialog showed.
03.09 now ends on the game's autosave on 3F after the elevator ride. 03.09b starts there, at the elevator in the Director's Office, and reloads that save when chained after 03.09: to_mable's legs were measured from the reloaded save, and the ride leaves a different facing (user, 2026-11-14).
The autosave loads facing the desk; the 2026-11-10 legs came from a hand save at the elevator door facing the windows and walk into a wall from the autosave (r6, r7). Measured by hand on console B: left 0.9 s, back to the desk's way 1.3 s, right into Mable's talk.
03.09b r8: the new route reached Mable; her talk came as a black fade 6 s into the walk and her box after the last leg's hold had run out, so the walk failed as walk_no_end with her talk on screen. Once a fade shows, the stick stays released and the walk waits up to 5 s for the end event.
r9: the 5 s wait after the fade ran out during the camera pan before Mable's box (her box came later; the screen read nothing in between). The fade is the scene taking over: the walk ends there and the talk scene after it waits for her box (45 s start window).
to_mable's scripted run sees a black fade one slice into its held last leg: the walk passes with no slice after the fade. With the FADE_BLACK return disabled it holds on to the end of the leg and fails walk_no_end (red run: tmp/plza-fade-red). 03.09b to_mable's first leg is written -90 (left) instead of 270: the same stick angle, inside the story lint's -180..180 range, which failed #335's CI.
03.07d (from the Pokemon Center into Wild Zone 1) goes with its walk_to_zone_1_start action, at_zone_1_start() and their tests; 03.07 runs straight into 03.08. The checkpoints after it carry no letter suffixes: 03.08b is 03.09, 03.09 is 03.10 and 03.09b is 03.11.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #356.
Also depends on #474.
Also depends on #477.
Also depends on #332 (merged in: the shared TalkOver's
calm).Adds Main Mission 03 checkpoints 03.01 through 03.08 and Wild Zone 1 catch routines, including CaughtMarkReader, DexRegisteredDetector, map/Pokedex tutorial scene actions, fast travel, and Mable's research reward claim.
PLZA reads its checkpoint files through the shared story loader from #474 (
Pokemon::load_story_data, the dev-folder override, the execution keys andStoryActionNotImplemented) and drops its own copies; a new test pins the production rows by dropdown index with their autosaves and reloads.03.07d now runs from the heal's save at the Center to 03.08's start in Wild Zone 1 by 03.06's measured walks (marker-following from inside the Center ended in the lobby on console B, 2026-11-14), then checks the end with the far-gate distance (127 +- 10) and a new MinimapZoneDetector (the player's arrow on the zone's green); 03.08 starts in the zone. Detector tests read .png frames too and add the CatchesToZone1Start folder; CI pins CommandLineTests to 95b9aa8b9 (repaired main, adding only those 8 frames).
Reloads (the run's start save, a retry, a boundary reload,
load_backup_save) now go through #477'slaunch_story_gameinstead ofgo_home+reset_game_from_home, failing aslaunch_failed; the backend reports HOME asSWITCH_HOME_MENU, and #477's sharedPokemon::switch_launch_promptsanswers the Switch's Close software, user select and update screens. PLZA's policy keeps the title's Up, B + X backup combo; its title check is loose (any non-fade, non-overworld screen after the launch) and there is no HOME tile reader yet, so the tile under the cursor is taken as PLZA's as before. Compiled locally; not yet run on console.Scene mashes now end on the shared
Pokemon::TalkOverwith a 1 scalm(the party bar held), read through the backend'sobserve(). Two behaviour changes from the old rule, which waited whenever the party bar showed: the party bar with a box now presses the text button and with a choice presses A, and a battle HUD with the party bar no longer ends an overworld mash after 1 s (no current plan has a scene step before a battle). Failures are nowscene_never_started/scene_timeoutOutcomes instead of a throw; new rows in the PLZA AutoStory table tests pin the changes.03.08's catch patrol now ends on the overworld party bar, not the "Registered!" banner tally: the banner is missed at times (console B 2026-11-14 19:36, Mareep caught with no banner seen), so the patrol walked on after all five species were in the party. A new
PartyBarDetector(Inference/) counts the bar's filled slots (an HP bar under the icon, plus the sent-out slot's Poke Ball; boxes measured on 1920x1080 frames),patrol_and_catch()reads it before the first stop and after each stop that threw, andparty_has_species()(SpeciesCheck, case table in CatchPlan_Tests) ends the patrol at 5. Its three test frames (PokemonLZA/PartyBarDetector/party5_*.png) are local only, like the other PLZA frames (#356), so those three image tests fail on CI until the frames land in dayfine/CommandLineTests. Compiled locally; not yet run on console.