
|
This file contains the coordinates of the boundboxes for each province.
A boundbox is the box that can be drawn connecting the "extremes" of a province.
In the example above, you can see the boundbox of the Adirondak province. As you can see, the province is entirely contained in the province, only touching the "extremes" of the province on each side. Another thing to notice is that other provinces can overlap the boundbox of a province. It is even possible that the boundbox of a small province is completely contained in the boundbox of a large province surrounding/neighbouring it. |
File Info |
Location » (eu2 root)\map\boundbox.tbl
Size » 25.840 bytes (26Kb) |
File format |
The file contains 1615 of coordinate pairs: each coordinate pair signifies the upper-left and the lower-right corner of each boundbox.
Each value is expressed as a 4-byte unsigned integer. This means that each block takes 16 bytes.
Thus, each block starts at a 16 byte offset. This means you have easy access to the boundbox of a province: multiply the province id by 16, read 16 bytes and you have everything you need. Each block has the following format:
There are a few anomalies...
It turns out that the TI is also a province. But the zeroth block in the boundbox file is a strange block: it's first coordinate is actually the map size (18944,7296), and it's second coordinate is (0,0). If you follow the same logic of the rest of the blocks, this yields a "negative" boundbox.
The same applies to the Dummy province (id=1614).
|
Usability |
I'm not sure how this file is used by the EU2 engine. If you delete (or rename) the file, the game still boots without a problem. However, when starting a scenario or loading a game, you get an all white screen since everything seems to be TI. The funny thing is that the game continues, since you DO see the settler animations (for example) and it is still possible to select provinces. |