evo-civ6-map-parser
Parses .Civ6Map SQLite database files to extract map dimensions, terrain, features, resources, and river edge data. Provides hex coordinate utilities for odd-r pointy-top hex grid.
SKILL.mdtasks-evolved/civ6-adjacency-optimizer/environment/skills/evo-civ6-map-parser/SKILL.md
GitHubevo-civ6-map-parser
Parses Civilization VI .Civ6Map files (SQLite databases) and provides hex grid utilities.
Usage
import sys
sys.path.insert(0, '/app/environment/skills/evo-civ6-map-parser/scripts')
from utils import parse_civ6map, get_hex_neighbors, hex_distance, is_land_tile, is_mountain, is_tile_river_adjacent, get_land_tiles
map_data = parse_civ6map('/path/to/map.Civ6Map')
neighbors = get_hex_neighbors(5, 3)
dist = hex_distance(0, 0, 3, 3)
Key Functions
parse_civ6map(db_path)- Returns dict with width, height, tiles, riversoffset_to_cube(col, row)- Odd-R offset to cube coordscube_to_offset(q, r, s)- Cube to odd-R offset coordsget_hex_neighbors(x, y)- Get 6 neighboring tile coordinateshex_distance(x1, y1, x2, y2)- Hex distance between tilesis_tile_river_adjacent(map_data, x, y)- Check if tile touches a riveris_land_tile(map_data, x, y)- Check if tile is landis_mountain(map_data, x, y)- Check if tile is a mountainget_land_tiles(map_data)- Get all land tile coordinates