EMPIRE2.0NN Partially documented

The Caesar province map format, EMPIRE2.0NN

Each of Caesar's fifty provinces is one EMPIRE2 file: the map the province view draws, the coast, the rivers, the towns and the borders where barbarians arrive. A saved game embeds a copy of the current one. The file is trivially simple. What the bytes in it mean is the part still being worked out.

Used by Caesar

The whole file, 1,602 bytes

All fifty files round-trip through load and save byte for byte.

OffsetSizeTypeFieldDescription
02u8[2]prefix14 14 in all fifty files and in every save's embedded copy. The engine never reads it as a field: it is loaded and saved along with the map and is reached only by reads that run off the grid's top-left corner. It is not a width or height; the engine's 40s are constants.
21600u8[40][40]cellsThe map, row by row: the cell at row r, column c is byte 2 + 40r + c. One tile id per cell.

Which province is which

The file for province NN is named EMPIRE2.0NN: the engine writes the province number as three decimal digits into the name and loads that. So EMPIRE2.000 is the first province and EMPIRE2.049 the last. A promotion that sends the governor to a new province loads the next one into the game state.

Tile values the engine treats specially

Most names are STRONG INFERENCE, matched by what the engine's own commands write and read rather than by a label in the file. The ranges for open ground and the cost shift are definitive.

0x00 to 0x1C
Static terrain: water, mountains and the like. Never simulated; in real saves they form fixed blobs that are byte-identical from save to save.
0x1D to 0x35
Open ground. This is the only terrain the province's build commands will lay on; anything below 0x1D is refused. Within it, the cost of a province build is shifted left by the ground: twice (×4) on 0x25 to 0x2C, once (×2) on 0x2D to 0x35. That is the manual's "from 30 Denarii to 120 Denarii, depending on the terrain".
0x36 to 0x41
Provincial road, in twelve shapes (straight, corners, junctions). The same twelve as the city's road pieces.
0x41 in the file
The Imperial Highway's entry. When a province starts, the first 0x41 found scanning row by row becomes 0x78 and its position is remembered. This is the "unexplained" byte change between a raw scenario and the copy in a save.
0x42 to 0x49, 0x62 to 0x6C
Great Wall pieces, with 0x44 and 0x45 the gates where a road crosses a wall, and 0x62 to 0x67 the Great Towers. Names are a strong inference from what the wall command writes.
0x4A
The capital city. The player's first Cohort is placed on the first cell holding 0x4A.
0x4C, 0x61, 0x79, 0x7A
Towns, in order of size: 0x61 smallest, 0x4C largest.
0x4D
A fort.
0x51 to 0x58, 0x59 to 0x60
Where barbarian armies enter: from the sea (0x51 plus a race index) and by land (0x59 plus the same). 0x59 to 0x60 are also the land border markers.
0x6D to 0x78
Imperial Highway, in the same twelve shapes as the road. 0x7B and 0x7C are a road crossing a highway.
bit 7 (0x80)
Not terrain: the engine sets it on the cells of a trace it is following. In the saves it is set on the capital's cell (0x4A becomes 0xCA).

The fifty provinces, in file order

The names are the executable's own, in a table of 16-character fields; "Caeariensis" is spelled so there. Each province is attacked by one of sixteen barbarian races, which the executable also tabulates.

000
Sicilia
001
Campania
002
Latium
003
Cisalpine Gaul
004
Corsica
005
Sardinia
006
Alpes Maritimae
007
Narbonensis
008
Hispania Inf.
009
Baetica
010
Lusitania Inf.
011
Lusitania Sup.
012
Tarraconensis
013
Aquitania Inf.
014
Hispania Sup.
015
Aquitania Sup.
016
Lugdunensis
017
Belgica
018
Gallia Sup.
019
Gallia Inf.
020
W. Britannia
021
E. Britannia
022
Britannia Sup.
023
Caledonia
024
Germania Inf.
025
Germania Sup.
026
Pannonia
027
Dacia
028
Illyricum
029
Dalmatia
030
Macedonia
031
Achaea
032
Creta
033
Thracia
034
Asia
035
Pamphylia
036
Cappadocia
037
Assyria
038
Syria
039
Mesopotamia
040
Judea
041
Arabia
042
Aegyptus
043
Cyrenaica
044
Africa
045
Numidia
046
Mauretania
047
Caeariensis
048
Tingitania
049
Moesia

Sources