Adam Djellouli c3faa134b4 Fix map pipeline gating for clean runs (#843) hace 1 mes
..
README.md 4b2cae649b Implement coastline-aware path rendering with systematic validation and historical map styling (#805) hace 2 meses
campaign_state.json c3faa134b4 Fix map pipeline gating for clean runs (#843) hace 1 mes
hannibal_path.json 8d27d9c68f Hannibal path (#827) hace 2 meses
valid_provinces.json 9ede197744 Improve campaign UI and data management with province ID synchronization (#666) hace 2 meses

README.md

Campaign Map Assets

This directory contains campaign map resources for the Mediterranean strategic map.

Files

  • campaign_base_color.png - Base terrain texture for the Mediterranean map
  • campaign_water.png - Water texture
  • coastlines_uv.json - Coastline geometry in UV space
  • rivers_uv.json - River geometry in UV space
  • land_mesh.bin - Binary land mesh data
  • hannibal_path.json - Hannibal's campaign route visualization with coastline-aware paths
    • Contains 8 progressive route lines, one per campaign mission
    • Routes follow North African coast west to Gibraltar before crossing to Spain
    • Coastal segments along Mediterranean use smooth curves
    • Open-sea crossings only at Gibraltar and Sicily→Carthage
    • Rendered with three-pass system for historical map appearance (10px border, 6.5px gold highlight, 3.5px red core)
    • Generated by tools/map_pipeline/hannibal_path.py
  • provinces.json - Generated province boundaries and metadata (generated by tools/map_pipeline/provinces.py)
  • valid_provinces.json - Province ID validation and mission mapping

Province ID Synchronization

The valid_provinces.json file serves as the single source of truth for valid province IDs and their mapping to missions.

Province IDs (from provinces.py)

The following province IDs are generated by tools/map_pipeline/provinces.py:

  • iberia_carthaginian - Carthaginian Iberia
  • iberia_interior - Iberian Interior
  • transalpine_gaul - Transalpine Gaul (Rhône region)
  • cisalpine_gaul - Cisalpine Gaul (Northern Italy)
  • etruria - Etruria (Central Italy)
  • roman_core - Roman Core (Rome and surroundings)
  • southern_italy - Southern Italy (includes Apulia/Cannae region)
  • sicily_roman - Roman-controlled Sicily
  • sicily_carthaginian - Carthaginian-controlled Sicily
  • sardinia - Sardinia
  • corsica - Corsica
  • carthage_core - Carthage and surrounding territory
  • numidia - Numidia (Western North Africa)
  • libya - Libya (Eastern North Africa)
  • illyria - Illyria (Balkans)

Mission to Province Mapping

Missions reference provinces via world_region_id field in campaign JSON files:

  • crossing_the_rhonetransalpine_gaul
  • battle_of_ticinocisalpine_gaul
  • battle_of_trebiacisalpine_gaul
  • battle_of_trasimeneetruria
  • battle_of_cannaesouthern_italy
  • campania_campaignsouthern_italy
  • crossing_the_alpscisalpine_gaul
  • battle_of_zamacarthage_core

Important Notes

  1. Always use province IDs from valid_provinces.json when adding new missions or features
  2. The province IDs must match those generated by provinces.py
  3. UI code (e.g., MediterraneanMapPanel.qml) should reference these validated IDs
  4. If you modify provinces.py, update valid_provinces.json accordingly
  5. Historical region names (like "Apulia" or "Campania") may not have direct province IDs - use the closest matching province (e.g., southern_italy)

Regenerating Province Data

To regenerate the provinces.json file:

cd tools/map_pipeline
python3 provinces.py

This will update the province boundaries, triangulation, and borders based on the definitions in provinces.py.