mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 20:55:44 +00:00
* Add missing Unity .meta files, HoneyBadger import artifacts, and fix_import.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Remove HoneyBadger import artifacts and gitignore FBX auto-generated files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Province Map Generator
Tool to regenerate Eagle strategic map images with more equalized province sizes.
Setup
cd tools/map_generator
python3 -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
pip install -r requirements.txt
Usage
Analyze Current Map
Show province sizes and identify small provinces:
python generate_map.py --analyze
Generate Equalized Map
Generate new map with more equal province sizes:
python generate_map.py --generate
This creates in output/:
rawGray.gz.bytes- New province ID mapmasks/1.png-43.png- Individual province maskscentroids.json- Province centroids for label positioning
Visualize Comparison
Generate side-by-side comparison of original vs equalized:
python generate_map.py --visualize
Options
--target-ratio 0.5- Target minimum province size as ratio of average (default: 0.5)--output-dir ./output- Output directory for generated files
Algorithm
- Load current province map from
rawGray.gz.bytes - Calculate centroid and area for each province
- Run weighted Voronoi relaxation:
- Small provinces get higher weights to claim more area
- Iteratively adjust until minimum province is >= 50% of average
- Generate new province boundaries
- Output new map files
Province Size Targets
The algorithm aims to make all provinces at least 50% of the average size. Problem provinces (currently too small):
- Shumal (id=1)
- Kojaria (id=39)
- Usvol (id=33)
- Tumala (id=35)
- Chia (id=43)
Topology Changes
The equalization algorithm may create new province adjacencies that didn't exist in the original map. When this happens, the following updates are required:
- province_map.tsv - Update
neighborsandneighborNamescolumns for affected provinces - ShardokGame HexMaps - Add new attacker starting positions for each new adjacency
Known New Adjacencies (after equalization)
| Province | New Neighbors |
|---|---|
| Usvol (33) | Laufarvia (3), Grytrand (42) |
| Grytrand (42) | Usvol (33) |
| Laufarvia (3) | Usvol (33) |
Run python generate_map.py --check-topology to detect all adjacency changes.