Skip to content

AutoStory: shared screen events and FRLG adapter - #291

Merged
dayfine merged 5 commits into
nav/story-stepsfrom
autostory/screen-events-core
Nov 9, 2026
Merged

dayfine merged 5 commits into
nav/story-stepsfrom
autostory/screen-events-core

Conversation

@dayfine

@dayfine dayfine commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Base nav/story-steps (#122); the diff shows only this change.

AutoStory had no shared way to turn what the detectors see into events, so each game judged scenes on its own. This adds the game-agnostic screen events and the scene judgements over them (Pokemon_ScreenEvents, Pokemon_SceneJudges) plus the FRLG adapter that feeds them from FRLG's detectors. The same files already landed in #226 through #290; this moves them down into the shared base so BDSP and FRLG both get them by merge. Tested with the new Pokemon:: AutoStory screen-event and FRLG screen-event unit test suites.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

dayfine and others added 5 commits November 8, 2026 22:31
A game-agnostic vocabulary of what a story step sees (fades, location
banner, dialog and choice boxes, interact prompt, battle start/end,
player can move, screen still), an observer interface a game implements
with its own detectors, and a run_until watcher form that records events
and stops on chosen ones. The warp judgement (WarpSeen, fade_of) and the
TalkOver judge from BDSP's #284/#289 move here, expressed over the events.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
FrlgScreenObserver maps the white dialog box, the selection box, the
battle menu and battle text, and uniform fades to the shared events.
Unit tests on synthetic frames; real frames are the detectors' own tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The battle text box detector reads a flat grey frame as its box; that
frame is no real screen, so it tests nothing about the adapter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
ScreenEvents keeps its set operations; fades and the log text become free
functions (fade_events, fade_in, describe), WarpSeen::see becomes
note_warp(), and the tests use the case-table form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
@dayfine
dayfine merged commit 176c540 into nav/story-steps Nov 9, 2026
15 checks passed
@dayfine
dayfine deleted the autostory/screen-events-core branch November 13, 2026 03:26
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