Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
33a6c4f
FRLG AutoStory: 00.11 Route 3's trainers, 00.12 to the Magikarp salesman
dayfine Nov 3, 2026
bca759e
Merge branch 'frlg/maps-route3-route4' into frlg/autostory-route3
dayfine Nov 3, 2026
589b54c
Merge remote-tracking branch 'origin/frlg/maps-route3-route4' into HEAD
dayfine Nov 3, 2026
ba6995e
Merge frlg/maps-route3-route4 into frlg/autostory-route3
dayfine Nov 3, 2026
6176325
FRLG AutoStory: the table test checks crossings of a wanderer's sight
dayfine Nov 3, 2026
304c2ef
FRLG AutoStory: shorter wanderer checks in the table test
dayfine Nov 3, 2026
91d7581
Merge frlg/maps-route3-route4 into frlg/autostory-route3
dayfine Nov 3, 2026
7b608f8
Merge frlg/maps-route3-route4 into frlg/autostory-route3
dayfine Nov 3, 2026
2f7731c
Merge frlg/maps-route3-route4 into frlg/autostory-route3
dayfine Nov 3, 2026
d58ef74
Merge frlg/maps-route3-route4 into frlg/autostory-route3
dayfine Nov 3, 2026
790e33e
Merge frlg/maps-route3-route4 into frlg/autostory-route3
dayfine Nov 3, 2026
869a29e
FRLG AutoStory: 00.11 and 00.12 start with the moves the lead has aft…
dayfine Nov 3, 2026
4cac47b
Merge frlg/maps-route3-route4 (b5c2e2b8a, #190: recovery tests on Rou…
dayfine Nov 3, 2026
d0b16bf
Merge remote-tracking branch 'origin/frlg/maps-route3-route4' into HEAD
dayfine Nov 3, 2026
1d64bec
Merge frlg/maps-route3-route4 into frlg/autostory-route3
dayfine Nov 3, 2026
211d1b1
Merge frlg/maps-route3-route4 (battle loop: end on the overworld afte…
dayfine Nov 3, 2026
cdb6a44
Merge frlg/maps-route3-route4 (a disabled move, and a move list that …
dayfine Nov 3, 2026
d28af1b
Merge frlg/autostory-mvp (matchup attacks in every battle) into frlg/…
dayfine Nov 3, 2026
eabfa32
Merge frlg/autostory-mvp (HP bar share, nurse for yellow HP, move pro…
dayfine Nov 3, 2026
79ed446
Merge frlg/maps-route3-route4 (17ff9398f: verify mode from #122) into…
dayfine Nov 3, 2026
76511ec
Merge frlg/maps-route3-route4 (ab0771f60: battle sim from #120) into …
dayfine Nov 3, 2026
d66f856
Merge frlg/maps-route3-route4 into frlg/autostory-route3
dayfine Nov 3, 2026
2a016f5
Merge frlg/maps-route3-route4 (TM moves in the summary reader) into f…
dayfine Nov 3, 2026
09a7ad5
Merge frlg/maps-route3-route4 (bag rows below an item the reader can'…
dayfine Nov 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ class PlaceNameMatcher : public OCR::SmallDictionaryMatcher{
{"pewter-city", "Pewter City"},
{"route-1", "Route 1"},
{"route-2", "Route 2"},
{"route-3", "Route 3"},
{"route-4", "Route 4"},
}){
JsonArray names;
names.push_back(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
*
* Reads where the game would be saved: the place name in blue at the top
* of the card the START menu's SAVE shows ("PALLET TOWN" over PLAYER,
* BADGES and TIME). It knows the places from a new game to Pewter City,
* in English only so far: in another language nothing is read.
* BADGES and TIME). It knows the places from a new game to Route 4, in
* English only so far: in another language nothing is read. Route 3 and
* Route 4 have no test capture yet.
*
*/

Expand All @@ -30,7 +31,7 @@ namespace PokemonFRLG{
ImageFloatBox save_card_title_box();

// The place on the save card: "pallet-town", "viridian-city",
// "viridian-forest", "pewter-city", "route-1" or "route-2"; empty if it
// "viridian-forest", "pewter-city", "route-1" to "route-4"; empty if it
// can't be read, as in a language the reader has no names for.
std::string read_save_card_location(Logger& logger, Language language, const ImageViewRGB32& screen);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* AutoStory

Check warning on line 1 in SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStory.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

<file>: file_lines=625 (advisory above 500, limit 1000)
*
* From: https://github.com/PokemonAutomation/
*
Expand Down Expand Up @@ -55,7 +55,7 @@
namespace{

// The start and end dropdowns' entries: the table's checkpoints, 00.01 to
// 00.10. The options hold a reference to it.
// 00.12. The options hold a reference to it.
const StringSelectDatabase& checkpoint_database(){
static const StringSelectDatabase database = Pokemon::story_checkpoint_database(story_checkpoints());
return database;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* AutoStory Events

Check warning on line 1 in SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryEvents.cpp

View workflow job for this annotation

GitHub Actions / code-health

Code health (advisory)

<file>: file_lines=587 (advisory above 500, limit 1000)
*
* From: https://github.com/PokemonAutomation/
*
Expand Down Expand Up @@ -312,15 +312,18 @@
}

std::string save_card_place(const std::string& map){
// The longer names first: "ViridianForest" before "ViridianCity".
static const std::pair<const char*, const char*> PLACES[] = {
// A map of the place, or a building in it ("Route4_PokemonCenter_1F"
// is on Route 4, "Route24" isn't on Route 2).
static const std::pair<std::string, const char*> PLACES[] = {
{"PalletTown", "pallet-town"},
{"ViridianForest", "viridian-forest"},
{"ViridianCity", "viridian-city"},
{"PewterCity", "pewter-city"},
{"Route3", "route-3"},
{"Route4", "route-4"},
};
for (const auto& [prefix, place] : PLACES){
if (map.rfind(prefix, 0) == 0){
if (map == prefix || map.rfind(prefix + "_", 0) == 0){
return place;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ StoryRunPlan plan_story_run(
);


// The maps the story plans on: every map to Brock, with the objects the
// game hides after the Hall of Fame removed, as the lab's frlg_route does.
// The maps the story plans on: every map to Route 4's Pokemon Center, with
// the objects the game hides after the Hall of Fame removed, as the lab's
// frlg_route does.
const std::vector<MapData>& story_maps();

Pokemon::Pose to_pose(const StoryPose& pose);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const char* const FOREST_GATE = "Route2_ViridianForest_NorthEntrance";
const char* const PEWTER = "PewterCity";
const char* const PEWTER_CENTER = "PewterCity_PokemonCenter_1F";
const char* const GYM = "PewterCity_Gym";
const char* const ROUTE3 = "Route3";
const char* const ROUTE4_CENTER = "Route4_PokemonCenter_1F";

Pokemon::Pose at(const char* map, int x, int y, std::optional<Direction> facing = std::nullopt){
return to_pose(StoryPose{map, {x, y}, facing});
Expand Down Expand Up @@ -112,9 +114,9 @@ StoryStep legs(std::string name, std::vector<StoryLeg> legs, std::string why, Wi
return step;
}

// `step`, a ROUTE or LEGS, run with B held: from the Running Shoes on. No
// checkpoint after 00.10 is in the table yet.
[[maybe_unused]] StoryStep running(StoryStep step){
// `step`, a ROUTE or LEGS, run with B held: from the Running Shoes on.
// Indoors, where the game doesn't let the player run, it walks.
StoryStep running(StoryStep step){
step.variant = RUN_VARIANT;
return step;
}
Expand Down Expand Up @@ -309,6 +311,59 @@ StoryCheckpoint running_shoes(){
// the player only turns up. He walks off and is removed; FLAG_SYS_B_DASH
// is set (console B, 2026-11-02: about 20 B presses to the overworld).
scene("shoes_from_aide", at(PEWTER, 46, 21, NORTH), "\"Oh, PLAYER!\" ... the Running Shoes; ends facing north"),
// Where the by-hand walk stopped to start 00.11 (console B, 2026-11-02).
route("below_pewter_center", at(PEWTER, 17, 26, SOUTH), "west along row 21 and down to below the Pokemon Center's door (17, 25)"),
});
}

// Route 3's trainers (Route3 map.json): the way east meets three of them.
// Bug Catcher Colton (12, 6) faces east, sight 3: the only way north past
// the row 7 ledges is the gap at x 14..15, below his line. Youngster Ben
// (17, 4) faces south, sight 2, so the way east keeps to row 3 past him.
// Bug Catcher Greg (25, 4) faces south, sight 2, over the way east along
// row 5. Bug Catcher James (32, 6) faces east, sight 4, over the way down
// at x 35..36. The others are kept out of: Lass Janice (19, 9) sees west
// along row 9 to x 14, Lass Sally (30, 3) west along row 3 to x 25, and
// Youngster Calvin (29, 10) west along row 10. Each line is stepped into on
// its own, so no leg is cut; the trainer walks up to the player, who stays
// put facing the way they stepped.
StoryCheckpoint route3(){
return row("00.11", "Pewter Center, then Route 3's trainers", at(PEWTER, 17, 26, SOUTH), after_brock(), StartMenu::FULL, {
running(route("pewter_nurse", at(PEWTER_CENTER, 7, 4, NORTH), "in by the door below the player")),
heal("heal_pewter"),
// Up from row 9 west of Janice's line, which ends at x 14.
running(route("west_of_janice_line", at(ROUTE3, 13, 8), "out of Pewter by row 21, east into Route 3, short of Janice's line")),
running(legs("below_colton_line", {{EAST, 1}, {NORTH, 1}}, "to (14, 7), in the ledges' gap")),
step_into("colton_line", NORTH, "onto (14, 6), in Colton's line"),
battle("bug_catcher_colton", at(ROUTE3, 14, 6, NORTH), false, "his Bug Pokemon; Colton stops at (13, 6)"),
running(legs("past_ben", {{NORTH, 3}, {EAST, 4}, {SOUTH, 2}, {EAST, 6}}, "up to row 3 above Ben, down at x 18 east of his line, to (24, 5)")),
step_into("greg_line", EAST, "onto (25, 5), below Greg"),
battle("bug_catcher_greg", at(ROUTE3, 25, 5, EAST), false, "his Bug Pokemon; Greg is already next to the player"),
running(legs("above_james_line", {{EAST, 11}}, "along row 5 to the wall at (36, 5)")),
step_into("james_line", SOUTH, "onto (36, 6), at the end of James's line"),
battle("bug_catcher_james", at(ROUTE3, 36, 6, SOUTH), false, "his Bug Pokemon; James stops at (35, 6)"),
// Saved here, the trainers behind, so a failure on the way to Route 4
// doesn't fight them again.
running(legs("save_spot", {{SOUTH, 2}}, "down to (36, 8), beside the wall east of it")),
});
}

// Route 3's north exit (x 68..75) joins Route 4 (offset 60) at x 8..15, up
// which column 12 leads to the Pokemon Center's door (12, 5). Lass Robin
// (40, 11) wanders up and down at x 40, looking north and south, sight 3.
// Rock above (y <= 8) and grass below (y >= 12) leave every way east
// across her column at y 9..11, so whether she sees the player depends on
// her facing. The walk watches for her after the leg along row 9, which
// crosses her sight on (40, 9) only; if she saw the player, her message
// goes to story_interrupts(), which fight her, and the route goes on from
// (40, 9) (run_route(); console B, 2026-11-02, she stopped the player
// there and spoke after the leg's short watch).
StoryCheckpoint magikarp_salesman(){
return row("00.12", "Route 3 and 4 to the Magikarp salesman", at(ROUTE3, 36, 8, SOUTH), after_brock(), StartMenu::FULL, {
running(route("route4_nurse", at(ROUTE4_CENTER, 7, 4, NORTH), "east over Route 3, off the grass, north into Route 4 and its Pokemon Center")),
heal("heal_route4"),
// The seam for a Gift RNG program: the save faces the salesman (1, 3).
running(route("before_salesman", at(ROUTE4_CENTER, 2, 3, WEST), "beside the Magikarp salesman, facing him")),
});
}

Expand All @@ -318,7 +373,7 @@ StoryCheckpoint running_shoes(){
const std::vector<StoryCheckpoint>& story_checkpoints(){
static const std::vector<StoryCheckpoint> checkpoints{
new_game(), after_sid_helper(), leave_house(), oaks_trigger(), to_starter_ball(), starter(), parcel(), pokedex(), shopping(), forest(), brock(),
running_shoes(),
running_shoes(), route3(), magikarp_salesman(),
};
return checkpoints;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
*
* From: https://github.com/PokemonAutomation/
*
* FireRed from a new game to the Boulder Badge and the Running Shoes, as
* story checkpoints 00.01 to 00.10, each saved at its end. After 00.10
* every route and leg runs. Taken from a by-hand run on
* console B (2026-11-01) and the pokefirered map scripts.
* FireRed from a new game to the Boulder Badge, the Running Shoes and Route
* 3 to the Magikarp salesman in Route 4's Pokemon Center, as story
* checkpoints 00.01 to 00.12, each saved at its end. After 00.10 every
* route and leg runs. Taken from a by-hand run on console B (2026-11-01)
* and the pokefirered map scripts.
*
*/

Expand All @@ -21,7 +22,7 @@ namespace NintendoSwitch{
namespace PokemonFRLG{


// Checkpoints 00.01 to 00.10, in order, with 00.01b, the way back in after
// Checkpoints 00.01 to 00.12, in order, with 00.01b, the way back in after
// SID Helper, after 00.01, and 00.04 split in two at Squirtle's ball for
// Starter RNG: 00.04 and 00.04b.
const std::vector<StoryCheckpoint>& story_checkpoints();
Expand Down
Loading
Loading