User Tools

Site Tools


file:empire

Empire file

There are two Empire files in Caesar 3:

  • c3.emp - for the original scenarios
  • c32.emp - for custom scenarios

Both files have the same structure. Both are exactly 513280 bytes long and contains 40 empire maps. The file consists of two parts:

  • An index of 1280 bytes, 32 bytes per empire map
  • Per empire map: a list of 'objects' that appear on the map. Per empire map, this list is 12800 bytes.

Index

Total length: 1280 bytes, 40 entries of 32 bytes.

Entry structure:

Offset Length Name Description
0 2 initialScrollX Initial scroll position (in pixels) from the left
2 2 initialScrollY Initial scroll position (in pixels) from the top
4 2 inUse Whether this empire map is valid or not
6 26 (unused) Padding, unused

Objects

Total length: 512000 bytes, 40 object lists of 12800 bytes.

Object list: 12800 bytes, 200 objects of 64 bytes

Object structure:

Offset Length Name Description
0 1 type Object type
1 1 inUse Whether this entry is valid / in use
2 2 animationIndex Sequence ID of the animation (for city flags, border flags), calculated in-game
4 2 x X-coordinate in pixels, from left
6 2 y Y-coordinate in pixels, from top
8 2 width Width of the object, used for detecting clicks
10 2 height Height of the object, used for detecting clicks
12 2 graphicId Graphic ID of the object
14 2 graphicIdExpanded Graphic ID of the object, after the “empire expansion” event
16 1 (unused) Unused
17 1 distantBattleTravelSequence Sequence number of how far an army has traveled to a distant battle, calculated in-game
18 2 (unused) Unused
20 2 xExpanded X-coordinate, after the “empire expansion” event
22 2 yExpanded Y-coordinate, after the “empire expansion” event
24 1 cityType For cities: city type
25 1 cityNameId For cities: ID of the city name
26 1 tradeRouteId For cities and trade route dots: trade route ID
27 1 tradeRouteOpen For cities: flag: 0 = trade is closed, 1 = trade is open
28 2 tradeRouteCostToOpen For cities: cost to open a trade route
30 10 * 1 citySells For cities: 10 resource ID's of items that a city sells; for our city: resources that can be produced
40 1 ownerCityIndex For trade route dots: which city 'owns' the dots, index into the object list
41 1 (unused) Unused
42 8 * 1 cityBuys For cities: 8 resource ID's of items that a city buys
50 1 invasionPathId For battle icons: to which direction it belongs
51 1 invasionYears For battle icons: year: 1 = 1 year before invasion, 2 = 2 years before invasion, etc
52 2 trade40 For cities: flags which resources are sold/bought at 40/year, 1 bit per resource
54 2 trade25 For cities: flags which resources are sold/bought at 25/year, 1 bit per resource
56 2 trade15 For cities: flags which resources are sold/bought at 15/year, 1 bit per resource
58 6 (unused) Unused

Constants

Object type

ID Description
0 Ornament - background images, border flags
1 City
3 Battle icon (cross)
4 Land trade route, dots and cart
5 Sea trade route, dots and ship
6 Roman army - distant battle
7 Enemy army - distant battle

City type

ID Description
0 Distant Roman
1 Our city
2 Trade city
3 Future trade
4 Distant foreign
5 Vulnerable Roman
6 Future Roman
file/empire.txt · Last modified: 2014/04/11 19:00 by pecunia