Skip to content

AutoStory: run options, language and checkpoint range dropdowns - #543

Draft
dayfine wants to merge 14 commits into
plza/upstream/s2-08from
plza/upstream/s2-09
Draft

dayfine wants to merge 14 commits into
plza/upstream/s2-08from
plza/upstream/s2-09

Conversation

@dayfine

@dayfine dayfine commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Depends on #542

Adds the options every AutoStory program shows: the language dropdowns per game, the start/end checkpoint range with its order check, and the run policy (how hard to try, check level, language, when to save) with the StoryCheckLevel type it chooses from read into the shared segment policy, plus story_checkpoint_database() for the range dropdowns. No program in this chain constructs StoryRunOptions: Used by the PLZA program PR (batch 2). Tests: the StoryRangeOptions, StoryRunOptions and AutoStorySelect suites and the StoryStepExecutor cases that read run options, built and run by Fork Draft CI. Part of the re-split of #522/#524/#525 into reviewable steps; review fixes are new commits on the PR that owns each problem, merged up the chain.

@dayfine dayfine left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed SHA: e2e48e9

Verdict

NEEDS_REWORK

First-pass review of this PR's own diff against plza/upstream/s2-08 (#542). The option logic is sound: range order check, verify-mode one-checkpoint and passes <= runs checks, and "no reload at start means no save". Code health: 0 failures. CRLF kept, no banned APIs, files listed in SourceFiles.cmake. Fork Draft CI (ubuntu / build) was still pending when I looked.

Medium

  1. UI text promises behavior nothing implements. Pokemon_StoryRunOptions.cpp StoryCheckLevel_Database(): "Testing: run each checkpoint 3 times to be sure it really passes". The check level is only handed to the game's steps (check_level()); running a checkpoint N times is Verify Mode. Describe what Testing checks, or drop the claim.
  2. No reader for most of these options anywhere through #545. RELOAD_AT_START, POSTCONDITIONS_ONLY, CHECKS, LANGUAGE, verify_policy() are read only by tests; no program in the chain constructs StoryRunOptions. The description should say which PR wires them into a program, or the options should land with their first reader.
  3. StoryCheckLevel_Database() and StorySaveMode_Database() (Pokemon_StoryRunOptions.cpp:13-34) are external-linkage functions declared in no header. Put them in the file's unnamed namespace (TotW #186), or declare them next to their enums if other code needs them.

Low

  1. Options tests are split across two homes. test_run_options, test_verify_options and test_checkpoint_dropdowns were added to Pokemon/AutoStory/Pokemon_StoryStepExecutor_Tests.cpp, while this PR also adds Pokemon_StoryRunOptions_Tests.cpp and Pokemon_StoryRangeOptions_Tests.cpp. Move them next to the options they test.
  2. Pokemon_StoryStepExecutor_Tests.cpp test_run_options: the comment and failure text say "Thorough checks by default", but the check (correctly) expects StoryCheckLevel::DEFAULT. The message also mentions "no stop at the first failure", which nothing checks.
  3. Pokemon_StoryRunOptions.h:99 refers to StoryLaunchRequest::Running::RESTART / Running::KEEP, which arrive only in #545. Reword without the type, or note where it comes from.
  4. Question: Pokemon_GameLanguages.h says the Gen 8-9 games "have one Spanish (Spain)". I believe Legends: Z-A added Latin American Spanish. If so, the comment should say so even though Language has no enum value for it yet.
  5. Pokemon_StoryRunOptions_Tests.cpp: const ReloadAtStartCase m_case; with std::move into it. Drop the const (the move is a copy anyway), as the other test classes in the chain do.

# Conflicts:
#	SerialPrograms/Source/Pokemon/AutoStory/Pokemon_AutoStory_Tests.h
#	SerialPrograms/Source/Pokemon/AutoStory/Pokemon_StoryStepExecutor_Tests.cpp
…ses file-local

The Testing check level said it runs each checkpoint 3 times, which is
verify mode's job; the text now says what it checks. The two dropdown
databases are declared in no header, so they move into the unnamed
namespace. Also finishes the executor test table merge.
@dayfine

dayfine commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

Review fixes, tip 8303d68f3:

Fixed: 1 (Testing no longer claims 3 runs), 2 (description names the PLZA program PR, batch 2), 3 (the two databases are in the unnamed namespace).
Not changed: 4, 5, 6, 7 (needs a check of the game's language list), 8.

@dayfine

dayfine commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

Second fix round, tip b8158ced4: StoryCheckLevel (Types/Pokemon_StoryCheckLevel.h/.cpp) is now added here, unchanged, with the run options that choose it, instead of in #531 (commit fdbe366). The merge chain was checked for conflict markers before the push; none.

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