Skip to content

BDSP AutoStory: Route 201, Route 202, Jubilife and Route 203 grids from the Diamond decomp - #111

Closed
dayfine wants to merge 13 commits into
bdsp/event-sandgem-centerfrom
bdsp/maps-rederive
Closed

dayfine wants to merge 13 commits into
bdsp/event-sandgem-centerfrom
bdsp/maps-rederive

Conversation

@dayfine

@dayfine dayfine commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Base: bdsp/event-sandgem-center on the fork; the diff shows only this change.

The Route 201, Route 202, Jubilife City and Route 203 grids were traced from Bulbapedia's DP map images, whose rows are 3/4 of a tile, so every vertical leg planned on them was 25-35% short and the walls sat on the wrong rows. This takes those four, Sandgem Town and the Oreburgh Mine B2F from the Diamond decomp (devtools/maps decomp --repo pret/pokediamond; Platinum differs only at Jubilife's Global Terminal and a Platinum-only item ball on Route 203), places each file's named tiles with its console anchors (the Route 202 catch and save spots, the Jubilife doors and the four 00.05 people, Route 203's gate exit and its straight row to Jubilife, now row 18, Roark), and makes Sandgem Town and Route 202 cover their whole matrix cells so the grid edges are where the location banner changes. The plan, wall-hit, route-record and short-walk tests are re-planned on the new grids: the Route 202 walks south of the catch spot grew three rows, Sandgem's entry stop is (29,5), the Jubilife 00.05 legs are checked with route_plan_costs() (what talk_to_npc() plans with) and the Mart lady's one-tile-step walks with town costs. Tested with the BDSP native test runner linked from this branch's objects (16 passed, 2 failed: the Tesseract one, and "Save spots to Jubilife", which is the max_searched cap of task #15 and used to surface one walk earlier as "After training to the Pokemon Center"; it is now checked last so the other plans run) and with an offline harness over Data + Navigation that plans every test walk and prints the legs (output below). Nothing has run on the console yet: every checkpoint on these maps' Status lines must be re-run (00.02-00.05, the Sandgem Center and Mart lady checkpoints, 01.01-01.03, 01.06, 01.07), and the Status lines name what to measure first (Jubilife's Mart clown tile and the walk from the steps' top to the Center, Route 203's fourth sand row under the ledge, Sandgem's entry stop, the Mine's way up from column 14).

Harness output: every test walk planned on the new grids (program's max_searched)
max_searched: the program's (20000)

== Grid sizes ==
  Route 201 64x25, Sandgem 34x32, Route 202 36x32, Jubilife 64x64, Route 203 61x24, Mine 32x32

== Named tiles (type in the joined maps) ==
  Sandgem Town LAB_DOOR = Sandgem Town (8, 10) 'D'
  Sandgem Town POKEMON_CENTER_DOOR = Sandgem Town (17, 10) 'D'
  Sandgem Town POKEMON_CENTER_SIGN = Sandgem Town (20, 10) 'S'
  Sandgem Town POKE_MART_DOOR = Sandgem Town (27, 10) 'D'
  Sandgem Town FRONT_ROW_EAST_END = Sandgem Town (29, 11) '.'
  Route 202 CATCH_SPOT = Route 202 (19, 27) '"'
  Route 202 SAVE_SPOT = Route 202 (30, 24) '.'
  Route 202 TRAINER_TRISTAN = Route 202 (7, 13) 'N'
  Route 202 TRAINER_NATALIE = Route 202 (22, 18) 'N'
  Route 202 TRAINER_LOGAN = Route 202 (26, 4) 'N'
  Route 202 EXIT_JUBILIFE = Route 202 (15, 0) '.'
  Route 201 BORDER_SIGN = Route 201 (55, 4) 'S'
  Route 201 POTION_GIVER = Route 201 (43, 3) '"'
  Route 201 POTION_GIVER_TALK_FROM = Route 201 (44, 3) '"'

== Joins ==
  Route 201 (63, 6) east -> Sandgem Town (0, 13)
  Route 201 (63, 4) east -> Sandgem Town (0, 11)
  Sandgem Town (24, 0) north -> Route 202 (25, 31)
  Sandgem Town (29, 0) north -> Route 202 (30, 31)

== Wall hits (Route 202 grid, local tiles; then the joined maps) ==
  R202: west from (19,27) -> stop (3,27) after 16 tiles  console: 16 to the grass's west edge
  R202: north from (19,27) -> stop (19,25) after 2 tiles  console: 2 to the trees
  R202: east from (19,27) -> stop (30,27) after 11 tiles  console: 11 to the trees
  R202: north from (30,27) -> stop (30,24) after 3 tiles  console: 3 to under the ledge (save spot)
  R202: west from (30,24) -> stop (22,24) after 8 tiles  console: 8 to the trees beside (22,24)
  R202: south from (22,24) -> stop (22,31) after 7 tiles (not anchored)  old test: 5 (timed count)
  R202: north from (7,14) -> stop (7,14) after 0 tiles  Tristan holds the player
  R202: east from (22,22) -> stop (30,22) after 8 tiles  r75: stops at 30 on the row above the ledge
  R202: north from (30,22) -> stop (30,4) after 18 tiles  r75: column 30 open north to row 4
  R202: south from (29,4) -> stop (29,31) after 27 tiles (not anchored)  off the bottom edge to Sandgem
  R202: south from (12,8) -> stop (12,29) after 21 tiles  hops both ledges
  R202: north from (15,0) -> stop (15,0) after 0 tiles (not anchored)  off the top edge
  world: east from (81,43) -> stop (93,43) after 12 tiles  Center front east: 12 to the trees
  world: east from (91,43) -> stop (93,43) after 2 tiles  Mart front east: 2
  world: north from (91,43) -> stop (91,43) after 0 tiles (not anchored)  into the Mart's door (not anchored)
  world: north from (93,43) -> stop (93,43) after 0 tiles  row end: trees above
  world: south from (93,32) -> stop (93,37) after 5 tiles  Sandgem entry: south along column 29 from the top row
  world: south from (93,24) -> stop (93,37) after 13 tiles  save spot south to the Sandgem entry stop
  world: north from (54,43) -> stop (54,42) after 1 tiles  west of the border sign, north
  world: east from (44,42) -> stop (63,42) after 19 tiles  lady's row east
  world: west from (70,39) -> stop (70,39) after 0 tiles  east of the Lab's sign, west

== Test_TileGridPlans: 00.04 (check_plan, plan_tile_route) ==
Catch spot to Jubilife: from Route 202 (19, 27)
    west 16 (to wall) to Route 202 (3, 27)
    north 13 (to wall) to Route 202 (3, 14)
    east 14 (to wall) to Route 202 (17, 14)
    south 8 (to wall) to Route 202 (17, 22)
    east 13 (to wall) to Route 202 (30, 22)
    north 17 (open) to Route 202 (30, 5)
    west 15 (open) to Route 202 (15, 5)
    north 5 (open) to Route 202 (15, 0)

== Test_TileGridPlans: the walks table (default costs; D = check_plan_avoids_doors, R = check_plan_stops_readable) ==
  north from Sandgem Town (18, 11): 0 tiles to Sandgem Town (18, 11)
  north from Sandgem Town (19, 11): 0 tiles to Sandgem Town (19, 11)
  north from Sandgem Town (20, 11): 0 tiles to Sandgem Town (20, 11)
  north from Sandgem Town (21, 11): 9 tiles to Sandgem Town (21, 2) (gap)
  north from Sandgem Town (22, 11): 9 tiles to Sandgem Town (22, 2) (gap)
  north from Sandgem Town (23, 11): 9 tiles to Sandgem Town (23, 2) (gap)
  north from Sandgem Town (24, 11): 19 tiles to Route 202 (25, 24) (gap)
  north from Sandgem Town (25, 11): 0 tiles to Sandgem Town (25, 11)
  north from Sandgem Town (26, 11): 0 tiles to Sandgem Town (26, 11)
Save spots to the catch grass [T]: from Route 202 (19, 27) Route 202 (30, 24)
    east 11 (to wall) to Route 202 (30, 24) Route 202 (30, 27)
    north 3 (to wall) to Route 202 (30, 24)
    west 8 (to wall) to Route 202 (22, 24)
    south 7 (to wall) to Route 202 (22, 31)
    west 1 (to wall) to Route 202 (21, 31)
    north 6 (to wall) to Route 202 (21, 25)
    west 1 (open) to Route 202 (19, 25) Route 202 (20, 25)
After training to the Pokemon Center [T]: from Route 202 (18, 25) Route 202 (19, 25) Route 202 (20, 25) Route 202 (18, 26) Route 202 (19, 26) Route 202 (20, 26) Route 202 (18, 27) Route 202 (19, 27) Route 202 (20, 27) Route 202 (18, 28) Route 202 (19, 28) Route 202 (20, 28) Route 202 (18, 29) Route 202 (19, 29) Route 202 (20, 29)
    south 4 (to wall) to Route 202 (18, 29) Route 202 (19, 29) Route 202 (20, 29)
    east 12 (to wall) to Route 202 (30, 29)
    south 8 (to wall) to Sandgem Town (29, 5)
    west 9 (to wall) to Sandgem Town (20, 5)
    south 4 (to wall) to Sandgem Town (20, 9)
    east 1 (open) to Sandgem Town (21, 9) Sandgem Town (22, 9)
    south 1 (open) to Sandgem Town (21, 10) Sandgem Town (22, 10) Sandgem Town (21, 11) Sandgem Town (22, 11)
    east 8 (to wall) to Sandgem Town (24, 10) Sandgem Town (29, 11)
    south 1 (open) to Sandgem Town (24, 11) Sandgem Town (24, 12) Sandgem Town (29, 12) Sandgem Town (29, 13)
    east 5 (to wall) to Sandgem Town (29, 11) Sandgem Town (29, 12) Sandgem Town (29, 13)
    south 14 (to wall) to Sandgem Town (29, 25)
    north 1 (open) to Sandgem Town (29, 23) Sandgem Town (29, 24)
    north 4 (open) to Sandgem Town (29, 18) Sandgem Town (29, 19) Sandgem Town (29, 20) Sandgem Town (29, 21)
    west 9 (to wall) to Sandgem Town (20, 18) Sandgem Town (20, 19) Sandgem Town (20, 20) Sandgem Town (20, 21)
    north 10 (to wall) to Sandgem Town (20, 11)
Pokemon Center to the Poke Mart [T]: from Sandgem Town (16, 11) Sandgem Town (17, 11) Sandgem Town (18, 11)
    east 13 (to wall) to Sandgem Town (29, 11)
    west 1 (open) to Sandgem Town (27, 11) Sandgem Town (28, 11)
Poke Mart to the trees east of it [T]: from Sandgem Town (26, 11) Sandgem Town (27, 11) Sandgem Town (28, 11)
    east 3 (to wall) to Sandgem Town (29, 11)
North of the gap between the signs to the save spot [T]: from Sandgem Town (21, 2) Sandgem Town (22, 2) Sandgem Town (23, 2) Route 202 (25, 24)
    east 8 (to wall) to Route 202 (30, 24) Sandgem Town (29, 2)
    north 10 (to wall) to Route 202 (30, 24)
Save spot to Sandgem Town [T]: from Route 202 (30, 24)
    south 13 (to wall) to Sandgem Town (29, 5)
Sandgem's entry to the Pokemon Center [T]: from Sandgem Town (29, 5)
    west 9 (to wall) to Sandgem Town (20, 5)
    south 4 (to wall) to Sandgem Town (20, 9)
    east 1 (open) to Sandgem Town (21, 9) Sandgem Town (22, 9)
    south 1 (open) to Sandgem Town (21, 10) Sandgem Town (22, 10) Sandgem Town (21, 11) Sandgem Town (22, 11)
    east 8 (to wall) to Sandgem Town (24, 10) Sandgem Town (29, 11)
    south 1 (open) to Sandgem Town (24, 11) Sandgem Town (24, 12) Sandgem Town (29, 12) Sandgem Town (29, 13)
    east 5 (to wall) to Sandgem Town (29, 11) Sandgem Town (29, 12) Sandgem Town (29, 13)
    south 14 (to wall) to Sandgem Town (29, 25)
    north 1 (open) to Sandgem Town (29, 23) Sandgem Town (29, 24)
    north 4 (open) to Sandgem Town (29, 18) Sandgem Town (29, 19) Sandgem Town (29, 20) Sandgem Town (29, 21)
    west 9 (to wall) to Sandgem Town (20, 18) Sandgem Town (20, 19) Sandgem Town (20, 20) Sandgem Town (20, 21)
    north 10 (to wall) to Sandgem Town (20, 11)
Pokemon Center to west of the Route 201 sign [Tn]: from Sandgem Town (16, 11) Sandgem Town (17, 11) Sandgem Town (18, 11)
    south 1 (open) to Sandgem Town (16, 12) Sandgem Town (17, 12) Sandgem Town (18, 12)
    south 1 (open) to Sandgem Town (16, 13) Sandgem Town (17, 13) Sandgem Town (18, 13)
    south 1 (open) to Sandgem Town (16, 14) Sandgem Town (17, 14) Sandgem Town (18, 14)
    west 29 (to wall) to Route 201 (53, 7)
    north 4 (to wall) to Route 201 (53, 3)
    south 1 (open) to Route 201 (53, 4)
    east 1 (to wall) to Route 201 (54, 4)
Poke Mart lady to west of the Route 201 sign [Tn]: from Route 201 (44, 3)
    south 1 (open) to Route 201 (44, 4)
    east 10 (to wall) to Route 201 (54, 4)
Route 201 sign to the Pokemon Center [T]: from Route 201 (54, 4)
    north 1 (to wall) to Route 201 (54, 3)
    east 9 (to wall) to Route 201 (63, 3)
    south 5 (to wall) to Route 201 (63, 8)
    east 30 (to wall) to Sandgem Town (29, 15)
    south 4 (open) to Sandgem Town (29, 18) Sandgem Town (29, 19) Sandgem Town (29, 20)
    west 9 (to wall) to Sandgem Town (20, 18) Sandgem Town (20, 19) Sandgem Town (20, 20)
    north 9 (to wall) to Sandgem Town (20, 11)
Trees east of the Mart to the Pokemon Center [T]: from Sandgem Town (29, 11)
    south 14 (to wall) to Sandgem Town (29, 25)
    north 1 (open) to Sandgem Town (29, 23) Sandgem Town (29, 24)
    north 4 (open) to Sandgem Town (29, 18) Sandgem Town (29, 19) Sandgem Town (29, 20) Sandgem Town (29, 21)
    west 9 (to wall) to Sandgem Town (20, 18) Sandgem Town (20, 19) Sandgem Town (20, 20) Sandgem Town (20, 21)
    north 10 (to wall) to Sandgem Town (20, 11)
East of the Lab's sign to west of the Route 201 sign [Tn]: from Sandgem Town (6, 11)
    south 1 (open) to Sandgem Town (6, 12)
    south 1 (open) to Sandgem Town (6, 13)
    south 1 (open) to Sandgem Town (6, 14)
    west 17 (to wall) to Route 201 (53, 7)
    north 4 (to wall) to Route 201 (53, 3)
    south 1 (open) to Route 201 (53, 4)
    east 1 (to wall) to Route 201 (54, 4)
Below the Center's sign to the trees east of the Mart [T]: from Sandgem Town (20, 11)
    east 9 (to wall) to Sandgem Town (29, 11)
East of the Lab's sign to the trees east of the Mart [T]: from Sandgem Town (6, 11)
    east 23 (to wall) to Sandgem Town (29, 11)
East end of the lady's row to the Route 201 sign [Tn]: from Route 201 (63, 3)
    south 5 (to wall) to Route 201 (63, 8)
    north 1 (open) to Route 201 (63, 7)
    west 10 (to wall) to Route 201 (53, 7)
    north 4 (to wall) to Route 201 (53, 3)
    south 1 (open) to Route 201 (53, 4)
    east 1 (to wall) to Route 201 (54, 4)
Save spots to Jubilife [T]: from Route 202 (19, 27) Route 202 (30, 24)
  FAIL: Save spots to Jubilife: no robust route found.

-- what 00.04 runs (route_plan_costs; informational: walk_route() falls back to the default costs when these find nothing) --
00.04 s1: to the catch grass [R]: from Route 202 (19, 27) Route 202 (30, 24)
    east 11 (to wall) to Route 202 (30, 24) Route 202 (30, 27)
    south 2 (open) to Route 202 (30, 26) Route 202 (30, 29)
    west 10 (open) to Route 202 (20, 26) Route 202 (20, 29)
00.04 s2: after training to the Pokemon Center [R]: from Route 202 (18, 25) Route 202 (19, 25) Route 202 (20, 25) Route 202 (18, 26) Route 202 (19, 26) Route 202 (20, 26) Route 202 (18, 27) Route 202 (19, 27) Route 202 (20, 27) Route 202 (18, 28) Route 202 (19, 28) Route 202 (20, 28) Route 202 (18, 29) Route 202 (19, 29) Route 202 (20, 29)
  no plan (informational): 00.04 s2: after training to the Pokemon Center: no robust route found.
00.04 s3: Center to the Poke Mart [R]: from Sandgem Town (16, 11) Sandgem Town (17, 11) Sandgem Town (18, 11)
    east 13 (to wall) to Sandgem Town (29, 11)
    west 1 (open) to Sandgem Town (28, 11)
00.04 s4: Mart to the trees east of it [R]: from Sandgem Town (26, 11) Sandgem Town (27, 11) Sandgem Town (28, 11)
    east 3 (to wall) to Sandgem Town (29, 11)
00.04 s4: north of the gap to the save spot [R]: from Sandgem Town (21, 2) Sandgem Town (22, 2) Sandgem Town (23, 2) Route 202 (25, 24)
    east 8 (to wall) to Route 202 (30, 24) Sandgem Town (29, 2)
    north 10 (to wall) to Route 202 (30, 24)
00.04 s5: save spots to Jubilife [R]: from Route 202 (19, 27) Route 202 (30, 24)
  no plan (informational): 00.04 s5: save spots to Jubilife: no robust route found.

== Sandgem's entry to below the Center's sign, town costs (expected shape in the test) ==
Sandgem's entry to below the Center's sign [Tn]: from Sandgem Town (29, 5)
    west 9 (to wall) to Sandgem Town (20, 5)
    east 1 (open) to Sandgem Town (21, 5)
    south 7 (open) to Sandgem Town (21, 11) Sandgem Town (21, 12) Sandgem Town (21, 13)
    west 1 (open) to Sandgem Town (20, 11) Sandgem Town (20, 12) Sandgem Town (20, 13)
    north 2 (to wall) to Sandgem Town (20, 11)

== Save spot to Sandgem Town keeps out of tall grass ==
  ok (1 legs)

== Jubilife 00.05 (route costs, as talk_to_npc() and walk_route() plan) ==
Jubilife: after Dawn to the Trainers' School [R (test and program)]: from Jubilife City (46, 58) Jubilife City (47, 58) Jubilife City (46, 59) Jubilife City (47, 59) Jubilife City (46, 60) Jubilife City (47, 60)
    west 4 (to wall) to Jubilife City (43, 58) Jubilife City (43, 59) Jubilife City (43, 60)
    north 6 (to wall) to Jubilife City (43, 54)
    west 1 (open) to Jubilife City (42, 54)
    north 13 (to wall) to Jubilife City (42, 41)
    west 1 (open) to Jubilife City (41, 41)
Jubilife: after Dawn to the Trainers' School [Tn (informational)]: from Jubilife City (46, 58) Jubilife City (47, 58) Jubilife City (46, 59) Jubilife City (47, 59) Jubilife City (46, 60) Jubilife City (47, 60)
    west 4 (to wall) to Jubilife City (43, 58) Jubilife City (43, 59) Jubilife City (43, 60)
    north 6 (to wall) to Jubilife City (43, 54)
    west 1 (open) to Jubilife City (42, 54)
    north 13 (to wall) to Jubilife City (42, 41)
    west 1 (open) to Jubilife City (41, 41)
Jubilife: school to the president [R (test and program)]: from Jubilife City (39, 41) Jubilife City (40, 41) Jubilife City (41, 41)
    east 5 (open) to Jubilife City (44, 41) Jubilife City (45, 41) Jubilife City (46, 41)
    north 2 (open) to Jubilife City (44, 39) Jubilife City (45, 39) Jubilife City (46, 39)
    east 4 (to wall) to Jubilife City (48, 39)
    north 4 (open) to Jubilife City (48, 35)
    west 1 (to wall) to Jubilife City (47, 35)
Jubilife: school to the president [Tn (informational)]: from Jubilife City (39, 41) Jubilife City (40, 41) Jubilife City (41, 41)
  no plan (informational): Jubilife: school to the president: no robust route found.
Jubilife: president to the clown by the Mart [R (test and program)]: from Jubilife City (47, 35)
    east 9 (to wall) to Jubilife City (56, 35)
    west 1 (open) to Jubilife City (55, 35)
    north 1 (to wall) to Jubilife City (55, 34)
Jubilife: president to the clown by the Mart [Tn (informational)]: from Jubilife City (47, 35)
    east 9 (to wall) to Jubilife City (56, 35)
    west 1 (open) to Jubilife City (55, 35)
    north 1 (to wall) to Jubilife City (55, 34)
Jubilife: Mart clown to the TV station clown [R (test and program)]: from Jubilife City (55, 34)
    south 2 (to wall) to Jubilife City (55, 36)
    west 12 (to wall) to Jubilife City (43, 36)
    north 7 (to wall) to Jubilife City (43, 29)
    west 2 (to wall) to Jubilife City (41, 29)
    north 4 (open) to Jubilife City (41, 25)
    west 4 (to wall) to Jubilife City (37, 25)
    north 9 (to wall) to Jubilife City (37, 16)
Jubilife: Mart clown to the TV station clown [Tn (informational)]: from Jubilife City (55, 34)
    west 23 (to wall) to Jubilife City (32, 34)
    north 18 (to wall) to Jubilife City (32, 16)
    south 1 (open) to Jubilife City (32, 17)
    east 6 (open) to Jubilife City (37, 17) Jubilife City (38, 17) Jubilife City (39, 17)
    north 1 (to wall) to Jubilife City (37, 16) Jubilife City (38, 16) Jubilife City (39, 16)
    west 2 (to wall) to Jubilife City (37, 16)
Jubilife: TV station clown to the Poketch Company clown [R (test and program)]: from Jubilife City (37, 16)
    south 1 (open) to Jubilife City (37, 17)
    west 9 (to wall) to Jubilife City (28, 17)
    south 3 (open) to Jubilife City (28, 20)
    west 12 (open) to Jubilife City (16, 20)
    north 2 (open) to Jubilife City (16, 18)
Jubilife: TV station clown to the Poketch Company clown [Tn (informational)]: from Jubilife City (37, 16)
  no plan (informational): Jubilife: TV station clown to the Poketch Company clown: no robust route found.
Jubilife: Poketch Company clown to the president [R (test and program)]: from Jubilife City (16, 18)
    south 2 (open) to Jubilife City (16, 20)
    east 13 (to wall) to Jubilife City (29, 20)
    south 1 (open) to Jubilife City (29, 21)
    east 2 (open) to Jubilife City (31, 21)
    south 9 (to wall) to Jubilife City (31, 30)
    east 18 (to wall) to Jubilife City (49, 30)
    south 5 (open) to Jubilife City (49, 35)
    west 2 (to wall) to Jubilife City (47, 35)
Jubilife: Poketch Company clown to the president [Tn (informational)]: from Jubilife City (16, 18)
  no plan (informational): Jubilife: Poketch Company clown to the president: no robust route found.
Jubilife: president to the Pokemon Center [R (test and program)]: from Jubilife City (47, 35)
    south 6 (open) to Jubilife City (47, 41)
    east 4 (open) to Jubilife City (51, 41)
Jubilife: president to the Pokemon Center [Tn (informational)]: from Jubilife City (47, 35)
    south 7 (open) to Jubilife City (47, 41) Jubilife City (47, 42) Jubilife City (47, 43)
    east 9 (to wall) to Jubilife City (56, 41) Jubilife City (56, 42) Jubilife City (56, 43)
    north 2 (to wall) to Jubilife City (56, 41)
    west 4 (open) to Jubilife City (51, 41) Jubilife City (52, 41) Jubilife City (53, 41)

== Oreburgh Mine 01.03 ==
Mine: corridor top to the stretch east of Roark [T]: from Oreburgh Mine (14, 2) Oreburgh Mine (15, 2) Oreburgh Mine (16, 2)
    west 3 (to wall) to Oreburgh Mine (13, 2)
    south 8 (to wall) to Oreburgh Mine (13, 10)
    north 1 (open) to Oreburgh Mine (13, 8) Oreburgh Mine (13, 9)
    east 4 (to wall) to Oreburgh Mine (15, 8) Oreburgh Mine (17, 9)
    south 2 (to wall) to Oreburgh Mine (15, 9) Oreburgh Mine (17, 11)
    east 2 (to wall) to Oreburgh Mine (17, 9) Oreburgh Mine (17, 11)
    south 2 (to wall) to Oreburgh Mine (17, 11)
    west 2 (to wall) to Oreburgh Mine (15, 11)
    south 6 (to wall) to Oreburgh Mine (15, 17)
    east 14 (to wall) to Oreburgh Mine (29, 17)
    south 10 (to wall) to Oreburgh Mine (29, 27)
    west 3 (to wall) to Oreburgh Mine (26, 27)
    south 2 (to wall) to Oreburgh Mine (26, 29)
    west 1 (open) to Oreburgh Mine (24, 29) Oreburgh Mine (25, 29)
Mine: corridor top to the stretch east of Roark [R (program; falls back to T)]: from Oreburgh Mine (14, 2) Oreburgh Mine (15, 2) Oreburgh Mine (16, 2)
  no plan (informational): Mine: corridor top to the stretch east of Roark: no robust route found.
Mine: corridor top (row below) to the stretch east of Roark [T]: from Oreburgh Mine (14, 3) Oreburgh Mine (15, 3) Oreburgh Mine (16, 3)
    west 3 (to wall) to Oreburgh Mine (13, 3)
    south 7 (to wall) to Oreburgh Mine (13, 10)
    north 1 (open) to Oreburgh Mine (13, 8) Oreburgh Mine (13, 9)
    east 4 (to wall) to Oreburgh Mine (15, 8) Oreburgh Mine (17, 9)
    south 2 (to wall) to Oreburgh Mine (15, 9) Oreburgh Mine (17, 11)
    east 2 (to wall) to Oreburgh Mine (17, 9) Oreburgh Mine (17, 11)
    south 2 (to wall) to Oreburgh Mine (17, 11)
    west 2 (to wall) to Oreburgh Mine (15, 11)
    south 6 (to wall) to Oreburgh Mine (15, 17)
    east 14 (to wall) to Oreburgh Mine (29, 17)
    south 10 (to wall) to Oreburgh Mine (29, 27)
    west 3 (to wall) to Oreburgh Mine (26, 27)
    south 2 (to wall) to Oreburgh Mine (26, 29)
    west 1 (open) to Oreburgh Mine (24, 29) Oreburgh Mine (25, 29)
Mine: below Roark to the corridor's corner [T]: from Oreburgh Mine (18, 29)
    east 9 (to wall) to Oreburgh Mine (27, 29)
    north 5 (to wall) to Oreburgh Mine (27, 24)
    east 2 (to wall) to Oreburgh Mine (29, 24)
    north 8 (to wall) to Oreburgh Mine (29, 16)
    west 16 (to wall) to Oreburgh Mine (13, 16)
    east 3 (open) to Oreburgh Mine (15, 16) Oreburgh Mine (16, 16) Oreburgh Mine (17, 16)
    north 5 (to wall) to Oreburgh Mine (15, 11) Oreburgh Mine (16, 13) Oreburgh Mine (17, 13)
    west 4 (to wall) to Oreburgh Mine (15, 11) Oreburgh Mine (13, 13)
    north 1 (to wall) to Oreburgh Mine (15, 11) Oreburgh Mine (13, 12)
    east 2 (to wall) to Oreburgh Mine (17, 11) Oreburgh Mine (15, 12)
    north 2 (to wall) to Oreburgh Mine (17, 9) Oreburgh Mine (15, 11)
    east 2 (to wall) to Oreburgh Mine (17, 9) Oreburgh Mine (17, 11)
    north 2 (to wall) to Oreburgh Mine (17, 9)
    west 4 (to wall) to Oreburgh Mine (13, 9)
    south 1 (to wall) to Oreburgh Mine (13, 10)
    east 1 (to wall) to Oreburgh Mine (14, 10)
Mine: below Roark to the corridor's corner [R (program)]: from Oreburgh Mine (18, 29)
    east 9 (to wall) to Oreburgh Mine (27, 29)
    north 5 (to wall) to Oreburgh Mine (27, 24)
    east 2 (to wall) to Oreburgh Mine (29, 24)
    north 8 (to wall) to Oreburgh Mine (29, 16)
    west 16 (to wall) to Oreburgh Mine (13, 16)
    east 2 (open) to Oreburgh Mine (15, 16)
    north 5 (to wall) to Oreburgh Mine (15, 11)
    east 2 (to wall) to Oreburgh Mine (17, 11)
    north 2 (to wall) to Oreburgh Mine (17, 9)
    west 4 (to wall) to Oreburgh Mine (13, 9)
    south 1 (to wall) to Oreburgh Mine (13, 10)
    east 1 (to wall) to Oreburgh Mine (14, 10)

== Ravaged Path 01.05 (unchanged grid) ==
Ravaged Path: south door to a rock [T]: from Ravaged Path (19, 50)
    north 10 (to wall) to Ravaged Path (19, 40)
    south 3 (open) to Ravaged Path (19, 42) Ravaged Path (19, 43) Ravaged Path (19, 44)
    east 2 (to wall) to Ravaged Path (21, 42) Ravaged Path (21, 43) Ravaged Path (21, 44)
    north 2 (to wall) to Ravaged Path (21, 42)
Ravaged Path: after smashing Ravaged Path (22, 42), to the corridor's east end [T]: from Ravaged Path (21, 42)
    east 8 (to wall) to Ravaged Path (29, 42)
    south 2 (to wall) to Ravaged Path (29, 44)
Ravaged Path: after smashing Ravaged Path (22, 43), to the corridor's east end [T]: from Ravaged Path (21, 43)
    east 8 (to wall) to Ravaged Path (29, 43)
    south 1 (to wall) to Ravaged Path (29, 44)
Ravaged Path: from either rock's tile to the corridor's east end [T]: from Ravaged Path (21, 42) Ravaged Path (21, 43)
    east 8 (to wall) to Ravaged Path (29, 42) Ravaged Path (29, 43)
    south 2 (to wall) to Ravaged Path (29, 44)

== Route 203 01.06 and Jubilife's east corner ==
Route 203: Oreburgh Gate to row 18 [T]: from Route 203 (55, 9) Route 203 (54, 9) Route 203 (55, 8) Route 203 (55, 10)
    south 11 (to wall) to Route 203 (54, 19) Route 203 (55, 19)
    west 17 (to wall) to Route 203 (38, 19)
    north 3 (to wall) to Route 203 (38, 16)
    west 1 (open) to Route 203 (36, 16) Route 203 (37, 16)
    south 2 (to wall) to Route 203 (36, 18) Route 203 (37, 18)
Route 203: Oreburgh Gate to row 18 [R (program)]: from Route 203 (55, 9) Route 203 (54, 9) Route 203 (55, 8) Route 203 (55, 10)
    south 11 (to wall) to Route 203 (54, 19) Route 203 (55, 19)
    west 17 (to wall) to Route 203 (38, 19)
    north 1 (open) to Route 203 (38, 18)
Jubilife: east stairs to the north road [Tn]: from Jubilife City (19, 9) Jubilife City (20, 9) Jubilife City (21, 9) Jubilife City (19, 10) Jubilife City (20, 10) Jubilife City (21, 10) Jubilife City (19, 11) Jubilife City (20, 11) Jubilife City (21, 11) Jubilife City (19, 12) Jubilife City (20, 12) Jubilife City (21, 12)
    north 3 (to wall) to Jubilife City (19, 9) Jubilife City (20, 9) Jubilife City (21, 9)
    west 1 (open) to Jubilife City (18, 9) Jubilife City (19, 9) Jubilife City (20, 9)
    west 7 (open) to Jubilife City (10, 9) Jubilife City (11, 9) Jubilife City (12, 9) Jubilife City (13, 9) Jubilife City (14, 9)
    north 1 (open) to Jubilife City (10, 8) Jubilife City (11, 8) Jubilife City (12, 8) Jubilife City (13, 8) Jubilife City (14, 8)
    east 4 (to wall) to Jubilife City (14, 8)
    west 10 (open) to Jubilife City (2, 8) Jubilife City (3, 8) Jubilife City (4, 8) Jubilife City (5, 8) Jubilife City (6, 8)

== Route 204 South 01.08 (unchanged grid) ==
Route 204 South: Jubilife to the Ravaged Path door [Tn]: from Route 204 South (14, 31) Route 204 South (14, 30) Route 204 South (14, 29)
    west 1 (open) to Route 204 South (13, 29) Route 204 South (13, 30) Route 204 South (13, 31)
    north 29 (to wall) to Route 204 South (13, 2)
    west 2 (to wall) to Route 204 South (11, 2)

== Test_PokeMartShortWalks ==
  63 blocks, 63 planned to the Mart's front

1 failure(s)

🤖 Generated with Claude Code

https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E

dayfine and others added 4 commits October 31, 2026 21:42
…om the Diamond decomp

The four image-traced grids had 3/4 of a tile per row (Bulbapedia's DP map
images are 12 px rows for 16 px columns), so every vertical leg planned on
them was short and the walls sat on the wrong rows. Take them, Sandgem Town
and the Oreburgh Mine B2F from pret/pokediamond's collision tables with
devtools/maps decomp, and translate each file's named tiles with its console
anchors. Sandgem Town and Route 202 now cover their whole matrix cells, so
the grid edges are where the game changes its location banner.

- Route 201: 64x25 (was 64x20), dx 96 / dz 839 kept; BORDER_SIGN and the
  Potion lady unchanged; the tree stub by the north-east grass is on rows
  7..12, not 5; a School Kid at (57,8) from the events file.
- Route 202: 36x32 (was 36x26); CATCH_SPOT (19,27), SAVE_SPOT (30,24); the
  three trainers named from the events file with their sight ranges, the
  fourth "trainer" was a wandering Youngster and is off the grid.
- Sandgem Town: 34x32 from the cell's top (every row +4); the road from
  Route 202 narrows on row 6 and the Lab-Center gap on the doors' row is
  four wide; the entry stop is (29,5).
- Jubilife City: 64x64 (was 64x48) at the decomp's frame; the lamps, doors
  and the four 00.05 people land where the console placed them (dx 130);
  the Trainers' School doorway and the Route 218 gate warps are 'D'.
- Route 203: 61x24; four sand rows under the ledge, the row to Jubilife is
  18; the Diamond-only Youngster near the Gate wanders in BDSP (off).
- Oreburgh Mine B2F: the decomp's frame (every row -1); the room's second
  row open, the west ledge, the top corridor's fifth row.

Tests: the plan, wall-hit, route-record and short-walk tests re-planned on
the new grids; the Jubilife 00.05 legs are checked with route_plan_costs(),
which talk_to_npc() plans with; the Mart lady's one-tile-step walks with
town costs; "Save spots to Jubilife" (no plan within max_searched, task
#15, on this grid as on the old one) is checked last so the other walks run.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
PokemonBDSP_AutoStory_Tests.cpp: every walk-table entry takes #110's
costs (the ones the program plans with) on #111's re-derived grids; the
westward Route 202-checkpoint walk starts east of the Lab's sign (#111);
"Save spot to Jubilife" from {save_spot} (#110) replaces the trailing
known-failing "Save spots to Jubilife" check. RouteRecords.cpp: #110's
Oreburgh City and Floaroma grids and start tiles, #111's traceable
Jubilife and Route 203 records.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…for gcc -Wdangling-reference

gcc 13 refuses a reference bound to bdsp_trainer()'s result when the slug
is a temporary; the lookup returns a reference into the trainer table, so
the slug's lifetime does not matter, but a named slug keeps -Werror quiet.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…g-reference

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine

dayfine commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Cherry-picked b25fbf3 and cbbf690 (from bdsp/ci-fixes: name the trainer and torterra slugs for gcc -Wdangling-reference). They are #115's last two fixes, which the squash merge into bdsp/event-sandgem-center missed; #112 gets them through its base merge.

… on the game's grids

On the decomp grids, "After training to the Pokemon Center" finds no plan
with the route costs; walk_route() then falls back to the default costs,
so the test plans it with those. The four Mart-lady walks to the Route 201
sign find no plan with the default costs: their one-tile steps need the
town costs. They are walked by hand, so the plan is only a check of the
grid. Every other entry keeps the costs the program plans it with.

Checked with a standalone planner harness over the merged grids: every
table entry and every 00.05 Jubilife leg finds a plan with these costs
and passes the door and tall-grass checks.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine and others added 2 commits November 1, 2026 09:22
…p/maps-rederive

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…d stop is named

Moved here from #121 (bdsp/mvp-v3), where console runs r253..r258 found
them; this PR owns the decomp grids.

- Route 202: trees, not grass, at (15..20, 28..29): the console's catch
  patch is three rows between tree rows, as the image-traced grid had it
  (r253: west along row 29 stopped at column 21); a tree at (21, 30),
  south of the pocket at (21, 29) where the catch's save loads (r254).
  CATCH_SPOT (19, 27) is the patch's bottom row.
- story_after_training_area() keeps only standable tiles (the planner
  refuses starts on trees); story_catch_save_area() is where the catch's
  save may stand: the patch and the lawn column east of it to the pocket.
- Sandgem: ROUTE_202_ENTRY_STOP (29, 5), where the walk south from Route
  202 stops above the Mart; sandgem_entry_stop() uses it.

Tests (PokemonBDSP_AutoStory_MapGrid_Tests.cpp): the patch's columns run
rows 25..27 between trees, and plans from the save area and the pocket
end in the grass; Sandgem's Center door (17, 10), its sign (20, 10) and
the open row below them; plans into Sandgem from every tile of the
training area.

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 1, 2026
#111's decomp grids win: Segment00Lines drops its Route 201 stand-in
for Route201::grid() (7 rows shorter at the top) and SandgemTown::grid()
is now its whole cell (4 rows taller). The 00.01-00.03 lines, triggers,
named tiles and route records move by those offsets; their world tiles
are unchanged. Done first on #121 (64afa5f); this PR owns the lines.
This PR now builds on #111.

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 1, 2026
…08f8c) into bdsp/mvp-v3

#111 now holds the grid fixes and #112 the 00.01-00.03 lines on them,
both first made here; their content matches this branch's, so only
nav/shared's newer LegPlanner (an opt-in wild-stop weight, 0 by default)
and #111's map grid tests arrive.

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 1, 2026
…n its own file

Test_Route202CatchGrass, Test_SandgemCenterApproach and
Test_TrainingToSandgem moved to #111 (PokemonBDSP_AutoStory_MapGrid_Tests,
merged in), so Segment00_Tests.cpp is #112's again; Test_IndoorsAnyLight,
v3's own, moves to PokemonBDSP_AutoStory_Indoors_Tests.cpp. No program
code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…les go

Each of the 15 story maps on this branch is now a JSON file in the shared
map schema (Pokemon_MapData.h), PokemonBDSP/Maps/<name>.json in Packages'
Resources, converted once from the C++ tables (cell for cell; '"' grass
is '~', a standing 'N' is an npc object on open ground). The tables are
removed; each X::grid() returns story_grid("X"), which reads the map
through the shared parse_map() and turns it into a TileGrid
(PokemonBDSP_AutoStory_MapGrids): the copy the program installs from
Packages, or else the built-in copy.

The built-in copy, for the unit tests and CI without Packages, is
PokemonBDSP_AutoStory_Maps_TestData*.cpp, generated by
devtools/maps/bdsp_maps.py --json-dir ... --cpp ... (--check to verify),
one raw literal per map, byte for byte the JSON file, split into parts
under the 1000-line file limit. Named tiles stay C++ constants.

Tests: every built-in map loads, and the JSON glyphs map to BDSP tiles
(water and wanderers have none). The route and grid tests now plan on the
JSON-loaded grids.

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 1, 2026
…nned-walks

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 1, 2026
The Gym's grid, which this PR added, moves to OreburghGym.json like
#111's maps (converted once, cell for cell); its C++ table goes and
OreburghGym::grid() returns story_grid("OreburghGym"). bdsp_maps.py
embeds it, and the test data is regenerated with it.

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 1, 2026
…sp/mvp-v3

#111 and #112 now hold the maps as JSON, the built-in test copy, the
generator and the JSON-to-grid loader (MapGrids), which were this
branch's; the C++ tables are gone. What stays here: the program loads
Packages' files at start, checks each against the built-in copy, and
installs them for story_grid() (MapFiles); StoryMaps goes back to the
X::grid() accessors. The glyph test moved to #111 with the loader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…ederive

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 1, 2026
Brings pa_embed_text_files() (cmake/EmbedTextFiles.cmake), which #111
uses to build the BDSP maps' JSON into the tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine and others added 2 commits November 1, 2026 09:43
…nerated C++

The 15 maps are plain files in PokemonBDSP/Programs/AutoStory/Maps, the
same files as Packages' Resources/PokemonBDSP/Maps. CMake builds them
into the program for the unit tests with nav/shared's
pa_embed_text_files() as bdsp_map_json() (declared in MapGrids.h);
story_grid()'s built-in copy reads from it. The generated
Maps_TestData*.cpp go. devtools/maps/bdsp_maps.py now only checks
(--check --json-dir <Packages' folder>) that Packages has the same files
byte for byte; nothing builds the maps any more.

The Route 201 comments no longer say the Poke Mart lady wanders: she
stands still in Diamond's events file and on the console (the user,
2026-11-01); r113a..r120a missed her by the walk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…m to Packages

The user's decision (2026-11-01): keep the maps as files in this
repository for now. story_grid() reads bdsp_map_json() (the committed
JSON files, built in by CMake) and nothing else; there is no installed
copy from Packages to prefer. TODO notes at the loader and in
bdsp_maps.py say to move them to PokemonAutomation/Packages
(Resources/PokemonBDSP/Maps) when ready.

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 1, 2026
…) into bdsp/segment00-planned-walks

The generated test data goes with #111's swap; the Oreburgh Gym, this
PR's map, is committed as Maps/OreburghGym.json beside #111's 15.

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 1, 2026
…uilt in by CMake) into bdsp/mvp-v3

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 1, 2026
…s are the only copy

The user's decision (2026-11-01): the maps stay files in this repository
(#111, #112), built into the program; story_grid() reads only those.
The start-up load of Packages' PokemonBDSP/Maps and its "differs from
this build's copy" check go, with their test; the lab deploy no longer
copies map files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
dayfine and others added 2 commits November 1, 2026 09:48
… the Center

On the decomp grids, with the catch patch three rows, the one walk from
the training area to below the Center's sign finds no plan (tile grid
plans: "After training to the Pokemon Center: no robust route found"),
and on r252 its default-costs plan went round the houses south of the
Mart and ended two tiles short. Two walks instead: down the road with
the default costs to where it stops above the Mart (ROUTE_202_ENTRY_STOP),
then the Sandgem Center events' town plan, which ends walking north into
the Center's sign. Made first on #121 (cd3d0b3); it goes with the grids.

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 1, 2026
…dsp/segment00-planned-walks

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 1, 2026
…approach) into bdsp/mvp-v3

#111 now has the two walks into Sandgem; this branch's version of the
heal (the same two walks, then the taps west below the door) is kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
@dayfine

dayfine commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Superseded by the BDSP v4 stack: maps as generated JSON in #134, navigation in #127.

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

1 participant