Skip to content

BDSP AutoStory: settle and Center visit on the shared seam-5 code - #549

Closed
dayfine wants to merge 319 commits into
bdsp/center-run-settlefrom
bdsp/seam5-adopt
Closed

dayfine wants to merge 319 commits into
bdsp/center-run-settlefrom
bdsp/seam5-adopt

Conversation

@dayfine

@dayfine dayfine commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Depends on #375 (base bdsp/center-run-settle); folds in #353 (story engine) and #523 (seam-4 fault sweeps), and has #546 merged in, so the diff shows the story engine, seams 4 and 5 and this change.

BDSP AutoStory moves onto seam 5's shared settle loop and Center visit (#546's adoption list, step-5 design note decisions 1-6).

  • talk_over() is a SettleIO over the console (observer, B/next presses, wild-battle flee) and calls run_settle; TalkOverSpec::rule becomes settle (a SettleRule). StoryStepIO::settle passes settle_rule(kind). BDSP's SettleKind and TalkOverRule::door are gone: the merge took AutoStory: shared settle loop and Pokemon Center visit #546's SceneJudges/ScreenEvents, and the door timings (1 s / 2.5 s, 200 ms looks) are now the shared table's.
  • run_into_center/CenterEntry give way to BdspCenterVisit : CenterVisitIO (runs north in and south out on the StoryStepIO, its settle). ConsoleStory::heal runs run_center_visit with a console subclass: route turn before each run, enter_lit_door lineup, talk_to_nurse + B through her last line, place() = pokemon_center_inside or indoors() (the old exit check's room read). A failed check now returns heal_enter/heal_exit instead of throwing.
  • The sim: play_scene runs run_settle on a scripted clock; SimExecutor::heal runs the same visit (SimCenterVisit), the nurse not played; SimCenterDoors knobs per heal step (slow fade-in played through the door settle, late fades, a run out that stays inside).

Testing

  • New Console failure on the sim cases: 00.04b with a 4 s Center fade-in, with late fades at both doors, and with the run out stopping inside (r143a, must fail heal_exit; red before, as the sim never walked out).
  • Fault sweep: new late fades at a Pokemon Center's doors class per row; slow fade-in after every warp now also plays a 4 s Center fade-in on every heal step. Known-failing lists unchanged.
  • Touched files compile locally (clang, no warnings); code health 0 failures. Fork Draft CI runs the suites. No console run.

dayfine and others added 30 commits November 12, 2026 18:50
FRLG's loop also ends where the user takes over (target hit but not shiny,
attempts spent); that is a stop with a message, not an error. A shiny is a
continuation whose rows the game builds, so the seam carries no rows.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Folded leaf PR #445; tree equals the leaf tip.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Folded leaf PR #329; tree equals the leaf tip.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…ange-options

Folded leaf PR #320; tree equals the leaf tip.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…tion, engine)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…kpoints (set_pause_points)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
An empty or dropped frame has count 0 and zero stats, which level_of() read as uniform and dark, so it could start or extend a black fade and give a false FADE_BLACK warp. push() now skips such samples. Tests mix empty frames into a scene and into a rise. Also: named bool args, optional beat in the talk-over test, no issue numbers in comments.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
SourceFiles.cmake and Pokemon_AutoStory_Tests.h: keep both sides' lists.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…ay and notification text

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…emonAutomation#1894)

Prevent an OCR misread from making a non-boss as boss during boss battle.

- Leave the boss empty in header read if not GlobalState::opponent_fits_stage() in process_header_read
- Retry the OCR in summary read, which makes a valid boss string more likely
- accept_opponent() then only records a valid boss
- boss_if_caught() returns the boss only after the fourth win
- If the boss is still empty, throw (same as before)


Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine and others added 7 commits November 14, 2026 22:53
Pokemon Navigation: shared fault sweep runner, seeded rows and known-failing list
…dopt

# Conflicts:
#	SerialPrograms/Source/ComputerPrograms/ComputerPrograms_UnitTestRunner.cpp
#	SerialPrograms/cmake/SourceFiles.cmake
#	devtools/maps/tests/test_leg_trace.py
…nner

