--- # nuzlocke-tracker-j28y title: Curate route ordering to match game progression status: completed type: task priority: normal created_at: 2026-02-05T13:37:39Z updated_at: 2026-02-07T12:30:17Z parent: nuzlocke-tracker-f5ob --- Routes are currently in alphabetical order from PokeAPI. Update the order field in each game's JSON seed file to reflect actual game progression (e.g., Pallet Town → Route 1 → Viridian City → Route 2 → ...). ## Automated Approach: Bulbapedia Walkthrough Scraping We already have all location/encounter data from PokeAPI. The missing piece is progression order, which can be extracted from Bulbapedia walkthroughs. ### Data Source Every game has a Bulbapedia walkthrough with routes listed in progression order: - https://bulbapedia.bulbagarden.net/wiki/Walkthrough:Pokémon_FireRed_and_LeafGreen - https://bulbapedia.bulbagarden.net/wiki/Walkthrough:Pokémon_Emerald - https://bulbapedia.bulbagarden.net/wiki/Walkthrough:Pokémon_HeartGold_and_SoulSilver - (and so on for all games through Gen 8) ### Implementation Plan 1. **Scrape walkthrough TOCs** - Parse the section headings from each game's walkthrough page to get route order 2. **Normalize names** - Map Bulbapedia location names to PokeAPI location names (handle differences like "Route 1" vs "Kanto Route 1") 3. **Generate ordering** - Create a JSON mapping of `{game: {location_name: order_number}}` 4. **Update fetch_pokeapi.py** - Apply ordering when generating seed data ### Benefits - Automatable for all games (Gen 1-8) - Bulbapedia walkthroughs are community-maintained and accurate - Scales as we add more games - Only needs to run once per game (or when walkthroughs update) ### Considerations - Gen 9 (Scarlet/Violet) is open-world so ordering is less meaningful - Some games have branching paths - may need to pick a canonical order - Name matching between Bulbapedia and PokeAPI may need fuzzy matching ## Current Scope - FireRed and LeafGreen share the same route progression (Kanto) - HeartGold and SoulSilver share the same route progression (Johto + Kanto) - Emerald has its own progression (Hoenn) - So effectively 3 unique orderings to define for current games ## Files - `backend/src/app/seeds/data/firered.json` - `backend/src/app/seeds/data/leafgreen.json` - `backend/src/app/seeds/data/emerald.json` - `backend/src/app/seeds/data/heartgold.json` - `backend/src/app/seeds/data/soulsilver.json`