Skip to content

[issues-fix] Reveal the Victory Road 2F boulder (#282) - #283

Merged
lohiaguitar91 merged 1 commit into
masterfrom
fix/victory-road-3f-boulder-reveal-flag
Sep 5, 2026
Merged

[issues-fix] Reveal the Victory Road 2F boulder (#282)#283
lohiaguitar91 merged 1 commit into
masterfrom
fix/victory-road-3f-boulder-reveal-flag

Conversation

@lohiaguitar91

Copy link
Copy Markdown
Collaborator

Fixes #282.

What

One line in data/maps/VictoryRoad_3F_Frlg/map.json — the pushable boulder at (33,18):

-      "trainer_type": "TRAINER_TYPE_NONE",
+      "trainer_type": "FLAG_HIDE_VICTORY_ROAD_2F_BOULDER",

Why

HandleBoulderFallThroughHole (src/field_control_avatar.c:1446-1454) clears the flag stored in the falling boulder's own template trainer_type. This is the ninth boulder from #37; #239/#241 restored the eight Seafoam ones and left this one out of scope. With TRAINER_TYPE_NONE there, pushing the boulder into the hole at 3F (34,18) cleared flag 0, so FLAG_HIDE_VICTORY_ROAD_2F_BOULDER stayed set and the 2F boulder at (33,19) never appeared.

That boulder is load-bearing. Walking the three Victory Road layouts with collision, directional MB_IMPASSABLE_* and the elevation rules enforced, and boulder pushes modelled:

  • Only the (33,19) boulder can reach 2F floor switch 2 at (14,19); the (8,7) and (6,17) boulders can reach switch 1 at (2,19) and nothing else. The player cannot press it either — the coord event fires on VAR_MAP_SCENE_VICTORY_ROAD_2F_BOULDER2 == 99, which only HandleBoulderActivateVictoryRoadSwitch produces.
  • Switch 2 opens the rock barrier at (33,16)/(33,17). The east half of the dungeon (2F plateau, 2F north-east room, 3F east region, Route 23 exit) is one 108-tile component touching exactly two blocked tiles: that barrier, and 3F (36,13) — where the plug boulder at 3F (35,13) wedges, since its one-tile doorway only admits an eastward push and (37,13) is solid.
  • On Route 23, only the region holding the Victory Road exit door at (18,28) reaches the MAP_INDIGO_PLATEAU_EXTERIOR connection.

So before this change Victory Road could not be completed and the Pokémon League was unreachable. Route23_OnTransition resets the puzzle on re-entry, so no save was stuck — just unable to finish.

The value matches upstream pret/pokefirered (c75f352) for this same object, and all three Victory Road layout blobs here are byte-identical to upstream's.

Testing

  • All eleven make validate steps pass, run individually (python3 Testing/ValidateGen13.py, ValidateScripts, ValidateOwMonPlacements, ValidateMapEvents, ValidateMetatileBounds, GenObstacleTable.py --check, SavePatch.py --check, ValidateDoorAnims.py --max 0, ValidateTilesetPalettes, ValidateCelioGifts, ValidateGreedyGifts). make validate as a target cannot run in this container — it has no arm-none-eabi toolchain to build its map/trainer prerequisites — so CI's run is the one that counts here. ValidateMapEvents.py's check_trainer_type already exempts pushable boulders carrying a FLAG_HIDE_* value (added in [issues-fix] 1 fixes, 2026-09-01 #241), so no validator change is needed.
  • With the fix applied, the intended solve completes end to end in the map data: 3F boulder into the hole → player follows down to 2F (34,19) → revealed boulder pushed to switch 2 at (14,19) → barrier open → 2F (36,17) → 3F (39,17) → 3F (37,10) → 2F (38,9) → Route 23 exit at 2F (48,12).
  • Emulator check on a downstream fork's build (headless mGBA), reported by the issue author: before, the flag stays 1 and no 2F boulder object exists; after, it clears to 0 and the boulder is present at (33,19). The switch mechanism itself was separately confirmed working via switch 1.

Save compatibility

Object-event template data is compiled into the ROM and read fresh on every fall. No SaveBlock change, no flag renumbering, no migration.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YT3U1qS1Lj2x3Q74edfEBB


Generated by Claude Code

The pushable boulder at (33,18) on Victory Road 3F is the one boulder
from #37 that #239/#241 did not restore. HandleBoulderFallThroughHole
clears the flag stored in the falling boulder's own template
trainer_type, so with TRAINER_TYPE_NONE there the fall cleared flag 0
and FLAG_HIDE_VICTORY_ROAD_2F_BOULDER stayed set.

Only the hidden 2F boulder at (33,19) can reach 2F floor switch 2 at
(14,19), and that switch opens the rock barrier at (33,16)/(33,17) --
the only way into the east half of the dungeon that is not the
one-way plug boulder at 3F (35,13). With the 2F boulder never
revealed, the Route 23 exit at 2F (48,12) is unreachable and Victory
Road cannot be completed.

Restores the upstream pokefirered value. Map data only; no SaveBlock
or flag-index change, so no migration.

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

@evilchinesefood evilchinesefood left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grok automated review

Summary: One-line map data fix that correctly wires the 3F falling boulder to clear FLAG_HIDE_VICTORY_ROAD_2F_BOULDER via the established trainer_type convention used by HandleBoulderFallThroughHole / GetBoulderRevealFlagByLocalIdAndMap. Matches upstream pret/pokefirered and restores the only path that can press switch 2, so Victory Road (and the League) becomes completable again. Save-compatible; no code or flag renumbering.

Verdict: ship

Findings: None. Change is minimal, correct, and well-documented.

Tests: Author reports all listed validators pass and emulator confirmation of the flag clear + boulder appearance. CI is the authoritative make validate run. No new logic that would require additional unit tests.

Secrets: Clean (no secrets present in the diff).

@lohiaguitar91

Copy link
Copy Markdown
Collaborator Author

@evilchinesefood wondering before you merge if you got through victory road in kanto. The ladder seems like a hard block w/o this fix.

Copy link
Copy Markdown
Collaborator Author

One thing worth adding to that question, since it's the obvious escape hatch: Fly can't bypass it either. FLAG_WORLD_MAP_INDIGO_PLATEAU_EXTERIOR is set only by IndigoPlateau_Exterior_Frlg's own OnTransition (data/maps/IndigoPlateau_Exterior_Frlg/scripts.inc:7) — i.e. by physically arriving there once — and by the debug menu (data/scripts/debug.inc:120, src/debug.c:1199). Since the only walking route to that map is Route 23's north edge, and on Route 23 only the region holding Victory Road's exit door at (18,28) reaches that edge (the entrance door at (5,28) reaches neither the north edge nor the exit door), a normal save can never register the destination in the first place.

So on a release build the pre-fix answer is: through the debug menu, or not at all.


Generated by Claude Code

@lohiaguitar91

Copy link
Copy Markdown
Collaborator Author

I verified manually that it fixes it and got through victory road, so merging.

@lohiaguitar91
lohiaguitar91 merged commit 53eb010 into master Sep 5, 2026
6 checks passed
@lohiaguitar91
lohiaguitar91 deleted the fix/victory-road-3f-boulder-reveal-flag branch September 5, 2026 20:31
@evilchinesefood

Copy link
Copy Markdown
Owner

Awesome work, thanks! Have I finished it, yes. On this current version, or even a few versions back at this point, no. Not easy to do full playthroughs anymore with how much content is here, so it's REALLY nice having someone else enjoying this as I am.

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.

Kanto Victory Road cannot be completed: the 3F boulder never reveals the 2F boulder, so floor switch 2 can never be pressed

3 participants