EU5 Locations Master Builder generates a master CSV of Europa Universalis V (EU5) locations by joining EU5 map_data sources and deriving image-based features from the map textures.
Running the builder writes the following files to the current working directory:
eu5_locations_master_raw.csv- Master location tableeu5_locations_master_river_overlap_water_v1_1.csv- Diagnostics: river ink overlap over non-land tileseu5_locations_master_qc_flags_v1_1.csv- Quality-control flags (missing templates, unexpected mappings)eu5_locations_master_run_report_v1_1.json- Run metadata (inputs seen, cache status, timings)debug_rivers_overlay_v1_1.png- Debug visualization of the river mask
- Windows 10/11
- Python 3.11+ recommended
- EU5 installed locally
Python dependencies are listed in requirements.txt.
- Clone this repository.
- Install Python dependencies.
- Run the builder.
python -m pip install -r requirements.txt
python .\src\eu5_locations_master_builder.pyBy default, the builder expects EU5 at the Steam default path:
C:\Program Files (x86)\Steam\steamapps\common\Europa Universalis V
If your EU5 install is elsewhere, set EU5_ROOT before running:
$env:EU5_ROOT = "D:\SteamLibrary\steamapps\common\Europa Universalis V"
python .\src\eu5_locations_master_builder.pyThe builder uses a persistent cache to avoid recomputing expensive intermediate results. This typically makes the second and subsequent runs much faster.
- Default cache location:
.tmp\eu5_locations_cache_v1_1\ - Override cache directory:
$env:EU5_CACHE_DIR = "C:\work\eu5_cache"
python .\src\eu5_locations_master_builder.py- Disable caching for one run:
$env:EU5_NO_CACHE = "1"
python .\src\eu5_locations_master_builder.py
Remove-Item Env:EU5_NO_CACHE -ErrorAction SilentlyContinueFor speed, the default invalidation policy hashes only small input files (up to 10 MB) and uses file size and modification time for larger files.
- Hash all inputs (stricter, slower):
$env:EU5_HASH_INPUTS = "1"
python .\src\eu5_locations_master_builder.py
Remove-Item Env:EU5_HASH_INPUTS -ErrorAction SilentlyContinue- Change the maximum hashed size (bytes):
$env:EU5_HASH_MAX_BYTES = "20971520" # 20 MB
python .\src\eu5_locations_master_builder.py
Remove-Item Env:EU5_HASH_MAX_BYTES -ErrorAction SilentlyContinueHas Coast- Derived fromports.csv(LandProvince).Has River- Derived from river ink overlap inrivers.png(land only).
If the run prints [ERROR] Missing required files, confirm EU5_ROOT points to the EU5 installation folder.
If you suspect the cache is out of date, delete the cache directory and run again:
Remove-Item -Recurse -Force .\.tmp\eu5_locations_cache_v1_1
python .\src\eu5_locations_master_builder.pySciPy is optional. If installed, it can be used for distance-transform based coastline guarding.
See LICENSE.