Civ4 XML Text
Description
These files control the text that is shown in the game.
Headers
These tags bracket other tags, and the entire file, and are generally used to specify more than one piece of data.
Tag Name | Description |
---|---|
Civ4GameText | This begins and ends the file. Everything must go in between these two, or it will not work.
The opening tag usually looks like this: '<Civ4GameText xmlns="http://www.firaxis.com">' |
TEXT | Encloses the entry for each text key. |
Tag Reference
Tag - the tag that's used to reference the text by the rest of the game, in the form of TXT_KEY_SOMETHING
English - the text in English
French - the text in French
German - the text in German
Italian - the text in Italian
Spanish - the text in Spanish
Gender - Male or Female, used with languages that assign each noun a gender.
Plural - 0 = singular, 1 = plural. Many text keys have 0:1 to include both singular and plural. Usually used where the plural is something different than an 's' added to the end.
Text Files
Unlike other XML files, these files can have any name and still be recognized by the game. Most epic game files are Civ4GameText_*, but a file could be named anything. For example, Assets\Text\XML\Buildings.xml would be recognized by the game without any SDK changes. This can be done with no other type of XML file.
Example
<Civ4GameText xmlns="http://www.firaxis.com"> <TEXT> <Tag>TXT_KEY_IMPROVEMENT_PASTURE</Tag> <English>Pasture</English> <French> <Text>Pâturage</Text> <Gender>Male</Gender> <Plural>0</Plural> </French> <German> <Text>Weide</Text> <Gender>Male</Gender> <Plural>0</Plural> </German> <Italian> <Text>Pascolo:Pascoli</Text> <Gender>Male</Gender> <Plural>0:1</Plural> </Italian> <Spanish> <Text>Pastizal:Pastizales</Text> <Gender>Male</Gender> <Plural>0:1</Plural> </Spanish> </TEXT> </Civ4GameText>