BrentRitchie
Chieftain
- Joined
- Oct 30, 2005
- Messages
- 25
Ok, in the first tutorial we went through and changed alot of options in the CIV4CivilizationInfos.xml file. This will make the civilization available but we didn't really add much information. Remember the Description, short description, adjective, and civilopedia tags? Well all we did was tell the game where to find the correct information. Now we will actually create this information.
So the folder that holds all of the text in the game is in the Assets/XML/Text folder. The file that holds all of the short identifying text (Like unit names and such) is CIV4GameTextInfos_Objects.xml. We need to create 3 new entries one for each of the descriptions and one for the adjective.
Now before we actually start modding you must realize that Civ 4 was released world wide. So these files in the text folder actually define *ALL* of the languages that are supported. Something really interesting though is the fact that this folder lacks a schema. This means we could add Language support for any language we want including the cool ones like Klingon
.
Ok, so we have the file open. Lets look at the first entry. BTW I have inlined the comments for this code again.
<!-- Create the new text element -->
<!-- you need to define a new text element for *every* tag made -->
<TEXT>
<!-- This is where we define those refrences we made before -->
<!-- One of our refrences were TXT_KEY_CIV_CANADA_TEXT -->
<Tag>TXT_KEY_IMPROVEMENT_LAND_WORKED</Tag>
<!-- This tag looks a little different then the ones below thats because the english language is asexual in nature -->
<!-- Being asexual we don't have to have different sentence structures to say the same thing like french -->
<!-- If you have your game settings to english this is the text that will show up -->
<!-- Nothing fancy just plain english -->
<English>Land Worked</English>
<!-- This tag tells the game that this is the french language description -->
<!-- you could just as easily write <Klingon> and the game would not care because of the lack of a schema -->
<French>
<!-- This is the text that will appear if the french language option is selected -->
<Text>En travaux</Text>
<!-- This tag is a little wierd, because in french and other languages words have genders -->
<!-- In this case "En Traveux" is male, this effects the words that appear around this text -->
<Gender>Male</Gender>
<!-- This simply states if the word is in plural form -->
<Plural>0</Plural>
<!-- End french language definition -->
</French>
<!-- Start German language definition -->
<!-- this is as far as I go I don't want to repeat myself three more times -->
<!-- you should get the basic idea for now -->
<German>
<Text>Bearbeitetes Land</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</German>
<Italian>
<Text>Terreno bonificato:Terreni bonificati</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</Italian>
<Spanish>
<Text>Tierra trabajada:Tierras trabajadas</Text>
<Gender>Female</Gender>
<Plural>0:1</Plural>
</Spanish>
</TEXT>
OK, so now we know the basic structure, lets start adding our definitions.
I like to add my definitions inside the files in alphabetical order, but you can add this stuff anywhere you want I suggest for this tutorial you just add it at the end of the file after the last </TEXT> tag but before the </Civ4GameText>.
So We'll add the descriptions in order, first is the TXT_KEY_CIV_AMERICA_DESC.
Add this:
Remember this is the Long or standard description, you see this at the leader select screen.
<TEXT>
<Tag>TXT_KEY_CIV_CANADA_DESC</Tag>
<English>Canadian Empire</English>
</TEXT>
This is fairly trivial and what it means is that when the game is set to english anywhere you refrence TXT_KEY_CIV_CANADA_DESC the phrase "Canadian Empire" will replace it. If you use a different language then there will be no description. I don't know french or anyother language that well so if somebody could help me translate these things that would be appreciated.
The next two entries are as follows:
<TEXT>
<Tag>TXT_KEY_CIV_CANADA_SHORT_DESC</Tag>
<English>Canada</English>
</TEXT>
<TEXT>
<Tag>TXT_KEY_CIV_CANADA_ADJECTIVE</Tag>
<English>Canadian</English>
</TEXT>
Remeber there is no schema so I can put in or leave out as many languages as I want.
Next is kind of cool. Remember the tag <Civilopedia>? This tag allows our civ to have a civilopedia entry of it's own. I think thats a nice touch. Now we are done with the CIV4GameTextInfos_Objects.xml file, We now have to open the CIV4GameText_Civilopedia_CivLeaders.xml. This holds all of the text for the civilopedia that relates to Civs and their leaders. If you glance through it you will see that this is just the text that shows up in the civilopedia and it has the same structure as the text object file. So I don't think that this part really needs an explanation. at the end of the file after the last </TEXT> tag and before the </Civ4GameText> tag add the following:
<TEXT>
<Tag>TXT_KEY_CIV_CANADA_PEDIA</Tag>
<English>*****Testing Canadian Mod</English>
</TEXT>
<TEXT>
<Tag>TXT_KEY_LEADER_JOHN_MACDONALD_PEDIA</Tag>
<English>John A. Macdonald [\H1][NEWLINE][BOLD]Prime Minister of Canada [\BOLD][NEWLINE][BOLD]Lived: [\BOLD] c. ???? - c. ???? BC[NEWLINE][PARAGRAPH:2][BOLD]Background:[\BOLD][NEWLINE]*****John A. Macdonald Played a major role in Canada's confederation. Through many meetings he finally joined upper and lower Canada to create the two provinces Quebec and Ontario.</English>
So the folder that holds all of the text in the game is in the Assets/XML/Text folder. The file that holds all of the short identifying text (Like unit names and such) is CIV4GameTextInfos_Objects.xml. We need to create 3 new entries one for each of the descriptions and one for the adjective.
Now before we actually start modding you must realize that Civ 4 was released world wide. So these files in the text folder actually define *ALL* of the languages that are supported. Something really interesting though is the fact that this folder lacks a schema. This means we could add Language support for any language we want including the cool ones like Klingon

