Add seed JSON output (per-game, games.json, pokemon.json)
Wire output module into CLI pipeline: route ordering, special encounter merging, and JSON writing for per-game encounters, global games list, and pokemon list with types and sprite paths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
---
|
||||
# nuzlocke-tracker-gkcy
|
||||
title: Output seed JSON
|
||||
status: todo
|
||||
status: in-progress
|
||||
type: task
|
||||
priority: normal
|
||||
created_at: 2026-02-11T08:43:21Z
|
||||
updated_at: 2026-02-11T08:43:33Z
|
||||
updated_at: 2026-02-11T09:24:47Z
|
||||
parent: nuzlocke-tracker-bs05
|
||||
blocking:
|
||||
- nuzlocke-tracker-vdks
|
||||
@@ -15,15 +15,15 @@ Generate the final per-game JSON files in the existing seed format.
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] **Apply route ordering**: Use the existing `backend/src/app/seeds/route_order.json` to assign `order` values to routes. Handle aliases (e.g. "red-blue" → "firered-leafgreen"). Log warnings for routes not in the order file.
|
||||
- [ ] **Merge special encounters**: Integrate starters, gifts, fossils, and trades from `backend/src/app/seeds/special_encounters.json` into the appropriate routes.
|
||||
- [ ] **Output per-game JSON**: Write `{game-slug}.json` files matching the existing format:
|
||||
- [x] **Apply route ordering**: Use the existing `backend/src/app/seeds/route_order.json` to assign `order` values to routes. Handle aliases (e.g. "red-blue" → "firered-leafgreen"). Log warnings for routes not in the order file.
|
||||
- [x] **Merge special encounters**: Integrate starters, gifts, fossils, and trades from `backend/src/app/seeds/special_encounters.json` into the appropriate routes. Pokemon names are resolved to proper display names via PokemonMapper.
|
||||
- [x] **Output per-game JSON**: Write `{game-slug}.json` files matching the existing format:
|
||||
```json
|
||||
[{"name": "Route 1", "order": 3, "encounters": [...], "children": []}]
|
||||
```
|
||||
- [ ] **Output games.json**: Generate the global games list from `version_groups.json` (this may already be handled by existing config, verify).
|
||||
- [ ] **Output pokemon.json**: Generate the global pokemon list including all pokemon referenced in any encounter. Include pokeapi_id, national_dex, name, types, sprite_url.
|
||||
- [ ] **Handle version exclusives**: Ensure encounters specific to one version in a version group only appear in that game's JSON file (e.g. FireRed exclusives vs LeafGreen exclusives).
|
||||
- [x] **Output games.json**: Generate the global games list from `version_groups.json` — 38 games written, matching existing count.
|
||||
- [x] **Output pokemon.json**: Generate the global pokemon list including all pokemon referenced in any encounter. Include pokeapi_id, national_dex, name, types, sprite_url.
|
||||
- [x] **Handle version exclusives**: Encounters are filtered by `version_identifiers` per game — verified FireRed vs LeafGreen have 18 exclusives each.
|
||||
|
||||
## Notes
|
||||
- The output must be a drop-in replacement for the existing files in `backend/src/app/seeds/data/`
|
||||
|
||||
Reference in New Issue
Block a user