Skip to content

FRLG AutoStory: the Magikarp rides into the League; Hall of Fame screenshots - #618

Closed
dayfine wants to merge 25 commits into
frlg/e4-rowsfrom
frlg/league-karp-hof
Closed

dayfine wants to merge 25 commits into
frlg/e4-rowsfrom
frlg/league-karp-hof

Conversation

@dayfine

@dayfine dayfine commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Depends on #645 (base frlg/e4-rows; the diff shows only this change).

The user wanted the shiny Magikarp in the party for the Elite Four and a screenshot of the team at the Hall of Fame. 20.01a now walks to the Indigo Plateau Center's PC (17, 9) and withdraws the Magikarp from BOX 1 before the Mart, finding it by reading each cell's species with BoxCellReader rather than a fixed slot; the pc action takes species instead of slot for a withdrawal, and protect puts the slot it joined into Supplies::protected_slots, which the faint sends already skip (each League fight row, 20.01 to 20.05, also sets protected_slots: [6] for runs that start there). A full party refuses the withdrawal and stops the row, leaving the choice of who goes to the box to the user. 20.05's last step, the Hall of Fame scene, becomes a hall_of_fame game action: B until the save message (upstream's HallOfFameSavingDetector), then screenshots in Screenshots/AutoStory/hall_of_fame/ picked by how the screen moves (each member's 2 s hold, the whole team as the confetti starts, the LEAGUE CHAMP card), each path logged.

Tested: new cases in the PC storage, League and Hall of Fame shot suites run on Fork Draft CI. The 20.01a golden plan lines are hand-derived from the map (east 4, north 2 to the PC; south 2, west 13 back) and may need a refresh from CI's GOLDEN| output. Not run on console B; the frame-change threshold for the HoF shots (RMSD 3.0) is unmeasured.

…enshots

20.01a walks to the Indigo Plateau Center's PC (17, 9) and withdraws the
shiny Magikarp from BOX 1 by reading each cell's species
(BoxCellReader), before the Mart. The pc action's withdrawal takes a
species instead of a slot, and protect: its party slot goes into
Supplies::protected_slots, which the faint sends skip. 20.01 to 20.05
protect slot 6 for runs that start there (execution protected_slots).

20.05's Hall of Fame is a game action: B until the save message
(HallOfFameSavingDetector), then screenshots in
Screenshots/AutoStory/hall_of_fame/ chosen by how the screen moves:
each member's hold, the whole team as the confetti starts, and the
LEAGUE CHAMP card.
…gue-karp-hof

The League is one checkpoint (20.01) now: #618's hall_of_fame action moves to 20.01's last step, 20.01's protected_slots covers every fight, and the League tests read 20.01 instead of 20.02-20.05.
…arp-hof

# Conflicts:
#	SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryItemsPocketChange.cpp
#	SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryLeague_Tests.cpp
#	SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData/frlg-20.01.plan.json
@dayfine
dayfine changed the base branch from frlg/check-levels to frlg/e4-rows November 17, 2026 10:55
20.01a's Magikarp withdrawal refused a full party on console B
(2026-11-17) when the save already had the Magikarp in slot 6, so a
retry from any save made after the withdrawal stopped there. It is now
skipped as done, and its slot stays protected.
The console's party read gave only the party's size, so the skip for a
species the party already has never matched (console B, 2026-11-17:
20.01a still refused the full party with the Magikarp in slot 6).
Lorelei's win levelled the lead to Lv55 (console B, 2026-11-17), so its
HP box read 145/174 while the check compared it with the 171 known
before the fight, and the save check failed closed.
The moves page draws a move's PP in yellow at half or less, orange at a
quarter or less and red at 0 (pokefirered sPrintMoveTextColors). The
digit reader binarizes dark ink only, so low PP read as -1 and the
League's save check failed closed after a won fight. Both PP reads now
redraw those colours in the dark ink first; dark-grey PP is unchanged.
SURF's yellow 6/15 read as 46/15 after Agatha (2026-11-17), which a
League save check would have taken as plenty of PP.
The current PP's box began at x 204, on the "PP" label's last column.
The game prints that label in the PP's own colour (pret pokefirered
PrintMoveNameAndPP), so on a low-PP row the yellow label edge, redrawn
as dark ink, read as a "4": SURF's "6/15" read as 46/15 after Agatha.
The box now holds the two right-aligned digit cells, x 206 to 217.
The League frame is a test case next to the earlier yellow-PP one.
Agatha's first three tries on console B (2026-11-17) all won, and all
failed her Full Restore cap of 0 on the Full Restore the heal between
fights used before the fight started.
The save check compared the fight's spending against its item caps,
counted from the start save's bag, so the top-up before Agatha (a Full
Restore at 45 HP) failed her cap of 0 on every won try. The check is now
the balance: the bag, HP and PP read after the fight must meet the next
fight's entry contract after its top-up. The last fight passes on the
win.
Phase 1 played all its tries even after min_pass passes, or after too
few tries were left to reach min_pass. It now stops at either point.
After a reload the story's moves could be a later try's: read_lead_moves()
after try 1's Elixir also set the saved lead, so tries 2 to 4 before the
Champion counted Blizzard full and skipped the Elixir with it at 0.
Gen 3's trainer AI sends its next Pokemon by matchup, not party slot.
On console B (2026-11-17, Champion try 1) Venusaur came out second; the
forward-only search jumped to slot 5 and logged every later foe as
Venusaur with no danger, and Blastoise met Arcanine at 26 HP.

FoeParty tracks the trainer's party as it comes out: the foe is the
first not-fallen member of the species read, the one out before fell,
and the party alive is the members not fallen. PlannedBattle and
BattleDecisions::track_foe() both use it; the early reset fires on the
foe that fell, not on a higher slot appearing.
…ame is the row's save

After the Champion no START menu comes back: Oak's scene runs into the
Hall of Fame, so the battle's 60 s wait for the overworld called the win
lost (console B, 2026-11-17). A League fight's battle now ends 10 s after
its "for winning" text with no START menu. The Hall of Fame, which saves
the game itself, becomes the row's save, so a verify phase 1 try ends at
the win and reloads, and phase 2's goes on into it. The last fight's
save check reads nothing: it passes on the win.
@dayfine

dayfine commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #652 (frlg/lean), which continues from this branch's tip; the branch stays.

@dayfine dayfine closed this Nov 18, 2026
dayfine added a commit that referenced this pull request Nov 18, 2026
#583's two leg-planner commits (b8d6b88, b2ce287) let a one-step leg
off a warp's arrival skip the open stop when it steps straight back. The
only plans that changed were 16.02's and 16.03's teleporter bounce on
Silph Co. 9F and 19.04c's ladder bounce on Victory Road 2F, all three
console-verified on #618 with the step off held to the wall. No
unverified plan used the waiver, so it goes rather than sitting behind a
per-plan switch: the planner is #618's again, those three plan as they
ran on the console, and the revisit lint lists them as allowed again.
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