Skip to main content

Module provinces

Module provinces 

Source
Expand description

Per-faction managers of provinces (PROVINCE/FACTION_PROVINCE_MANAGER_ARRAY) and sea regions (WORLD/SEA_REGION_MANAGER).

Verified on Attila’s main campaign: 94 of 94 province managers match in their regions and 93 in their main region, and 25 of 25 sea regions match. The game walks region_to_province_junctions in key order (junction_rows), which gives the order of the regions of each manager; the order of the factions’ managers within a province isn’t reproduced yet, and sea regions use map order.

Structs§

ProvinceManager
A faction’s holdings in a province.
SeaRegion
A sea region and the factions with ports on it.

Functions§

junction_rows
Returns the rows of region_to_province_junctions in the order the game walks them: the key order of the province key followed by the region key (see crate::startpos::tables::Table::rows_in_key_order_by).
province_managers
Returns the province managers: one per faction (or the rebels) owning regions in a province.
sea_regions
Returns the sea regions with ports: every sea a port zone cell lies in, with the port regions of each faction.