In this section we cover some of the values written in age2_x1.xml, that determine the civilization interfaces, descriptions and AI names.
There are three sets of interfaces for the civilizations: sizes 800 x 600, 1024 x 768 and 1280 x 1024 pixels. The game chooses one of them depending on the screen size and, if needed, enlarges it to fit the screen.
The ids of these files are specified in ``age2_x1.xml'', the file that determines the audio file and the scout unit of the civilization. In the first lines there are two values relevant here: uiBaseId, currently value 51100, and uiStride, currently value 60.
The value of uiBaseId determines where the interface files start appearing. To find the 800 x 600 interface file of a given civilization, we add the civilization id to the value of uiBaseId. This way 51101 is the interface for Britons, 51102 is the one for Franks and 51145 is the Georgian one.
The value of uiStride determines how many civilizations we can have and also where the next set of interfaces begins. We currently have space for 60 civilizations and that means that the set of 1024 x 768 interfaces begins at value 51160. Similarly, the set of 1280 x 1024 interfaces begins at value 51220.
4400+(id-1) x 20+aiNameOffset (if id ≥ 13).
Civilization interfaces
This aspect became relevant when the number of civilizations surpassed the amount predicted by the Wololo Kingdoms team.There are three sets of interfaces for the civilizations: sizes 800 x 600, 1024 x 768 and 1280 x 1024 pixels. The game chooses one of them depending on the screen size and, if needed, enlarges it to fit the screen.
The ids of these files are specified in ``age2_x1.xml'', the file that determines the audio file and the scout unit of the civilization. In the first lines there are two values relevant here: uiBaseId, currently value 51100, and uiStride, currently value 60.
The value of uiBaseId determines where the interface files start appearing. To find the 800 x 600 interface file of a given civilization, we add the civilization id to the value of uiBaseId. This way 51101 is the interface for Britons, 51102 is the one for Franks and 51145 is the Georgian one.
The value of uiStride determines how many civilizations we can have and also where the next set of interfaces begins. We currently have space for 60 civilizations and that means that the set of 1024 x 768 interfaces begins at value 51160. Similarly, the set of 1280 x 1024 interfaces begins at value 51220.
Civilization descriptions
Similar to the above interfaces, the fields langId and descId store the position in the language file of the civilization's name and technology tree description, respectively. Starting from those values and adding the civilization id, we find the corresponding text.Artificial intelligence names
Finally we have the field aiNameOffset, to store the names of computer players for each civilization. This one requires more explanation:- Every civilization has 20 fields reserved for names.
- The first field of those 20 is actually a number that determines how many of the remaining 19 fields are actually used.
- The original Age of Kings civilizations (the first 13) have their names starting at id 4400. This means 4400 is the first id of Britons, 4420 is the first one for French and so on until Celts.
- Starting with the Age of Conquerors civilizations, the ids are shifted by the value of aiNameOffset. This means that the Spanish first id, that should be 4400+20 x 13=4660 is actually 4660+7480=12140, with 7480 being the current value of aiNameOffset.
4400+(id-1) x 20+aiNameOffset (if id ≥ 13).