Skip to content

PokemonLZA AutoStory: program, engine glue and the new game (01.00) - #354

Draft
dayfine wants to merge 64 commits into
plza/story-detectorsfrom
plza/story-base
Draft

dayfine wants to merge 64 commits into
plza/story-detectorsfrom
plza/story-base

Conversation

@dayfine

@dayfine dayfine commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Depends on #416.

Adds the PLZA AutoStory program, its StoryEngine backend and action glue (PlzaConsoleBackend, PlzaScreenObserver, SceneMachine, Dialogs, Moves, Scenes, ConfirmChoices, StepValidator, StoryFiles), and the new game's checkpoint 01.00. The user starts a new game and picks the language, look and name by hand; 01.00 starts on the Confirm Choices screen that follows, checks it (UserSetupError and no press anywhere else), picks Ready! and plays the opening to the station platform. Screen readers are in Detectors/ and nothing there presses; Game Language is a required option, as in SV AutoStory, used to read the fast travel menu. The old intro picks and 00.00 live on as a dev-only branch (#471). Tested with the offline engine, scene machine, screen event, story table and Confirm Choices reader tests on Fork Draft CI.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

…w game (01.00)

The base of the PLZA AutoStory stack: the program on the shared story
engine (backend, story game, scene machine, screen events, observation),
the detectors (Detectors/), the dialogue, walk and scene actions
(Actions/), the step validator, the story table and its files, with their
unit tests, and the first checkpoint, 01.00: a new game from the title
screen to the station platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine and others added 6 commits November 10, 2026 21:37
Moved down from plza/story-engine: mash_scene() presses A on a tutorial
card (tutorial_card_shows()), and choose_dialog_option() presses A when
no choice arrow shows within 3 s (the Research Lab elevator).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The walk action's legs move from INTEGER_ROWS to the engine's TIMED_LEGS
([turn degrees, ms]), so a leg's shape is checked when the plan loads and
the validator only checks the ranges. The fly action's target was a
GRID_POSE naming the place as its map; a game with no tiles may not take
tile args now, so it takes the place's slug as a WORD "place".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
# Conflicts:
#	SerialPrograms/CMakeLists.txt
@dayfine dayfine changed the title PokemonLZA AutoStory: program, engine glue, detectors and the new game (01.00) PokemonLZA AutoStory: program, engine glue and the new game (01.00) Nov 12, 2026
@dayfine
dayfine changed the base branch from autostory/engine to plza/story-detectors November 12, 2026 06:28
dayfine and others added 15 commits November 11, 2026 22:47
…ngs.h

The header now holds only the *_READING names; plza_observation() moved to
the shared Pokemon::screen_observation(). Point the stale comments at it and
include Pokemon_ScreenObservation.h where it is called.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…(tests first, stubs)

The language pick, look picker and name now take the program's options;
the presses are pure functions in PokemonLZA_AutoStoryIntro with tests.
This commit has the tests and stubs; the next fills them in.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Fills in the intro's pure functions: the language list's DOWN count, the
look picker's moves from the top-left, and the name's keys with Shift for
the capital first letter. Options: PLAYER_NAME, PLAYER_LOOK and
NAME_FIRST_LETTER_AUTO_CAPS; the language is the run's. Each screen
logs every press and saves its frame, with detector hooks to fill in.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
A new game has no title screen: launch goes straight to the language
list, so the old blind A picked English. 01.00 now starts on HOME (closes
the game, launches it with start_game_from_home(), which handles the
online license check) or on the language list itself, and fails with a
setup error otherwise. The list's detector reads which of its 10 boxes
is highlighted; the cursor moves one press at a time and is read back
before A. Entries map per console B's 2x5 grid (Spanish = Espana).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…tem keyboard

01.00 starts on the HOME screen with PLZA's tile selected. Its first event,
launch_from_home, launches the selected tile without moving the cursor
(closing it first if it is running: X, then A on the close dialog), then
waits for the language list. The old start closed the game through a helper
that presses DOWN/UP/HOME, which put the cursor on the first tile and
launched FireRed. The launch takes the first screen's detector, so it can
move to the shared core for BDSP and FRLG.

