Skip to content

PokemonLZA AutoStory: the program - #569

Draft
dayfine wants to merge 13 commits into
plza/upstream/p4-01from
plza/upstream/p4-02
Draft

dayfine wants to merge 13 commits into
plza/upstream/p4-01from
plza/upstream/p4-02

Conversation

@dayfine

@dayfine dayfine commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Depends on #568

Adds the "Auto Story" program for Pokemon Legends: Z-A to the Public Betas panel list: it runs the checkpoints from the start one to the end one with the shared run options (verify, save mode, reload at start), on the built-in plans. The user picks the new game's language, look and name by hand; 01.00 starts on the Confirm Choices screen that follows. No new unit suite; the program is the story game of #568 on the console backend of #559.

@dayfine

dayfine commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

API review (claude-sonnet-5-5) at 0dade67: changes_requested

The program wiring is mostly sound. The verify path returns early and never runs GO_HOME_WHEN_DONE, which is a behavior bug. The range check throws a misleading message for one of its two conditions. The rest is style: a new bool parameter, a duplicated policy branch, and the checkpoint list being read from two sources.

  • [bug] SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStory.cpp:221 The verify branch sends the finished notification and returns without calling GO_HOME_WHEN_DONE.run_end_of_program(context). The normal path does call it, so the option is silently ignored whenever Verify is enabled. Fix: Call GO_HOME_WHEN_DONE.run_end_of_program(context) after the finished notification in the verify branch too. Or restructure so both paths share one 'finish' tail.
  • [bug] SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStory.cpp:195 One check covers two cases, first > last and last >= rows.size(), but it always throws 'The start checkpoint must not come after the end checkpoint.' An out-of-range index, for example a saved dropdown value after the table changes, gets a misleading message. Fix: Split into two checks with distinct messages. Throw a 'checkpoint selection is out of range' error for last >= rows.size(), and keep the ordering message for first > last.
  • [style] SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStory.cpp:132 New helper start_from(..., bool backup_first) takes a bool parameter, and the call site passes the option implicitly converted to bool. That is hard to read and breaks the repo's no-new-bool-params guidance. Fix: Pass an enum class, or take const BooleanCheckBoxOption& and name it start_from_backup_save. Alternatively, fold the two options into a single StartFrom choice.
  • [style] SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStory.cpp:178 run_policy takes a BooleanCheckBoxOption& only to test it once, and both branches repeat the same designated-initializer line, differing only in the enum value. Fix: Pick the BoundaryReload value in the if/else, log, then build the StoryRunPolicy once. Pass bool reload_at_boundaries instead of the option object.
  • [nit] SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStory.cpp:63 The dropdown labels come from story_checkpoints(), but program() indexes builtin_story_data().checkpoints with RUN.start_index(). Two sources have to agree for the indices to line up, and nothing enforces that. Fix: Build the database from builtin_story_data().checkpoints, or index story_checkpoints() in program(), so there is a single source of truth.
  • [nit] SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStory.cpp:48 The descriptor uses PanelQualityStanding::DEVELOPER, but the panel is registered under the 'Public Betas' section. The two are inconsistent, and the badge or visibility may not match what the section promises. Fix: Use the BETA standing to match the section, or move the entry to Developer Tools if DEVELOPER is intended.
  • [nit] SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStory.cpp:94 Bare true/false literals in the existing option constructors (LANGUAGE true, RELOAD_AT_BOUNDARIES, START_FROM_BACKUP_SAVE and GO_HOME_WHEN_DONE false) give no hint of what they mean at the call site. Fix: Add argument-name comments, e.g. /*required=*/true, /*default_value=*/false.
  • [nit] SerialPrograms/Source/VideoGames/PokemonLZA/Programs/AutoStory/PokemonLZA_AutoStory.cpp:19 The include order is not sorted: Pokemon_AutoStoryStats.h comes before Pokemon_AutoStorySelect.h, and 'Select' sorts before 'Stats'. Fix: Swap the two includes to follow IncludeOrder.md.

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