Repository navigation
Conversation
Adds a "Stop for Starter RNG" option (off by default) to BDSPAutoStory. When on, plan_story_run() stops after 00.01 saves at the Verity Lakefront (17, 14) facing north, where 00.02 and Starter RNG (PokemonAutomation#1366, Start point: Verity Lakefront) start. With it off, the table and run are unchanged.
…ostory-starter-rng-handoff
dayfine
left a comment
There was a problem hiding this comment.
Reviewed SHA: db63d7e
Verdict
APPROVED (LGTM_with_nits)
Base is bdsp/autostory-v4; independent of #438. Reviewed this PR's own diff (6 files, +174/-6).
Off by default leaves the story unchanged: confirmed. plan_story_run() with starter_rng = false copies rows first..last unchanged and stop = NONE. saved_before_the_run(plan.rows, 0, start) is the same as the old (checkpoints, first, start), and rows_that_stop, make_story_segment and start_story see the same rows. Rows are copied into plan, which outlives run_segment, so the &row captures in make_story_segment stay valid. The table test checks that the full table comes back with no stop. Programs boundary is clean: no Qt, std::thread, mutex or std::filesystem.
Findings
- (medium) The handoff save (
save_for_starter_rng) has an emptyaction, soStoryExecutor::savetakes the uncheckedsave_game()branch. Every other start save passessaves_inand checks the save card's place, and a mismatch is fatal. This is the one save the Starter RNG run will reload from, so it should be checked too. Give itaction = "Verity Lakefront", which is 00.02'ssaves_in. - (low) With the option on and Verify mode starting at 00.01,
verify_story_checkpointruns the extra save and overwrites the Lakefront save. Either reject the combination with aUserSetupErroror skip the handoff in verify mode. - (low) The handoff text is written twice: in the option label and in the
handoffstring inprogram(). Keep oneconstexprstring. The text also says to "let Rowan's scene finish out of the lake", but the standalone Starter RNG in #438 leaves the game on the Summary page by default. Say what state the user must restore before saving. The text claims aStart point: Verity Lakefrontoption that only exists once #438 lands, so the PR is unusable on its own. - (nit)
StoryRunPlancopies every row's step vector. Copying rows is fine here, but a comment saying why would stop a later "optimisation" to pointers. - (nit, Code Health, advisory on fork PRs) 1 failure:
StoryTable.h:68has an undocumented namespace-scope header symbol.header_symbols=7is advisory. Tests build their messages with+; usestd::format.
Style (AGENTS.md control-flow rules, designated initialisers with defaults, std::string_view constants) is fine in the new code.
…ity Lakefront card
…doff text; no handoff in verify mode
|
Review fixes pushed (tip d141c1a): handoff save is named for the Verity Lakefront so the save-card check matches; handoff text deduplicated into one constant; tests check the card action. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Base:
bdsp/autostory-v4(#128)Adds a Stop for Starter RNG option (
STOP_FOR_STARTER_RNG, off by default) to BDSP AutoStory so a playthrough can hand off to the standalone BDSP Starter RNG program (PokemonAutomation/Arduino-Source#1366) at the Verity Lakefront without coupling AutoStory to unmerged RNG code.Why
00.01->00.02(Verity Lakefront)00.01(Twinleaf -> Lakefront) ends atVerityLakefront (17, 14)facing north (1 tile south of the warp into Lake Verity), and00.02(Lake Verity) saves at its start (saves_in = true).PokemonAutomation/Arduino-Source#1366supportsStartPoint::LAKEFRONT("Saved outside the entrance to Lake Verity"), whereStarterRngloads the save, calibrates player blinks at the Lakefront, walks up into Lake Verity, and manipulates the briefcase starter.STOP_FOR_STARTER_RNGis enabled on a run covering00.01,plan_story_run()truncates the run after00.01, appendssave_for_starter_rng(StoryStepKind::SAVE) atVerityLakefront (17, 14)facing north so00.02's start save is on disk, and stops with instructions to run Starter RNG (Start point: Verity Lakefront) and resume AutoStory from00.03(Lake -> Sandgem -> Mom).Changes
PokemonBDSP_AutoStory_StoryTable.{h,cpp}:STARTER_RNG_HANDOFF_ROW = "00.01",StoryHandoff,StoryHandoffs,StoryRunPlan, andplan_story_run().PokemonBDSP_AutoStory.{h,cpp}:STOP_FOR_STARTER_RNG(BooleanCheckBoxOption, defaultfalse) and wiredplan_story_run()intoAutoStory::program().PokemonBDSP_AutoStory_StoryTable_Tests.cpp&PokemonBDSP_AutoStory_StorySimulation_Tests.cpp:00.01Lakefront handoff, appended save step, and no-op behavior when disabled or starting past00.01.Tests
PokemonBDSP::AutoStory - Story table: rows lint, variants knownPokemonBDSP::AutoStory - Story table: each row starts where the last one endsPokemonBDSP::AutoStory - Starter RNG handoff: stops after 00.01 saved at the Verity LakefrontPokemonBDSP::AutoStory - Simulation: start and end checkpoints