Skip to content

Event legendaries in-game: Jirachi, Celebi, Mew, Deoxys, Latias/Latios, Lugia and Ho-Oh - #316

Open
luksgrin wants to merge 5 commits into
ZallaxDev:integrationfrom
luksgrin:feature/legendary-events
Open

luksgrin wants to merge 5 commits into
ZallaxDev:integrationfrom
luksgrin:feature/legendary-events

Conversation

@luksgrin

@luksgrin luksgrin commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #315 in-game: Emerald's event legendaries (Mew, Deoxys, Latias/Latios, Lugia, Ho-Oh), plus Jirachi and Celebi, become reachable through post-game story events — no options menu, no save editing. Each ticket is earned, then the game's own unused scripts take over (the Lilycove ferry, Faraway Island, Birth Island, Southern Island, Navel Rock).

cc @samethernet — as promised in the issue, feedback welcome.

Five commits, one per track, each a single patch:

Patch Track
0097-jirachi-and-aurora-ticket Jirachi (Meteor Falls), and the Aurora Ticket → Deoxys
0098-celebi-shrine Celebi (a shrine in Ever Grande's meadow, reached from Victory Road)
0099-abandoned-ship-old-sea-map The Old Sea Map → Mew (Abandoned Ship)
0100-eon-ticket The Eon Ticket → Latias/Latios
0101-mystic-ticket The Mystic Ticket → Lugia and Ho-Oh

Everything is gated behind beating the League. New maps are appended at the end of their map group (no existing map renumbers), new tiles are appended to their tilesets, and only unused flags are used (FLAG_UNUSED_0x264–0x272). Outside the new content, the game's own areas are unchanged. docs/LEGENDARY_EVENTS_TESTING.md is the full walkthrough and test checklist.

Besides the patches: the recipe/builder learn maps and layouts that no retail ROM has (tools/vtree_manifest.py, tools/gen_recipe.py, builder/emerald3ds_builder/vtree.py), the Celebi shrine is modelled for the voxel world (voxel_building_specs.py, two models: orange and blue), the locale manifests are rebased onto the patched files, and docs/VOXEL_STATUS.md lists the new rooms (not yet voxel-modelled, drawn flat).

Testing

  • make verify (240 PASS), python -m unittest discover -s builder/tests (283 tests; the same 2 French-staging errors as on integration itself, Graphic outside ROM: graphics/battle_interface/hpbar.4bpp), tools/localize_portuguese.py --check, tools/release_audit.py --repo . --strict (clean), on this branch rebased onto integration.
  • Played on a 3DS: the Jirachi track and the Aurora Ticket, Celebi, the Mew track (including the Abandoned Ship's breaking floors), Mom's Eon Ticket and the Mystic Ticket.
⚠️ Spoiler alert — how to get each legendary

Jirachi (and Deoxys)

  1. After the League, the scientist in the Mossdeep Space Center (1F) reports a faint signal from deep in Meteor Falls and sends you to Steven.
  2. Beat Steven in Steven's Cave. His lines end with a hint: COSMIC POWER, and the sun and moon marks where the Bagon live.
  3. In Meteor Falls B1F 2R (the Bagon room), marks appear on the wall above the TM. With Solrock leading, Lunatone in the sixth slot and either one knowing Cosmic Power, the rock splits open.
  4. A sunken chamber holds the White Rock: Jirachi, Lv. 40. Ran away: it is back next visit. Knocked out: back after the Hall of Fame.
  5. With Jirachi in the party, the same scientist detects a second signal and gives you the Aurora Ticket → Lilycove ferry → Birth Island: Deoxys, Lv. 30.

Meteor Falls B1F 2R: the marks, then the way open
Jirachi's chamber

Celebi

  1. After the League, Victory Road B1F has a cave door in the back wall north of its two Strength boulders. It leads to a long hidden passage and a chamber whose exit comes down into Ever Grande's walled meadow, where a small shrine stands. A grandmother by the League's entrance tells its story.
  2. With Jirachi in the party, use Sweet Scent in the meadow: the screen slowly turns white and the flowers and the shrine's roof turn blue.
  3. Face the shrine: Celebi, Lv. 40. Afterwards the meadow fades back; Celebi returns to Sweet Scent unless caught (knocked out: back after the Hall of Fame).

Victory Road's new door, the hidden passage and chamber
The meadow and its shrine, before and after Sweet Scent
The shrine in the voxel world: the orange and the blue model, from the game's camera and at an angle (in game the meadow's flowers turn blue too)

Mew

  1. After the League, the floor of the Abandoned Ship's B1F storage room (behind the Storage Key door) is cracked. With Surf and Dive in the party it breaks open and you sink into a flooded hold (underwater), where the Old Sea Map lies.
  2. Surface at the light water to the east: a pool in a new engine room. Climb its ladder to the upper engine room, find your way through a small maze of broken deck, and fall through the cracked floor back to the storage room.
  3. Show the Old Sea Map to the ferry's sailor at Lilycove Harbor: Mr. Briney sails you to Faraway Island — Mew, Lv. 30, chased through the grass.

The storage room's crack, broken, and the flooded hold
The engine rooms

Latias / Latios

After the League, talk to Mom with the roaming Lati in your party: a letter with no sender, your Lati cries, and inside is the Eon Ticket → Lilycove ferry → Southern Island: the other Lati, Lv. 50.

Lugia and Ho-Oh

  1. After the League, the scientist on Weather Institute 2F (Route 119) tracks the abnormal weather that leads to Groudon and Kyogre, as in the game.
  2. Once it is over, he mentions one reading he can't explain: a silvery storm and a rainbow far out at sea — would it answer Groudon, Kyogre and Rayquaza brought together?
  3. Bring all three in your party (caught or traded in): they cry, the readings answer, and he gives you the Mystic Ticket → Lilycove ferry → Navel Rock: Lugia (down) and Ho-Oh (up), Lv. 70.

…ket for it

After the League, the Space Center scientist on Mossdeep 1F reports a faint
signal from deep in Meteor Falls and sends you to Steven. Steven,
in Steven's Cave as always, ends his lines with a hint: COSMIC POWER, and the
sun and moon marks down where the BAGON live. Once both are done the marks are
cut into the wall of Meteor Falls B1F 2R at (5, 2), above the TM's ball: our
own carved tile (metatile 0x2A0) and an invisible object there, so plain rock
gives no sound before and the opening none after. With SOLROCK leading,
LUNATONE sixth and either knowing COSMIC POWER, the rock splits open, Steven
leaves his cave, and a new map, the sunken JIRACHI chamber (19x16, the BAGON
room's double rim with rounded corners), holds the White Rock: JIRACHI, level
40, with the rules of the game's event legendaries (run: back next visit;
knocked out: back after the HALL OF FAME; otherwise "It's a white rock.").

With JIRACHI caught and in the party, the same scientist hands over the AURORA
TICKET and the BIRTH ISLAND ferry opens: DEOXYS, level 30.

The recipe and builder learn added maps (tools/vtree_manifest.py,
tools/gen_recipe.py, builder/emerald3ds_builder/vtree.py), so the chamber's
data comes from the player's ROM as every other map's does.
docs/LEGENDARY_EVENTS_TESTING.md is the walkthrough and test list.

Both live in one patch, patches/pokeemerald/0097-jirachi-and-aurora-ticket.patch.

The locale manifests (tools/locales/*.json.gz) are rebased onto the patched
files they edit, so the localized builds still find their texts.
After the League a cave door opens in Victory Road B1F's back wall north of
its STRENGTH boulders (33, 2). It leads to a long passage north and a ladder
up to a small chamber, whose way out comes down from a new cave mouth (8, 6)
into Ever Grande's walled meadow, reachable no other way. Before the League
Ever Grande and Victory Road are the game's own: the door, the mouth, the
shrine and the grandmother are drawn and placed by their maps' scripts after
it (patch 0098).

In the meadow stands a small shrine (10-11, 16-18): new tiles in Ever
Grande's tileset, its own palette in a free slot. Facing it: "It's an old
shrine...". With JIRACHI in the party, SWEET SCENT there turns the screen
slowly white, and it comes back with the meadow's flowers and the shrine's
roof blue (the city's own blue flowers; a second palette for the roof, its
posts still orange). Without JIRACHI, SWEET SCENT finds nothing, as anywhere
in a town. While the meadow is blue the shrine holds CELEBI: its cry, and the
battle, level 40, with JIRACHI's intro and music. After it, however it ends,
the meadow fades back to orange; CELEBI comes again to SWEET SCENT unless
caught, or knocked out (until the HALL OF FAME). A save from before the
meadow faded is set right as the city loads. The grandmother by the League's
entrance tells the shrine's story, and once the meadow has been blue: "So it
was true... The flowers by the mountain briefly turned blue."

The voxel world: the shrine is modelled (voxel_building_specs.py), as deep
as it is wide - the drawn front exact at 45 degrees, a hipped roof in courses
of the same tiles behind and the gable running back into it - twice, orange
and blue, each standing while the cell under its altar holds its own
metatile. The ground mesh test's stub answers no metatile for a cell outside
its test map, as a model with such a condition asks. The locale manifests
are rebased onto the patched files. docs/LEGENDARY_EVENTS_TESTING.md and
docs/VOXEL_STATUS.md are updated.
After the League the floor of the ship's B1F storage room is cracked by its
far wall (7, 2), drawn like Sky Pillar's cracked floor in the ship's own
colours. With a POKeMON that knows SURF and one that knows DIVE in the party
(eggs do not count; the 3DS field-HM option counts as for SURF and DIVE
anywhere) it gives way under the player: it breaks open into the cabins'
broken hole and the player sinks through it as in Lavaridge Gym (its ash
puff and sound) into a flooded hold below, underwater. There the OLD SEA
MAP lies in an item ball; the only place to surface is a cross of light
water at the hold's east end, which comes up in the pool of a new engine
room. Its ladder climbs to an upper engine room: a small maze of the deck's
broken holes and handrails, an ESCAPE ROPE, and in its corner a cracked
floor that breaks into a hole (Sky Pillar's, in the engine room's floor)
and drops the player, as Sky Pillar's floor does, back into the storage
room. The rooms stack on one plan, each passage over or under the next.
Once the map is taken, the storage room's crack stays a broken hole.

Taking the map sets FLAG_ENABLE_SHIP_FARAWAY_ISLAND, as the map's
distribution did, so the game's own scripts take over: the ferry's sailor
at Lilycove Harbor, Mr. Briney, Faraway Island and Mew.

The boiler, consoles, engine, floor, holes and handrails are copied from
the Facility tileset into the ship's (palette slot 12 and spare entries of
slot 11). Two specials: DoLavaridgeGym1FWarp, the game's own, now callable
from a script, and DoFallWarpToFixedHoleWarpPosition, a fall to the cell
the map's setholewarp names rather than the player's own x and y, used
only here; the game's own holes are unchanged (patch 0099).

The locale manifests are rebased onto the patched files.
docs/LEGENDARY_EVENTS_TESTING.md and docs/VOXEL_STATUS.md are updated (the
three new rooms not yet modelled in the voxel world).
After the League, with the roaming EON POKeMON in the party (LATIAS or
LATIOS, whichever roams in this game; in a PC box it does not count), Mom
has a letter for the player: no name on it, the EON POKeMON cries, and
inside, a note that its kin waits on Southern Island and the EON TICKET.
Taking it sets FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, as the ticket's
distribution did, so the game's own scripts take over: the ferry at
Lilycove Harbor and the other EON POKeMON on Southern Island, level 50.
After it, Mom is as she always is; a full bag, and she tries again next
time (patch 0100).

docs/LEGENDARY_EVENTS_TESTING.md is updated.
After the League, once GROUDON and KYOGRE no longer stir the weather, the
Weather Institute's scientist (2F) is left with one reading he cannot
explain: a silvery storm and a rainbow that never fades, far out at sea.
He wonders whether the readings would answer GROUDON, KYOGRE and RAYQUAZA
brought there together (the hint). With the three in the party, caught or
traded in, they cry one after another, the readings answer them, and he
gives the MYSTIC TICKET for NAVEL ROCK. Taking it sets
FLAG_ENABLE_SHIP_NAVEL_ROCK, as the ticket's distribution did, so the
game's own scripts take over: the ferry at Lilycove Harbor, Lugia and
Ho-Oh on Navel Rock, level 70. After it he is as he always is; a full bag,
and he tries again next time (patch 0101).

The locale manifests are rebased onto the patched files.
docs/LEGENDARY_EVENTS_TESTING.md is updated.
@luksgrin

Copy link
Copy Markdown
Contributor Author

About the red CI: the only failing job is audit-and-python (3.11 and 3.15.2), and it fails on two builder tests that already fail on integration itself, without this PR:

ERROR: test_naming_column_positions_are_read_as_three_nine_byte_rows (test_localize_french.FrenchStagingTests)
ERROR: test_numeric_tables_keep_their_c_dimensions (test_localize_french.FrenchStagingTests)
ValueError: Graphic outside ROM: graphics/battle_interface/hpbar.4bpp

integration's own CI has failed the same way on its last three runs (ce24827, d0f7066, 3f6b688; e.g. https://github.com/ZallaxDev/emerald-3ds/actions/runs/46124715676), and I reproduced both errors locally on a clean checkout of integration. This PR doesn't touch the French staging; the other 281 builder tests, host-tests, package and release-versions pass.

@luksgrin

Copy link
Copy Markdown
Contributor Author

@ZallaxDev would appreciate your feedback 🙏 Unsure if you will agree on these add ons as being the right direction for the project. I thought it would be fun to add these.

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