Civ4 XML Text: Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
(changed "Assets\Text\XML\Buildings.xml" to "Assets\XML\Text\Buildings.xml")
 
(2 intermediate revisions by one other user not shown)
Line 2: Line 2:


These files control the text that is shown in the game.
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.
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | 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 Reference==
Line 17: Line 37:
'''Spanish''' - the text in Spanish
'''Spanish''' - the text in Spanish


'''Gender''' - Male or Female, used with languages that assign each noun a gender.
'''Gender''' (optional) - Male or Female, used with languages that assign each noun a gender.
 
'''Plural''' (optional) - 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.


'''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\XML\Text\Buildings.xml would be recognized by the game without any SDK changes.  This can be done with no other type of XML file.


==Example==
==Example==
Line 51: Line 75:
     </TEXT>
     </TEXT>
   </Civ4GameText>
   </Civ4GameText>
== 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.

Latest revision as of 13:28, 18 May 2010

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 (optional) - Male or Female, used with languages that assign each noun a gender.

Plural (optional) - 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\XML\Text\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>