← ClaudeAtlas

flag-assetslisted

Add or troubleshoot country flag and org image assets (Assets/Textures/Flags/Countries and Orgs) sourced from Wikimedia Commons, including the download_flags.py/check_flags.py/svg_to_png.py scripts and CountryVisualConfig/OrgVisualConfig wiring. Load when adding a new country flag or org image.
KonH/GlobalStrategy · ★ 2 · AI & Automation · score 68
Install: claude install-skill KonH/GlobalStrategy
# Flag and Org Image Assets Flag PNGs live in `Assets/Textures/Flags/Countries/<countryId>.png` and org images in `Assets/Textures/Flags/Orgs/<orgId>.png`. All assets are sourced from Wikimedia Commons and downloaded as server-side PNG renders — no local SVG rendering required for download. ## Scripts All scripts live in `scripts/utils/` and must be run from the **project root** so relative paths resolve correctly. | Script | Purpose | |---|---| | `download_flags.py` | Download all mapped flags/org images; skips existing files | | `check_flags.py` | Diagnose a Wikimedia filename — prints resolved URL and MIME type | | `svg_to_png.py` | Convert any SVG (file path or URL) to PNG locally | ### Dependencies ```powershell .venv\Scripts\pip.exe install requests svglib reportlab ``` `svg_to_png.py` also supports `cairosvg` (better quality) if the Cairo C library is available, but falls back to `svglib+reportlab` automatically. ## Adding a new country flag 1. Find the era-accurate flag on Wikimedia Commons (`commons.wikimedia.org/wiki/File:…`). Copy the full page title including `File:`. 2. Add an entry to `COUNTRY_FLAGS` in `scripts/utils/download_flags.py`: ```python "NewCountryId": "File:Flag_of_New_Country_(1850).svg", ``` If the filename is uncertain, also add a fallback to `COUNTRY_FLAGS_FALLBACK`: ```python "NewCountryId": "File:Alternative_Flag_Name.svg", ``` 3. If the filename is uncertain, verify it resolves before downloading: ```powershe