Repository navigation
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
I had to change some of the checkpoint names again to match what would be expected in the autostory.cpp Added the navigation segments to segment 01 that I'm responsible for and created placeholder navigation functions for oreburgh gate and oreburgh mine.
Updated the small house function in segment 07 to not have issues with the ret declaration. optimized some functions in the segment 00 tools added a default to the fly to location list.
optimized the save_game function Updated starly fight function and the segment 00 routing
updated the catch1pokemon function updated grass movement to more efficiently run from battles addressed issues with movement timings
Segment 09 in part, until having bought all the Full restores with the money left. Draft of the new handle_expert_battle function.
resolved naming issues that prevented compiling the program
Renamed checkpoints to better associate them with certain parts of code and makes adding new ones easier.
This commit adds safer Poketch visibility checks, stronger black/white screen handling, and broader battle/dialog recovery for the Jubilife/Oreburgh story route. It also introduces movement and doorway detection helpers to better navigate exits, trainer encounters, and the Oreburgh Mine path while reducing false negatives and checkpoint retries.
Registers BDSP in the unit test runner and adds screenshot-based bag and menu detector tests, including dev-program entry points and a filename-based test map hook. Also expands BDSP menu and battle detection, adds bag navigation and Escape Rope helpers for AutoStory, and refactors Segment 01 mine and gym logic into shared utility files wired into the build.
Introduces a vision-based Oreburgh mart alignment step (template matching with ambiguity checks) and wires it into the Roark-to-Mars movement path to correct positioning before continuing. It also tightens gym flow timing by waiting through entry cutscene and confirming post-battle dialogue completion via detector-based absence checks, while removing large blocks of obsolete commented-out mine escape/navigation code.
Timed movements, retained menu cursors, incomplete battle cleanup, and resets after catching could leave the tutorial at a different position from the one the next action assumed. Add visual confirmation and reusable BDSP helpers to make Segments 00 and 01 resume and navigate more reliably. - Split tutorial and main-story selections and add the initial settings checkpoint. Detect menu/option positions, retry detection, log the selected settings, verify Autosave is off, and confirm the settings exit sequence. - Establish a saved boundary after the tutorial catch, finish capture and battle-result dialogue before moving, and preserve the diagnostic post-catch entry's continuation into checkpoint 00.05. - Consolidate grass movement around the shared encounter escape routine and optional visually confirmed destinations. Add screen-relative landmark matching for Poketch, the Center, Sandgem, and Route 201/202 positions. - Add a registered hourly lighting test with matcher selection, captures, and match data to evaluate daylight and shadow changes consistently. - Navigate to the Bag explicitly and verify slot-1 HP before/after Potion use. Add one wild training fight after the first Potion pickup, heal afterward, and select Ember for Tristan using the detected move cursor. - Extend BDSP battle-menu inference to count one through four populated move panels and identify the selected slot without assuming four moves exist. - Reuse Segment 01's confirmed Run escape, express mine offsets/tolerances relative to the screen, and restore the Gate-to-mine movement call. Validation: the exact staged source set builds and links SerialPrograms in Debug with Segment 02, later-segment edits, and CommonTools OCR edits excluded. Native screenshot checks cover battle move selection, landmark matching, translated positions, and capture resolution changes; recorded lighting runs were used to refine the tutorial matchers. Live full-route validation remains an ongoing task, not a guarantee supplied by this commit. Scope: includes BDSP panel/source registration and required local helpers; no shared CommonTools or other-game implementation changes. Segment 02 route, its new street/plaza matchers, and the Repel-tab repair remain uncommitted. Resources are published separately to Developer-Butters/Packages. Development limits: diagnostic checkboxes remain explicitly marked for removal before production; option-value templates still require multilingual work. Faint handling and stronger save-result verification remain follow-up work.
Pass AutoStoryOptions to checkpoint_reattempt_loop in the 113 checkpoint calls across Segments 03 through 09. This forwards the selected real/fake checkpoint-save mode consistently instead of passing only the status notification option and falling back to the default save mode. Restore the original LF line endings so the diff contains only the argument changes. No route movements, battle behavior, or checkpoint ordering change. Validation: byte comparison against the parent confirms that substituting the original checkpoint argument produces identical files in all seven segments. The same source contents passed the full Debug build before this line-ending cleanup; the cleanup does not change compilation semantics. Scope: BDSP Segments 03-09 only. Segment 02, its matcher additions and Repel helper repair remain staged and uncommitted. Shared CommonTools OCR edits are excluded.
Register street and Galactic-plaza reference positions for the existing overworld matcher and lighting-test infrastructure. Match static building and fence geometry instead of player/NPC animation or localized signs, require two agreeing landmarks, and expose screen-relative offsets and destination tolerances through the existing matcher result interface. Repair activate_repel's resource path casing and provide native/small selected-pocket references to accommodate capture-resize sampling. Accept either reference while preserving the match threshold and the bounded eight-tab search; no shared image-processing behavior changes. Validation: full Debug application build passed with these changes. All 22 new matcher checks passed across 720p, 1080p, and 1440p captures, positive/negative offsets in both axes, and rejection of unrelated scenes. Earlier Repel reference checks accepted resized selected-pocket captures and rejected the wrong pocket. Full-day lighting and live route validation for the new Jubilife positions remain follow-up work. Required templates are committed to Developer-Butters/Packages on branch BDSP-Autostory. The Segment 02 route file and its locator integration calls remain staged and uncommitted; this commit only publishes reusable BDSP matchers and Bag tools, with no shared infrastructure edits.
After rebasing the 23 AutoStory commits onto PokemonAutomation main, update BDSP code to the APIs introduced by the 299 intervening commits: - Use ErrorReportMode and OperationFailedExceptionWithScreenshot for the existing stream/screenshot failure calls. Keep the base exception catches so the same checkpoint retry handling still consumes these failures. - Include GlobalAutoPaths.h where RESOURCE_PATH and screenshot paths are used, following upstream's separation of those declarations from Globals. - Follow the new SingleSwitchProgram factory and Descriptor-alias pattern for AutoStory and its lighting tester. Replace the old boolean descriptor argument with PanelDeprecation::NOT_DEPRECATED. - Point the BDSP battle helper at the relocated VideoGames/PokemonSwSh type-matchup header; the shared type calculation itself stays untouched. The rebase keeps upstream's shared test tools and deleted TestMap authoritative instead of restoring the fork's obsolete developer-program checkboxes. SourceFiles conflicts were resolved by retaining upstream's build list and applying only BDSP source additions and the existing tool-path relocation. Validation: full Debug SerialPrograms build and link passed on the upstream base. These are interface/header adaptations; controller movements, battle selection, matcher thresholds, and checkpoint ordering are unchanged. The uncommitted Segment 02 route remains preserved outside the rebase. Only upstream interface adaptations to its already-committed code are included. The transition watcher localization and shared-file restoration are documented in a separate commit; no other-game implementations are changed here.
Restore CommonTools/VisualDetectors/BlackScreenDetector.cpp and .h to the exact current PokemonAutomation upstream versions. The fork had extended these shared files with BDSP white-screen and brief black-flash watchers, including a change to the behavior of the shared WhiteScreenOverWatcher. Those changes could otherwise affect callers in every game. Move the extensions into PokemonBDSP/Inference/PokemonBDSP_TransitionWatchers and update only their AutoStory callers and source registration. Preserve the existing BDSP hold/release timings and latched completion behavior. No global aliases or shared-detector API additions are introduced. Why needed: upstream is authoritative and BDSP-specific behavior does not justify changing the global implementation. Localizing these classes keeps the tested AutoStory behavior while removing that cross-game exposure. Validation: full upstream-based Debug application build/link passed. Nineteen focused checks passed for sustained white-screen entry/release, short flashes, latched completion, and the brief black transition. The same harness confirms the upstream shared white-over watcher retains its original semantics. The two shared detector files and shared developer/unit-test implementations are byte-identical to upstream; therefore this commit introduces no detector behavior changes to other games relative to upstream. Gameplay timing still needs continued BDSP recordings as route validation proceeds. Shared changes are intentionally isolated in this commit for review. The staged Segment 02 route work remains uncommitted.
Implement large AutoStory progression updates across Segments 01-03, including fully scripted Route 204/Floaroma/Windworks/Eterna flows, new Segment 02 checkpoint boundaries, and Veilstone pathing/battles in Segment 03. The change adds bounded trainer recovery and battle/menu confirmation logic to prevent movement during dialogue or combat states. Detection and alignment were hardened with new/expanded overworld matchers, lighting-aware reference variants, coarse-vs-final positioning rules, and richer menu/debug diagnostics. It also updates checkpoint retry behavior for fake saves (selected-range retries), improves bag/repel handling (including repel type selection and NEW-flag clearing), and adds supporting documentation/context for the current BDSP handoff.
Refactors AutoStory segment 03 to rely on visual confirmations and encounter watchers instead of long fixed-input sequences. Adds reusable helpers for transition completion, scene confirmation, expected trainer encounters, and bike registration flow, then rewires the Jupiter-to-Coronet path to use them. Also adds new overworld matchers (Cycle Shop entry/interior/counter/reward, Cycling Road north entry, Galactic HQ exterior, Eterna Center departure) and updates Jupiter-room landmark references to avoid NPC overlap, improving route reliability and recovery from timing variance.
Reconcile the saved bridge, stair fallback, and Hearthome locator changes while retaining the 1825 ms descent. Preserve generated Visual Studio snapshots outside the repository and require explicit recording-stop confirmation before any queries.
Handle Fantina camera fades before dialogue, recover the lower stair lane visually before gate travel, and retain the shorter Center approach. Finish the Hall checkpoint at its watched outdoor exit, remove the unvalidated approach-view confirmation, and clear all source indentation tabs. Validation: 18 latest Hall control checks pass; CI-equivalent tab scan passes across 3159 tracked source files. Earlier route/image checks and application build pass; latest Hall completion changes are source-only. The full suite retains baseline totals of 29463 passes and 928 failures with missing-fixture errors. Required resource branch commit: 1b093c5a91540a3fecce0091879312a2f6bcc58d
Replace Qt file, JSON, and resource lookup in BDSP code with project utilities; use UTF-8 paths for lighting output. Register the Bag/menu suites and resolve their fixtures through UNIT_TEST_RESOURCE_PATH(). Debug build and 504 BDSP checks pass; full suite reports 29,465 passed and 928 existing resource-related failures. Fixture repositories: CommandLineTests fb26d1734253d5530a91c8bc6492c06912152421; Packages ad4647b23ea6208c088e045283d53305dcd58275.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This mirrors Developer-Butters' BDSP AutoStory PR, PokemonAutomation#1717, at its head 65094d4, so our follow-up changes can stack on it as small fork PRs. It builds against Developer-Butters/Packages branch
BDSP-Autostory(ad4647b), which provides thePokemonBDSP/Autostoryresources; put that checkout atPackages/before configuring. Built on macOS arm64 and run on a Switch 1 with a fresh BDSP save: the tutorial section starts, but needs the new-game intro done first and its timed steps drift (see the PRs stacked on this one).🤖 Generated with Claude Code
https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E