Ok, so we have the file open. Lets look at the first entry. BTW I have inlined the comments for this code again.
<!-- Create the new text element -->
<!-- you need to define a new text element for *every* tag made -->
<TEXT>
<!-- This is where we define those refrences we made before -->
<!-- One of our refrences were TXT_KEY_CIV_CANADA_TEXT -->
<Tag>TXT_KEY_IMPROVEMENT_LAND_WORKED</Tag>
<!-- This tag looks a little different then the ones below thats because the english language is asexual in nature -->
<!-- Being asexual we don't have to have different sentence structures to say the same thing like french -->
<!-- If you have your game settings to english this is the text that will show up -->
<!-- Nothing fancy just plain english -->
<English>Land Worked</English>
<!-- This tag tells the game that this is the french language description -->
<!-- you could just as easily write <Klingon> and the game would not care because of the lack of a schema -->
<French>
<!-- This is the text that will appear if the french language option is selected -->
<Text>En travaux</Text>
<!-- This tag is a little wierd, because in french and other languages words have genders -->
<!-- In this case "En Traveux" is male, this effects the words that appear around this text -->
<Gender>Male</Gender>
<!-- This simply states if the word is in plural form -->
<Plural>0</Plural>
<!-- End french language definition -->
</French>
<!-- Start German language definition -->
<!-- this is as far as I go I don't want to repeat myself three more times -->
<!-- you should get the basic idea for now -->
<German>
<Text>Bearbeitetes Land</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</German>
<Italian>
<Text>Terreno bonificato:Terreni bonificati</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</Italian>
<Spanish>
<Text>Tierra trabajada:Tierras trabajadas</Text>
<Gender>Female</Gender>
<Plural>0:1</Plural>
</Spanish>
</TEXT>
OK, so now we know the basic structure, lets start adding our definitions.
I like to add my definitions inside the files in alphabetical order, but you can add this stuff anywhere you want I suggest for this tutorial you just add it at the end of the file after the last </TEXT> tag but before the </Civ4GameText>.
So We'll add the descriptions in order, first is the TXT_KEY_CIV_AMERICA_DESC.
Add this:
Remember this is the Long or standard description, you see this at the leader select screen.
<TEXT>
<Tag>TXT_KEY_CIV_CANADA_DESC</Tag>
<English>Canadian Empire</English>
</TEXT>
This is fairly trivial and what it means is that when the game is set to english anywhere you refrence TXT_KEY_CIV_CANADA_DESC the phrase "Canadian Empire" will replace it. If you use a different language then there will be no description. I don't know french or anyother language that well so if somebody could help me translate these things that would be appreciated.
The next two entries are as follows:
<TEXT>
<Tag>TXT_KEY_CIV_CANADA_SHORT_DESC</Tag>
<English>Canada</English>
</TEXT>
<TEXT>
<Tag>TXT_KEY_CIV_CANADA_ADJECTIVE</Tag>
<English>Canadian</English>
</TEXT>
Remeber there is no schema so I can put in or leave out as many languages as I want.
Next is kind of cool. Remember the tag <Civilopedia>? This tag allows our civ to have a civilopedia entry of it's own. I think thats a nice touch. Now we are done with the CIV4GameTextInfos_Objects.xml file, We now have to open the CIV4GameText_Civilopedia_CivLeaders.xml. This holds all of the text for the civilopedia that relates to Civs and their leaders. If you glance through it you will see that this is just the text that shows up in the civilopedia and it has the same structure as the text object file. So I don't think that this part really needs an explanation. at the end of the file after the last </TEXT> tag and before the </Civ4GameText> tag add the following:
<TEXT>
<Tag>TXT_KEY_CIV_CANADA_PEDIA</Tag>
<English>*****Testing Canadian Mod</English>
</TEXT>
<TEXT>
<Tag>TXT_KEY_LEADER_JOHN_MACDONALD_PEDIA</Tag>
<English>