The fault sweeps build SweepVariants for Pokemon::run_sweep() under
sweep_clean_first(); both known-failing lists are Pokemon::KnownFailing,
with a new test that each SimFailureCases entry names a case; the
wanderer rows run on run_seeds() (8 seeds, as before). Case names move
out of the inputs; test names and the known-failing entries (0 sweeps,
3 cases) are unchanged.
run_settle() is one settle loop over TalkOver for every game, with the
rule for each SettleKind (talk, after a warp, door) in one table. The
door rule (1 s of the player still, 2.5 s calm, a look every 200 ms)
comes from the BDSP tree as TalkOverRule's quiet and still fields and
the PLAYER_STILL screen event.

run_center_visit() is the shared order of a Center visit: in, settle,
check inside, heal, out, settle (door or after warp), check outside.
Games give the walks, reads and nurse through CenterVisitIO.
Door times private to the settle table, SettleEnd::Result nested, the
IO last in run_settle() and the visit functions.
…sp/seam5-adopt

# Conflicts:
#	SerialPrograms/Source/CommonTools/ScreenEvents/ScreenEventTypes.h
#	SerialPrograms/Source/CommonTools/ScreenEvents/ScreenEvents.cpp
#	SerialPrograms/Source/Pokemon/AutoStory/Pokemon_SceneJudges.cpp
#	SerialPrograms/Source/Pokemon/AutoStory/Pokemon_SceneJudges.h
talk_over() and StoryStepIO::settle run Pokemon::run_settle with
settle_rule(kind); BDSP's SettleKind and TalkOverRule::door give way to
the shared ones. ConsoleStory::heal and the sim's heal run
Pokemon::run_center_visit through BdspCenterVisit (enter_lit_door,
talk_to_nurse, run_into_door; pokemon_center_inside or indoors() as
place()). The sim's play_scene runs the same loop. New sim cases for a
slow Center fade-in, late fades and a run out that stays inside
(heal_exit); fault sweep LATE_FADE and SLOW_FADE_IN on Center visits.
…the policy asks

BDSP's title plays an attract movie, a town with people walking, that
reads as the overworld; on console B (2026-11-15 03:42) the launch
settled on it before the title took a press. A policy with
overworld_after_load answers such a look with the title press and counts
the overworld only after a title press and then the load's black.
Console B, 2026-11-15 04:21 (BDSP, Japanese): ZL on the title's attract
movie went back to the title through a black, and that black counted as
the load; the title, read as the overworld, then settled. With
overworld_after_load, a press on an overworld look no longer arms the
load, and a title showing again clears a black seen before it.
Console B, 2026-11-15 04:21, the game in Japanese: the launch never read
the title (its check, a quiet screen, never held: the title shows
PLAYER_CAN_MOVE) and settled on it. title_screen_shown() reads the red
line under the logo and the starfield's dark bottom corners, which every
language shares; the launch look carries it as TITLE_READING, and the
policy turns on overworld_after_load so the boot's logos and the attract
movie take ZL without counting as the overworld.
The old pin 7d108a25 lacked upstream FRLG FrontSprites, FrontSpritesShiny
and PokeballSprites, so 72 FRLG sprite-reader tests failed with
"Unable to open file". b4d7d425 merges PokemonAutomation/Packages master
into the BDSP option-template branch.
dayfine and others added 2 commits November 15, 2026 14:43
make_UNIT_TESTS_ALL() passed the code-health function length limit (50 lines)
once the SimSweep, SimSeeds and KnownFailing suites were added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine added a commit that referenced this pull request Nov 17, 2026
Conflict in PokemonBDSP_AutoStory_Walk_Tests.cpp includes: drop the duplicate
Utils/Walk.h include, as #375 resolved it.
@dayfine
dayfine changed the base branch from bdsp/seam4-adopt to bdsp/center-run-settle November 17, 2026 16:50
@dayfine

dayfine commented Nov 19, 2026

Copy link
Copy Markdown
Owner Author

Closing: its parent #523 was closed, and BDSP takes the shared settle and Center code when it moves onto the shared core (#648) and grid (#653), last in the order. The branch stays for reference.

@dayfine dayfine closed this Nov 19, 2026
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.

4 participants