Skip to content

Prechecks: FRLG AutoStory list (design note; needs the FRLG stack) - #488

Draft
dayfine wants to merge 2 commits into
lab/slice4-prechecksfrom
lab/slice4-autostory
Draft

dayfine wants to merge 2 commits into
lab/slice4-prechecksfrom
lab/slice4-autostory

Conversation

@dayfine

@dayfine dayfine commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Depends on #485

Base lab/slice4-prechecks; the diff is one empty commit. This PR holds a design note only: FRLG AutoStory is not on this base. It lives on the FRLG stack (program added in #352 frlg/stage1-program, current code at the stack tip #458 frlg/stage20-league), which does not contain upstream/frlg-free-party-slots. Per the brief I did not merge the FRLG stack in.

Where it must stack. A branch off the FRLG stack tip (frlg/stage20-league once its agent is done, or frlg/stage19-victory-road now) with lab/slice4-prechecks merged in. A trial git merge-tree of #485 into both is conflict-free. That merge also brings upstream/frlg-free-party-slots (PokemonAutomation#1881) into the FRLG stack, which needs the user's OK.

What I'd change there. In PokemonFRLG_AutoStory.cpp, program() today calls check_setup() and require_preflight() (Pokemon::StoryPreflight: video alive, controller ready, not HOME). I'd replace both with a PrecheckList built by a side-effect-free autostory_prechecks(...) and run by run_prechecks() before verify, the SID Helper stop and any reset:

  • game_open (ALWAYS_RUNS, first): StoryPreflight's video/controller/not-HOME read, as a Precheck.
  • black_border (ALWAYS_RUNS): the existing FRLG black border check from Prechecks: a program's start checks as a named list, FRLG RNG first #485.
  • known_screen (ALWAYS_RUNS): title screen for 01.01 with NEW_GAME_FROM_TITLE, otherwise the overworld or the start menu; refuses a post-run summary or a battle.
  • start_checkpoint (ALWAYS_RUNS, no console read): the start is chosen by checkpoint id, not by index, and refuses a dev-only row while Developer Mode is off; the start/end order and 01.01 rules from check_setup() move here.
  • language (SKIPPABLE): LANGUAGE matches the cartridge, read from the title screen or start menu text where detectable; PASSED with "not detectable here" otherwise.
    The StoryRangeOptions dropdown would need an id accessor (start_id()) so a hidden row cannot shift the index. Native tests (in the style of PokemonFRLG_Prechecks_Tests) would check the list's names and order and that HOME frames, a mismatched language and a hidden checkpoint id each fail with nothing pressed. Programs without a list report unsupported.

Not tested: nothing to build.

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