--- # nuzlocke-tracker-oqfo title: Improve encounter rate display for time/weather variants status: in-progress type: feature priority: normal created_at: 2026-02-10T14:04:27Z updated_at: 2026-02-14T21:39:34Z --- ## Problem PokeDB data reveals that encounter rates vary by context across many games: - **Gen 2/4 (G/S/C, HG/SS, D/P/Pt, BDSP):** morning/day/night - **Gen 5 (B/W, B2/W2):** spring/summer/autumn/winter - **Gen 8 (Sw/Sh):** weather (clear, cloudy, rain, thunderstorm, snow, etc.) - **Gen 8 (Legends Arceus):** time + weather boolean conditions - **Gen 9 (Sc/Vi):** overworld probability weights Currently the seed format and `RouteEncounter` model have a single `encounter_rate` field, which flattens all of this into one number. ## Goal Extend the data model and UI to support conditional encounter rates, so users can see which Pokemon appear under which conditions. ## Design Added a nullable `condition` column to `RouteEncounter` with a functional unique index using `COALESCE(condition, '')` to handle NULL uniqueness. Seed JSON supports an optional `conditions` dict that expands into per-condition DB rows. ## Checklist - [x] Update seed JSON schema: add optional `conditions` field to encounter entries - [x] Add `condition` column to `RouteEncounter` model with migration - [x] Update seed loader to handle `conditions` entries (expands dict into rows) - [x] Update API serialization to include `condition` field - [x] Update export endpoint to include `condition` field - [x] Update frontend types (`RouteEncounter`, admin input types) - [x] Update AdminRouteDetail to display condition column (shown only when conditions exist) - [x] Update EncounterModal to show conditions contextually - [x] Update seed data for HeartGold Route 29 as proof of concept (morning/day/night) - [x] Keep simple display for games with flat rates (no regression) - [ ] Update seed data for remaining games with variant encounters (incremental)