Skip to content

PLZA AutoStory (long-lived branch) - #576

Draft
dayfine wants to merge 1057 commits into
mainfrom
plza/autostory
Draft

dayfine wants to merge 1057 commits into
mainfrom
plza/autostory

Conversation

@dayfine

@dayfine dayfine commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Base: main. Long-lived branch, not for merge: the diff is the whole PLZA AutoStory.

The full PLZA AutoStory, kept building against main as the shared copy; slices are cut from it toward upstream, and it merges the reviewed slice chain back in (now plza/slice2/b, #572-#582: StoryRangeOptions in Pokemon/AutoStory/Options, add_tests_AutoStory() as the one collector, the CheckpointPrefix enum and the slices' new test suites). This PR exists so Fork Draft CI builds and tests the branch; CommandLineTests is pinned to dayfine/CommandLineTests 5332427 (#18).

Nine AutoStoryScreenEvents frames are missing from CommandLineTests and their cases are skipped as pending a recapture on console B: za2_m3o_s1, za2_m3p_s1, za2_m2q_s1, za2_hud_s1, za2_hud_s3, za2_m2n_s1, za2_m2m_s1, za2_m3s_s1, za2_m3w_s2 (PokemonLZA/AutoStoryScreenEvents/*.png).

dayfine and others added 30 commits November 13, 2026 20:57
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
The checkpoint lines take `bool add_checkpoint_prefix = true` in place of
`display_text`. SV passes its checkpoint text as `checkpoint` with the prefix
off, so NO_CHECKPOINT_ID goes. Literal positional arguments carry a
parameter-name comment. SV's reset lines now pass the attempt limit slot
explicitly (they passed the text into it before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…dd_checkpoint_prefix (#45)

Conflict in PokemonSV_AutoStoryTools.cpp reset lines: took #45's add_checkpoint_prefix form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…_checkpoint_prefix (#45)

Conflicts in PokemonSV_AutoStoryTools.cpp: kept this PR's retry-loop
rewrite. CheckpointAttempts::display_text becomes add_checkpoint_prefix,
and CheckpointRetry passes its checkpoint text with the prefix off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…on; guard empty frames

The detector tests become two tables of {name, Input, Expectation}: synthetic
frames with what each detector must read on them, and recorded frame folders
with their frame count and per-frame reads, one runner each. A synthetic case
checks only the detectors it names, so the cases assert what the old bodies
did. Adds an empty image, on which every detector reads no.

PlatformArrivalDetector returns no on an empty frame instead of reaching
NaN distances; the reference's hex colors parse with from_chars and throw
ParseException on a bad digit; region loops use std::size. Frame file names
that are not numbered are skipped instead of throwing from std::stoi, and
the frames folder lookup returns an optional instead of "".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
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
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
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

# 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
- Story table: 25 walks, not 28. The tests are stale: a6e3275 dropped
  03.07d and its three walks on purpose and left the count.
- 03.11 to_mable (dialog box, black fade): the scripts are stale. They came
  from plza/story-engine before 1e4ccf6 (plza/fault-sweep) made
  run_story_move() look once before the legs and after each turn and walk
  (the still-screen replay); those six looks ate the scripted slice looks.
  The scripts now give the six looks on free control before the slices.
- Screen events: a frame missing from CommandLineTests fails with
  "Missing frame <path> in CommandLineTests: it needs a recapture." instead
  of a bare FileException. The cases get names (name/input/expectation).
The PLZA story game on the shared engine: the console backend (HOME
check, fades and dialog boxes, platform/autosave/advance-arrow readings),
Confirm Choices, the recorded walks with their screen checks, four GAME
actions (confirm_new_game, opening_to_platform, wait_for_platform, walk),
the autosave save and latest-save reload, checkpoints 01.00 and 01.01
(to the white fade) built in, and the AutoStory program.
01.01 now runs on past the white fade: mash_to_move_hints presses A
through the arrival scenes until the controls hint holds a second or the
MAIN MISSION 01 banner shows on two looks. It is a scene machine over the
shared ScreenMachine (CommonTools/ScreenMachine, with StepTrace), which
runs states on ScreenObservations so it works on a console and on a
scripted backend alike. The console backend reads two new detectors,
the controls hint and the mission banner. 01.01's save is unverified.
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.
…ests_AutoStory collects the AutoStory suites
… line, comments); SV drops unneeded remove_listener calls
# Conflicts:
#	SerialPrograms/Source/ComputerPrograms/ComputerPrograms_UnitTestRunner.cpp
#	SerialPrograms/Source/Pokemon/AutoStory/Pokemon_AutoStory_Tests.h
#	SerialPrograms/cmake/SourceFiles.cmake
# Conflicts:
#	SerialPrograms/Source/ComputerPrograms/ComputerPrograms_UnitTestRunner.cpp
#	SerialPrograms/Source/Pokemon/AutoStory/Pokemon_AutoStory_Tests.h
#	SerialPrograms/cmake/SourceFiles.cmake
# Conflicts:
#	SerialPrograms/Source/ComputerPrograms/ComputerPrograms_UnitTestRunner.cpp
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.
StoryLog and CheckpointAttempts take the slices' CheckpointPrefix enum in
place of the defaulted bool; the party bar detector closes its namespaces
with comments; walk_to_zone_gate_entrance logs the A prompt through a helper
to stay under 50 lines.
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