2026-02-10 15:16:26 +01:00
---
# nuzlocke-tracker-oqfo
title: Improve encounter rate display for time/weather variants
2026-02-14 22:42:49 +01:00
status: in-progress
2026-02-10 15:16:26 +01:00
type: feature
2026-02-14 22:17:57 +01:00
priority: normal
2026-02-10 15:16:26 +01:00
created_at: 2026-02-10T14:04:27Z
2026-02-14 22:42:49 +01:00
updated_at: 2026-02-14T21:39:34Z
2026-02-10 15:16:26 +01:00
---
2026-02-14 22:17:57 +01:00
## Problem
2026-02-10 15:16:26 +01:00
2026-02-14 22:17:57 +01:00
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.)
2026-02-10 15:16:26 +01:00
- **Gen 8 (Legends Arceus):** time + weather boolean conditions
2026-02-14 22:17:57 +01:00
- **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
2026-02-14 22:42:49 +01:00
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.
2026-02-14 22:17:57 +01:00
## Checklist
2026-02-14 22:42:49 +01:00
- [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)