new_game_language only works the language list. The name screen waits for
the Switch system keyboard (#62's detector) and types with
type_on_system_keyboard(); the look picker is pressed blind and logged as
not checked. Each intro screen, the confirm menu and the frame after
"Ready!" are dumped to DebugDumps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Rerunning the new game no longer needs HOME first: if HOME is not
showing, the launch step presses HOME once (the game in front stays the
selected tile) and reads the screen again; it refuses only with no video
or if HOME still does not show. The decision is next_launch_move(), unit
tested with synthetic rows and console B's in-game/home captures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine and others added 13 commits November 13, 2026 13:30
…o plza/story-base

# Conflicts:
#	SerialPrograms/Source/Pokemon/AutoStory/Engine/Pokemon_StoryEngineRuns_Tests.cpp
The program sets StoryGame::breakpoints from the BREAKPOINTS option and
pause_point to make_story_pause_hook(); PLZA's own timed walk
(run_story_move, walk_until) pauses before each leg in LEGS mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
A chained run reloaded the autosave before every checkpoint whose plan
says "reload_when_chained" (about 30 s each, and extra game resets). Now
that checkpoints split at the game's autosave points, running straight on
is the same state. The new panel option (RELOAD_AT_BOUNDARIES, off) runs
straight through; on, the plan flag reloads as before. A failed
checkpoint's retry reloads either way. The run logs which mode it uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The attempts per checkpoint and the boundary reload travel together, and
program() logs the mode through run_policy(): keeps both under the code
health limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
PlzaConsoleBackend::log() wrote only to the console log, so the overlay
showed nothing. The engine's [Checkpoint], [Event], [Step] and [Save]
lines all go through it, so it now adds each to the overlay too, as FRLG
does with its status hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
PLZA AutoStory: TEXT_BOX -> DIALOG_BOX, BATTLE -> BATTLE_STARTED,
CAN_MOVE -> PLAYER_CAN_MOVE, STILL -> SCREEN_STILL, and the observer's
Pokemon:: screen event types are now PokemonAutomation's. A capture's
file name takes the shared event names with underscores
(black_fade+screen_still), from describe(events, "+").

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
dayfine and others added 7 commits November 13, 2026 22:25
01.00 starts on Confirm Choices after the user picks the language, look
and name by hand, so the program no longer picks them. Removed: the
language list, look picker and name typer actions, the launch from HOME,
checkpoint 00.00 and the look/name options. They are kept on the fork-only
branch plza/dev-new-game-intro for local dev.

The Confirm Choices reader that 01.00 needs moves to
Detectors/PokemonLZA_AutoStoryConfirmChoicesReader, with its tests.
ConfirmChoices presses DOWN to Ready! and A directly instead of through
the intro's key list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Detectors/ reads pixels and presses nothing; Actions/ presses. Moved
unchanged: tutorial_card_shows() from Actions/Scenes to
Detectors/PokemonLZA_AutoStoryTutorialCardDetector, and dialog_choice_box()
from Actions/Dialogs to Detectors/PokemonLZA_AutoStoryDialogChoiceBox, so
the screen events no longer include an action header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The language is now PLZA's own required option (no default), like
PokemonSV AutoStory's: the language the game is set to, used to read the
fast travel menu's place names. The shared run options' language dropdown
is hidden for PLZA. Nothing checks that the game matches; a failed
fly_to() names the language it read in and points at the option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Each test is built from one case (input, expectation) of a named table,
as the code-health test-case rule asks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The code-health test-case rule now wants each case as a name, an Input
struct and an Expectation struct. Converts the Confirm Choices reader,
engine, scene machine and story table tables; the cases are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
@dayfine dayfine changed the title PokemonLZA AutoStory: program, engine glue and the new game (00.00, 01.00) PokemonLZA AutoStory: program, engine glue and the new game (01.00) Nov 14, 2026
dayfine added a commit that referenced this pull request Nov 14, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

# Conflicts:
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStory.cpp
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStoryEngine_Tests.cpp
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStoryStoryFiles.h
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStoryTable_Tests.cpp
dayfine added a commit that referenced this pull request Nov 14, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

# Conflicts:
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStorySceneMachine_Tests.cpp
#	SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStoryTable_Tests.cpp
dayfine and others added 2 commits November 14, 2026 00:29
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
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