# NATIONS preview geography and difficulty

Source: Natural Earth Admin 0 Countries, 1:10m, public domain.
https://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-0-countries/
https://www.naturalearthdata.com/about/terms-of-use/

Retrieved 2026-12-01. The exact source URL and SHA-256 are in
`tools/nations/source_manifest.json`. A reduced source snapshot is checked in;
`python3 tools/nations/generate.py` regenerates the assets and local SQL fixture
without network access. `--check` verifies byte-for-byte reproduction.

This is NOT an approved production country master. The proposed 196-entry
preview list is 193 UN members + Vatican + Palestine + Taiwan. The existing
LOUD country-code mapper includes territories as well, and its previous globe
prototype only offered ten playable countries; neither establishes a 196-entry
list. `tools/nations/country_codes.json` makes this unresolved selection explicit.
The data provider uses de facto boundaries. No political position is implied.

The primary (highest-population) feature for each ISO code is selected. This
avoids replacing France/Australia/Brazil with a dependency or disputed island.
Dependent/disputed subfeatures are not merged. Original polygon geometry is
retained in the source snapshot; render rings use deterministic 0.08-degree
point thinning, preserving ring closure and tiny islands. Small countries can
always be selected from the list. These are preview maps, not legal boundaries.

Population estimates: source POP_EST / POP_YEAR, 2019 or 2020.
GDP: source GDP_MD (million USD) / GDP_YEAR, 2011/2014/2015/2016/2018/2019.
Vatican GDP is missing: kept null, median positive GDP used ONLY for ranking.
Area: approximate spherical area derived from the original boundary polygons,
radius 6371.0088 km, exterior minus holes. It is not an official statistical
land-area series and must be reviewed before production balancing.

Difficulty: log1p each metric, min-max normalize across the 196 entries, weight
population 40%, polygon area 30%, GDP 30%; ascending score, ISO alpha-3 tie break;
assign fixed counts 60/45/35/25/16/10/5. Source years are retained per country.
Preview villain placement assigns the 15 highest-ranked countries, 3 each to
WARLORD/TYRANT/DESTROYER/MASTERMIND/OVERLORD. This fixture is not an approved
placement rule. It leaves all 60 lowest-difficulty countries unclaimed.

The SQL fixture is under `supabase/tests/nations/`, never auto-seeded by the
migration. Its world starts disabled. No production world is created.

`ocean-grid.png` is an original procedural grid, generated by
`python3 tools/nations/generate_ocean.py`. It contains no third-party imagery.
