Charcoal
Chieftain
So, you want to add a Civilisation to the hugely popular game Civilization IV?
For beginners, this can be a fairly large undertaking.
Fortunately Im here to both guide and provide some aids.
Part 1: The tools
Before you start anything, you need to make sure you have the right tools.
Were going to be editing XML files.
This can be done in windows notepad, but I find that notepad++ ( http://notepad-plus.sourceforge.net/ ) is better, as it provides find and replace tools, as well as a few tools for working with XML files.
There is also going to be some Image editing and converting.
For any kind of image editing, I use Paint Shop Pro (Now at version 9).
If youre looking for a free alternative, The GIMP ( http://www.gimp.org/ )is perfectly useable (so Im told).
All images/textures in the game are .dds files. This stands for Direct Draw Surface, and is a texture format for DirectX..
There are plugins for Photoshop, Paint Shop Pro and The GIMP that will output .dds files, but they are very iffy. Luckily there is DXTbmp (http://www.mnwright.btinternet.co.uk/programs/dxtbmp.htm ), a stand alone program that will take in most image files and save them as any flavour of .dds.
Part 2: Planning
Now you have the tools, you need to figure out what youre going to do with them.
So, go off and get yourself a coffee/tea/double malt scotch on the rocks
Youre back? Then we can begin.
First off, obviously, youre going to need to know what Civilisation youre going to make. For this tutorial Im going to do Australia.
After that is decided, you have to think about a few other things:
City Names: Fairly obvious here. You could only have one city name, but after that itll start pulling random names for your new towns.
A good idea would be to have 15+
Starting Techs: In the game all the original Civs have 2 starting techs from the first 6 available (Mining, Mysticism, Fishing, The Wheel, Agriculture and Hunting).
The Starting Techs can be any techs that are available, and you can have more then two. But unless you want to unbalance the game, stick with just having two from the starting six
Unique Units: All the original Civs have one unique unit. These units are slightly better versions of other units in the game, and actually replace them for that Civ.
Each Civ can have more then one unique unit, but this can unbalance the game if youre not careful.
Leaders: Each leader has their own Traits and favoured civic. As with the Starting Techs and The Unique units, you can have more then what the Civs in the original game had, but again, beware of unbalancing the game (unless thats what youre planning on doing)
Part 3: Setup
Civ4 has a very strict directory and file structure for mods.
You are going to need to set up a structure like this, in the \\Firaxis Games\Sid Meier's Civilization 4\Mods folder
YourCiv\Assets\Art\Interface\Buttons\Civilizations \
YourCiv\Assets\Art\Interface\Buttons\Units\
YourCiv\Assets\Art\Interface\TeamColor\
YourCiv\Assets\Art\Interface\Leaderheads\
YourCiv\Assets \XML\Art
YourCiv\Assets \XML\Civilizations
YourCiv\Assets \XML\GameInfo
YourCiv\Assets \XML\Text
YourCiv\Assets \XML\Units
Or just download this .zip ( http://vic.australis.com.au/charcoal/newciv.zip ) and unzip it to the Mods folder.
Now youre going to need to copy some of the XML files from the original game into your mod directory, as well need to edit them later.
The files come from \\Firaxis Games Civilization 4 and go into \\Firaxis Games Civilization 4\Mods and the same structure.
The files you need are:
Assets\XML\Art\CIV4ArtDefines_Civilization.xml
Assets\XML\Art\CIV4ArtDefines_Leaderhead.xml
Assets\XML\Civilizations\CIV4LeaderHeadInfos.xml
Assets\XML\Civilizations\CIV4CivilizationInfos.xml
Assets\XML\GameInfo\CIV4DiplomacyInfos.xml
Assets\XML\Interface\CIV4ColorVals.xml
Assets\XML\Interface\CIV4PlayerColorInfos.xml
Assets\XML\Units\CIV4UnitInfos.xml
Part 4: Making the Pictures - Graphics (Civ Flag and Leader Head)
First off well create your civilizations flag.
The flag is displayed at the bottom right, near the minimap and near each of your units.
The texture we have to create is 128x128 in size, but in game the flag is scaled down about %25 horizontally to fit on the flag model.
The easiest way I can think of making the flag is creating a 96x128 image and then stretching the horizontal %25 to 128.
I got my source image from ( http://flagspot.net/flags/au.html ), rotated it right 90 degrees, and resized it so the height was 128. Then I added some boarders to the side to make it 96 pixels in width. Finally I resized it to 128x128.
Here is the result: http://vic.australis.com.au/charcoal/ausflag.jpg
Now, save your image as a .bmp somewhere, I usually put it where the end .dds file will be put. This would be YourCiv\Assets\Art\Interface\TeamColor\
Open up DXTbmp and load the .bmp
You now should be looking at something like this: http://vic.australis.com.au/charcoal/dxtbmp.jpg
Over to the right hand side of the window it that Alpha Channel box.
The Alpha Channel is a map that tells the game what pixels of the texture are transparent, and which arent. In our case, all white pixels are transparent, and will show the default colour of the civilization.
So, we want to change the Alpha channel to all black.
Double click on the white part and it will load the Alpha channel in your default image editor. Bucket fill it all black, save it and click on the 3rd icon (white arrow up) to reload the edited Alpha channel.
Now go to File->Save As->DDS Texture. You be shown a save box.
Navigate to YourCiv\Assets\Art\Interface\TeamColor\ and save the file, making sure you change save type to DDS DXT 3. That is very important.
With that flag, the in game the flag turned out like this: http://vic.australis.com.au/charcoal/badflag.jpg
So, I added a border to the top, giving these (better) final results:
http://vic.australis.com.au/charcoal/ausflag2.jpg and http://vic.australis.com.au/charcoal/goodflag.jpg
With that done well now do the Leaderhead image.
The original Leaderheads are actual 3D Meshes, unfortunately no one is able to make and import them yet. But we can put in static images, much in the same way we did with the flag.
The Leaderheads also have the same problem of being a square texture, but showing in a rectangle that is ~%25 smaller horizontally. The only difference is that the texture is a 512x512.
So, doing the same thing we did with the flag, make/get a base image that is 384x512 and then resize it to 512x512.
Ive decided to have John Howard as the leader for the Australians, mainly because he was the easiest to get a picture for.
Source image: http://www.defenselink.mil/photos/Jul2005/050718-D-9880W-065.jpg
I just cropped out Howard at about 0.75 ratio, then resized it to 512x512.
This time when you run it through DXTbmp, just leave the Alpha Channel white.
Then save it to YourCiv\Assets\Art\Interface\Leaderheads\
Part 4:Making the Buttons - Graphics(Buttons)
Now we have to make three buttons, one for your Civ, one for your leader and one for your Unique Unit.
For all three buttons, here is a border and Alpha channel:
Border: http://img309.imageshack.us/img309/4900/civ4bracket2rt.jpg
Alpha Channel: http://img186.imageshack.us/img186/5908/buttonalpha3zi.jpg
Save both of these somewhere.
First off, Im going to do the Civ button.
This is going to be the image for the flag, put into the above border. I imagine that you know how to do that. If you dont, it isnt needed, but itll make it look nicer.
Load the finished image into DXTbmp, then click on the first button under Alpha Channel. This is how you load the Alpha Channel bitmap you saved before.
Navigate to the Alpha Channel bitmap and load it.
Then save the .dds as to YourCiv\Assets\Art\Interface\Buttons\Civilizations\
, using the same options as before.
Next up is the Leader button, again, Im going to get this from the image I made before, and merge it with the border image.
Run it through DXTbmp, with the same Alpha Channel bitmap, and save the file in YourCiv\Assets\Art\Interface\Leaderheads\, obviously with a different name then the actual Leaderhead picture.
Lastly we need to do our Unique Unit button.
This is exactly the same as the last two, except we need to find/make a new source image.
Here is mine: http://www.heatwave-toys.com/hwt_2001/image/pics-bbi/mls-bbi-ef-sasr.jpg
Run it through DXTbmp, exactly the same as the last two times and save it in YourCiv\Assets\Art\Interface\Buttons\Units\
My 3 buttons: http://vic.australis.com.au/charcoal/buttons.jpg
Part 5: Making the Words - XML(Text XML)
First off Ill try to provide a crash course in XML.
XML is a way of storing and organising information..
Most, if not all information is enclosed by tags, these tags look like this:<tag>information</tag>
The tag part can be anything, usually its something that describe what the information is.
There are also these tags:<tag/>
<!-- Comment -->
The first one is used when (in this instance), there is no information for this tag and the second is used for comments.
I think thats about all you need to know. Just be wary of typos in tags, if your not copying them from somewhere.
Now, to the XML text file.
This file is a little different from all the other XML files, mainly because its name can be anything and its loaded in addition to the same (types) of XML files that come with the game.
Anyway, this file contains the text that will be shown in the game.
All the other XML files reference these text XML files when anything is needed to be written to the screen. This is so multi-language is made easier, and when one section of text its needed to be used multiple times.
With this its only needed to be written out once, rather then every time its needed to be used.
Everything in this file is in this structure: <TEXT>
<Tag>TXT_KEY_CIV_YOURCIV_DESC</Tag>
<English>Your Empire</English>
<French>in French</French>
<German>in German</German>
<Italian>in Italian</Italian>
<Spanish>in Spanish</Spanish>
</TEXT>
I imagine its fairly straight forward.
First it opens a TEXT tag, this is just a way of telling the game Hey, everything up to the close of this tag, is all together
Next it opens a TAG tag. The text that is contained within this tax is what will be used in the other XML files to print this line (depending on what language you are using).
After this is the tags for the individual languages that are needed.
And thats it about the file.
Here is a text XML file that contains the basics of what youll need to make a civilization: http://vic.australis.com.au/charcoal/GameTextInfos_YourCiv.zip
Download it and unzip it to in your YourCiv\Assets \XML\Text directory, then open it up for editing.
Its a slightly edited version from this tutorial: http://forums.civfanatics.com/showthread.php?t=144425
While the file is good, the tutorial isnt complete.
All the data in this file is very easy to understand, just change all the YOURCIV, YOURLEADER and YOURUNIQUEUNIT parts of each tag and then the information contained in each of the tags below it.
Part 6: Adding the Civ - XML(Civilization Infos and more text XML) (long)
Navigate your way to Assets\XML\Civilizations and open CIV4CivilizationInfos.xml.
This file contains all the information about the civilizations.
What were going to need to do is add another entry for Australia.
The easiest way to do this is copy and then edit one of the civilizations that are already there.
I copied the American Entry and have edited that.
If you look at the entries for the tags Description, ShortDescription and Adjective, you should see that they match up with entries in the GameTextInfos_yourciv.xml file.
For now, dont worry about the DefaultPlayerColor tag.
Ill cover that one later.
Have a look at the city tags now. They should look something like TXT_KEY_CITY_NAME_WASHINGTON.
Look familiar?
They are the same type of tags that Description and the rest use.
If you put 2 and 2 together, youll figure out that the city names are put into the GameTextInfos_yourciv.XML file
These are a little different then the other texts, mainly because they are names, and how different languages handle names. Here is an extract from CIV4s City name file: <TEXT>
<Tag>TXT_KEY_CITY_NAME_WASHINGTON</Tag>
<English>Washington</English>
<French>
<Text>Washington</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</French>
<German>
<Text>Washington</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</German>
<Italian>
<Text>Washington</Text>
<Gender>Female</Gender>
<Plural>0</Plural>
</Italian>
<Spanish>
<Text>Washington</Text>
<Gender>Female</Gender>
<Plural>0</Plural>
</Spanish>
</TEXT>
Fairly self explanatory, and if you want you can just include the English entry, but I dont know what will happen when people from other languages play the mod.
Anyway, copy that code, and put it at the end of the GameTextInfos_yourciv.XML file. Then edit the Tag name and the entries beneath it.
After youve done that, go back to the CIV4CivilizationInfos.xml and add in the new city name tags.
Im going to put in 20 cities and be lazy, by just putting in the English ones.
Got the list of cities from here: http://www.reference.com/browse/wiki/List_of_cities_in_Australia
After this we have the Units/Unit tags.
This is where the Unique Unit is assigned to the Civ.
There needs to be a bit of explaining here.
There are tags for UnitClassType and UnitType. Each basic unit is in its own UnitClass, wether their Workers, Macemen or Stealth bombers.
The Unique Units share the UnitClassType with the unit they replace.
So, for example: Unit Name: Worker Fast Worker
UnitClassType: UNITCLASS_WORKER UNITCLASS_WORKER
UnitType: UNIT_WORKER UNIT_FAST_WORKER
With that explained, you might want to go hunting around \New Civ\Assets\XML\Units\CIV4UnitInfos.xml to find the unit class of the unit that you want your Civs Unique Unit to replace.
In adding Australias SAS, it isnt going to be much different from Americas Navy Seal. Its actually going to be of the same UnitClassType.
So all I have to do here is change the UnitType.
Next up is the FreeUnitClasses/ FreeUnitClass tags.
This is a way for you to give extra units at the start of the game to your civilization.
There are two tags here: UnitClassType and iFreeUnits.
The first one, is as with the last one, the unit class, not the actual unit its self.
The second tag needs a little explanation.
At the start of the tag is an i this means that the information contained between the tags is an integer, or any whole number.
Whatever number you put here is the amount of that type of units youll get extra at the start.
So, with this, you could give a Civ 2 extra Warriors or 1000 ICBMS at the start. Also, you can give the Civ more then just one type of unit, just copy everything between the <FreeUnitClass> and </FreeUnitClass> tags, then modify them
All the original civs give 1 of the UNITCLASS_SETTLER, so I suggest you do the same. And leave it for balancing issues.
Now we move onto the FreeBuildingClasses/ FreeBuildingClass tags.
This is a way to give your Civ a building at the start of the game.
Again, there are two tags here: BuildingClassType and bFreeBuildingClass
BuildingClassType is the same as the UnitClassType we worked with just before. Except, its obviously for buildings.
The other tag, bFreeBuildingClass, is yet another that needs a little explanation.
The b at the start means that its a Boolean tag. For those that dont know, that means that it can be either True or False, these are represented by 1 or 0 respectively.
Youll notice that all the ones in the file are given a 1. This indicates that it is a Free Building. You could add a BuildingClassType and make the bFreeBuildingClass eual 0, but then it would behave as a normal building.
With this you could give your Civ a Hospital from the start, but I think that it only gives one building of that type.
All the original civs again have one here. They give a BUILDINGCLASS_PALACE, which obviously is the Palace. I suggest you do the same and leave it for balancing issues, again.
Next we have the FreeTechs/FreeTech tags.
This is where the techs that each Civ starts with are listed.
As with the others, theres 2 tags: TechType and bFreeTech
TechType is the tag of the tech, and bFreeTech works like the one for the free buildings.
As explained before, all original Civs have 2 techs from the first 6 that are available.
Next up there is a closed tag for DisableTechs.
So, if you wanted you could disable some techs for your Civ, but Im not going to go on about it here.
Moving on we have the InitialCivics and AnarchyCivics.
Self explanatory, its the civics that your Civ is on at the start of the game and during the anarchy after changing Religion or Civics.
All the original Civs have the basic Civics for both of these, but you could easily change them.
Now we have the Leaders/Leader tags.
Much the same as most of the others, two tags: LeaderName and bLeaderAvailability.
LeaderName is something that we will be adding later, but you can add in what it will be, should be along the lines of LEADER_LEADERNAME.
Then bLeaderAvailability, is weather the leader is available.
I think you could add leaders from other civs into this, so with a little editing, you could have Ghandi leading the French, or Washington leading the Germans.
Finally we have the CivilizationSelectionSound and CivilizationActionSound tags.
I personally am not too sure about sounds (yet), so just leave them.
You could possibly make them closed tags, if you wanted
...
For beginners, this can be a fairly large undertaking.
Fortunately Im here to both guide and provide some aids.
Part 1: The tools
Before you start anything, you need to make sure you have the right tools.
Were going to be editing XML files.
This can be done in windows notepad, but I find that notepad++ ( http://notepad-plus.sourceforge.net/ ) is better, as it provides find and replace tools, as well as a few tools for working with XML files.
There is also going to be some Image editing and converting.
For any kind of image editing, I use Paint Shop Pro (Now at version 9).
If youre looking for a free alternative, The GIMP ( http://www.gimp.org/ )is perfectly useable (so Im told).
All images/textures in the game are .dds files. This stands for Direct Draw Surface, and is a texture format for DirectX..
There are plugins for Photoshop, Paint Shop Pro and The GIMP that will output .dds files, but they are very iffy. Luckily there is DXTbmp (http://www.mnwright.btinternet.co.uk/programs/dxtbmp.htm ), a stand alone program that will take in most image files and save them as any flavour of .dds.
Part 2: Planning
Now you have the tools, you need to figure out what youre going to do with them.
So, go off and get yourself a coffee/tea/double malt scotch on the rocks
Youre back? Then we can begin.
First off, obviously, youre going to need to know what Civilisation youre going to make. For this tutorial Im going to do Australia.
After that is decided, you have to think about a few other things:
City Names: Fairly obvious here. You could only have one city name, but after that itll start pulling random names for your new towns.
A good idea would be to have 15+
Starting Techs: In the game all the original Civs have 2 starting techs from the first 6 available (Mining, Mysticism, Fishing, The Wheel, Agriculture and Hunting).
The Starting Techs can be any techs that are available, and you can have more then two. But unless you want to unbalance the game, stick with just having two from the starting six
Unique Units: All the original Civs have one unique unit. These units are slightly better versions of other units in the game, and actually replace them for that Civ.
Each Civ can have more then one unique unit, but this can unbalance the game if youre not careful.
Leaders: Each leader has their own Traits and favoured civic. As with the Starting Techs and The Unique units, you can have more then what the Civs in the original game had, but again, beware of unbalancing the game (unless thats what youre planning on doing)
Part 3: Setup
Civ4 has a very strict directory and file structure for mods.
You are going to need to set up a structure like this, in the \\Firaxis Games\Sid Meier's Civilization 4\Mods folder
YourCiv\Assets\Art\Interface\Buttons\Civilizations \
YourCiv\Assets\Art\Interface\Buttons\Units\
YourCiv\Assets\Art\Interface\TeamColor\
YourCiv\Assets\Art\Interface\Leaderheads\
YourCiv\Assets \XML\Art
YourCiv\Assets \XML\Civilizations
YourCiv\Assets \XML\GameInfo
YourCiv\Assets \XML\Text
YourCiv\Assets \XML\Units
Or just download this .zip ( http://vic.australis.com.au/charcoal/newciv.zip ) and unzip it to the Mods folder.
Now youre going to need to copy some of the XML files from the original game into your mod directory, as well need to edit them later.
The files come from \\Firaxis Games Civilization 4 and go into \\Firaxis Games Civilization 4\Mods and the same structure.
The files you need are:
Assets\XML\Art\CIV4ArtDefines_Civilization.xml
Assets\XML\Art\CIV4ArtDefines_Leaderhead.xml
Assets\XML\Civilizations\CIV4LeaderHeadInfos.xml
Assets\XML\Civilizations\CIV4CivilizationInfos.xml
Assets\XML\GameInfo\CIV4DiplomacyInfos.xml
Assets\XML\Interface\CIV4ColorVals.xml
Assets\XML\Interface\CIV4PlayerColorInfos.xml
Assets\XML\Units\CIV4UnitInfos.xml
Part 4: Making the Pictures - Graphics (Civ Flag and Leader Head)
First off well create your civilizations flag.
The flag is displayed at the bottom right, near the minimap and near each of your units.
The texture we have to create is 128x128 in size, but in game the flag is scaled down about %25 horizontally to fit on the flag model.
The easiest way I can think of making the flag is creating a 96x128 image and then stretching the horizontal %25 to 128.
I got my source image from ( http://flagspot.net/flags/au.html ), rotated it right 90 degrees, and resized it so the height was 128. Then I added some boarders to the side to make it 96 pixels in width. Finally I resized it to 128x128.
Here is the result: http://vic.australis.com.au/charcoal/ausflag.jpg
Now, save your image as a .bmp somewhere, I usually put it where the end .dds file will be put. This would be YourCiv\Assets\Art\Interface\TeamColor\
Open up DXTbmp and load the .bmp
You now should be looking at something like this: http://vic.australis.com.au/charcoal/dxtbmp.jpg
Over to the right hand side of the window it that Alpha Channel box.
The Alpha Channel is a map that tells the game what pixels of the texture are transparent, and which arent. In our case, all white pixels are transparent, and will show the default colour of the civilization.
So, we want to change the Alpha channel to all black.
Double click on the white part and it will load the Alpha channel in your default image editor. Bucket fill it all black, save it and click on the 3rd icon (white arrow up) to reload the edited Alpha channel.
Now go to File->Save As->DDS Texture. You be shown a save box.
Navigate to YourCiv\Assets\Art\Interface\TeamColor\ and save the file, making sure you change save type to DDS DXT 3. That is very important.
With that flag, the in game the flag turned out like this: http://vic.australis.com.au/charcoal/badflag.jpg
So, I added a border to the top, giving these (better) final results:
http://vic.australis.com.au/charcoal/ausflag2.jpg and http://vic.australis.com.au/charcoal/goodflag.jpg
With that done well now do the Leaderhead image.
The original Leaderheads are actual 3D Meshes, unfortunately no one is able to make and import them yet. But we can put in static images, much in the same way we did with the flag.
The Leaderheads also have the same problem of being a square texture, but showing in a rectangle that is ~%25 smaller horizontally. The only difference is that the texture is a 512x512.
So, doing the same thing we did with the flag, make/get a base image that is 384x512 and then resize it to 512x512.
Ive decided to have John Howard as the leader for the Australians, mainly because he was the easiest to get a picture for.
Source image: http://www.defenselink.mil/photos/Jul2005/050718-D-9880W-065.jpg
I just cropped out Howard at about 0.75 ratio, then resized it to 512x512.
This time when you run it through DXTbmp, just leave the Alpha Channel white.
Then save it to YourCiv\Assets\Art\Interface\Leaderheads\
Part 4:Making the Buttons - Graphics(Buttons)
Now we have to make three buttons, one for your Civ, one for your leader and one for your Unique Unit.
For all three buttons, here is a border and Alpha channel:
Border: http://img309.imageshack.us/img309/4900/civ4bracket2rt.jpg
Alpha Channel: http://img186.imageshack.us/img186/5908/buttonalpha3zi.jpg
Save both of these somewhere.
First off, Im going to do the Civ button.
This is going to be the image for the flag, put into the above border. I imagine that you know how to do that. If you dont, it isnt needed, but itll make it look nicer.
Load the finished image into DXTbmp, then click on the first button under Alpha Channel. This is how you load the Alpha Channel bitmap you saved before.
Navigate to the Alpha Channel bitmap and load it.
Then save the .dds as to YourCiv\Assets\Art\Interface\Buttons\Civilizations\
, using the same options as before.
Next up is the Leader button, again, Im going to get this from the image I made before, and merge it with the border image.
Run it through DXTbmp, with the same Alpha Channel bitmap, and save the file in YourCiv\Assets\Art\Interface\Leaderheads\, obviously with a different name then the actual Leaderhead picture.
Lastly we need to do our Unique Unit button.
This is exactly the same as the last two, except we need to find/make a new source image.
Here is mine: http://www.heatwave-toys.com/hwt_2001/image/pics-bbi/mls-bbi-ef-sasr.jpg
Run it through DXTbmp, exactly the same as the last two times and save it in YourCiv\Assets\Art\Interface\Buttons\Units\
My 3 buttons: http://vic.australis.com.au/charcoal/buttons.jpg
Part 5: Making the Words - XML(Text XML)
First off Ill try to provide a crash course in XML.
XML is a way of storing and organising information..
Most, if not all information is enclosed by tags, these tags look like this:<tag>information</tag>
The tag part can be anything, usually its something that describe what the information is.
There are also these tags:<tag/>
<!-- Comment -->
The first one is used when (in this instance), there is no information for this tag and the second is used for comments.
I think thats about all you need to know. Just be wary of typos in tags, if your not copying them from somewhere.
Now, to the XML text file.
This file is a little different from all the other XML files, mainly because its name can be anything and its loaded in addition to the same (types) of XML files that come with the game.
Anyway, this file contains the text that will be shown in the game.
All the other XML files reference these text XML files when anything is needed to be written to the screen. This is so multi-language is made easier, and when one section of text its needed to be used multiple times.
With this its only needed to be written out once, rather then every time its needed to be used.
Everything in this file is in this structure: <TEXT>
<Tag>TXT_KEY_CIV_YOURCIV_DESC</Tag>
<English>Your Empire</English>
<French>in French</French>
<German>in German</German>
<Italian>in Italian</Italian>
<Spanish>in Spanish</Spanish>
</TEXT>
I imagine its fairly straight forward.
First it opens a TEXT tag, this is just a way of telling the game Hey, everything up to the close of this tag, is all together
Next it opens a TAG tag. The text that is contained within this tax is what will be used in the other XML files to print this line (depending on what language you are using).
After this is the tags for the individual languages that are needed.
And thats it about the file.
Here is a text XML file that contains the basics of what youll need to make a civilization: http://vic.australis.com.au/charcoal/GameTextInfos_YourCiv.zip
Download it and unzip it to in your YourCiv\Assets \XML\Text directory, then open it up for editing.
Its a slightly edited version from this tutorial: http://forums.civfanatics.com/showthread.php?t=144425
While the file is good, the tutorial isnt complete.
All the data in this file is very easy to understand, just change all the YOURCIV, YOURLEADER and YOURUNIQUEUNIT parts of each tag and then the information contained in each of the tags below it.
Part 6: Adding the Civ - XML(Civilization Infos and more text XML) (long)
Navigate your way to Assets\XML\Civilizations and open CIV4CivilizationInfos.xml.
This file contains all the information about the civilizations.
What were going to need to do is add another entry for Australia.
The easiest way to do this is copy and then edit one of the civilizations that are already there.
I copied the American Entry and have edited that.
If you look at the entries for the tags Description, ShortDescription and Adjective, you should see that they match up with entries in the GameTextInfos_yourciv.xml file.
For now, dont worry about the DefaultPlayerColor tag.
Ill cover that one later.
Have a look at the city tags now. They should look something like TXT_KEY_CITY_NAME_WASHINGTON.
Look familiar?
They are the same type of tags that Description and the rest use.
If you put 2 and 2 together, youll figure out that the city names are put into the GameTextInfos_yourciv.XML file
These are a little different then the other texts, mainly because they are names, and how different languages handle names. Here is an extract from CIV4s City name file: <TEXT>
<Tag>TXT_KEY_CITY_NAME_WASHINGTON</Tag>
<English>Washington</English>
<French>
<Text>Washington</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</French>
<German>
<Text>Washington</Text>
<Gender>Male</Gender>
<Plural>0</Plural>
</German>
<Italian>
<Text>Washington</Text>
<Gender>Female</Gender>
<Plural>0</Plural>
</Italian>
<Spanish>
<Text>Washington</Text>
<Gender>Female</Gender>
<Plural>0</Plural>
</Spanish>
</TEXT>
Fairly self explanatory, and if you want you can just include the English entry, but I dont know what will happen when people from other languages play the mod.
Anyway, copy that code, and put it at the end of the GameTextInfos_yourciv.XML file. Then edit the Tag name and the entries beneath it.
After youve done that, go back to the CIV4CivilizationInfos.xml and add in the new city name tags.
Im going to put in 20 cities and be lazy, by just putting in the English ones.
Got the list of cities from here: http://www.reference.com/browse/wiki/List_of_cities_in_Australia
After this we have the Units/Unit tags.
This is where the Unique Unit is assigned to the Civ.
There needs to be a bit of explaining here.
There are tags for UnitClassType and UnitType. Each basic unit is in its own UnitClass, wether their Workers, Macemen or Stealth bombers.
The Unique Units share the UnitClassType with the unit they replace.
So, for example: Unit Name: Worker Fast Worker
UnitClassType: UNITCLASS_WORKER UNITCLASS_WORKER
UnitType: UNIT_WORKER UNIT_FAST_WORKER
With that explained, you might want to go hunting around \New Civ\Assets\XML\Units\CIV4UnitInfos.xml to find the unit class of the unit that you want your Civs Unique Unit to replace.
In adding Australias SAS, it isnt going to be much different from Americas Navy Seal. Its actually going to be of the same UnitClassType.
So all I have to do here is change the UnitType.
Next up is the FreeUnitClasses/ FreeUnitClass tags.
This is a way for you to give extra units at the start of the game to your civilization.
There are two tags here: UnitClassType and iFreeUnits.
The first one, is as with the last one, the unit class, not the actual unit its self.
The second tag needs a little explanation.
At the start of the tag is an i this means that the information contained between the tags is an integer, or any whole number.
Whatever number you put here is the amount of that type of units youll get extra at the start.
So, with this, you could give a Civ 2 extra Warriors or 1000 ICBMS at the start. Also, you can give the Civ more then just one type of unit, just copy everything between the <FreeUnitClass> and </FreeUnitClass> tags, then modify them
All the original civs give 1 of the UNITCLASS_SETTLER, so I suggest you do the same. And leave it for balancing issues.
Now we move onto the FreeBuildingClasses/ FreeBuildingClass tags.
This is a way to give your Civ a building at the start of the game.
Again, there are two tags here: BuildingClassType and bFreeBuildingClass
BuildingClassType is the same as the UnitClassType we worked with just before. Except, its obviously for buildings.
The other tag, bFreeBuildingClass, is yet another that needs a little explanation.
The b at the start means that its a Boolean tag. For those that dont know, that means that it can be either True or False, these are represented by 1 or 0 respectively.
Youll notice that all the ones in the file are given a 1. This indicates that it is a Free Building. You could add a BuildingClassType and make the bFreeBuildingClass eual 0, but then it would behave as a normal building.
With this you could give your Civ a Hospital from the start, but I think that it only gives one building of that type.
All the original civs again have one here. They give a BUILDINGCLASS_PALACE, which obviously is the Palace. I suggest you do the same and leave it for balancing issues, again.
Next we have the FreeTechs/FreeTech tags.
This is where the techs that each Civ starts with are listed.
As with the others, theres 2 tags: TechType and bFreeTech
TechType is the tag of the tech, and bFreeTech works like the one for the free buildings.
As explained before, all original Civs have 2 techs from the first 6 that are available.
Next up there is a closed tag for DisableTechs.
So, if you wanted you could disable some techs for your Civ, but Im not going to go on about it here.
Moving on we have the InitialCivics and AnarchyCivics.
Self explanatory, its the civics that your Civ is on at the start of the game and during the anarchy after changing Religion or Civics.
All the original Civs have the basic Civics for both of these, but you could easily change them.
Now we have the Leaders/Leader tags.
Much the same as most of the others, two tags: LeaderName and bLeaderAvailability.
LeaderName is something that we will be adding later, but you can add in what it will be, should be along the lines of LEADER_LEADERNAME.
Then bLeaderAvailability, is weather the leader is available.
I think you could add leaders from other civs into this, so with a little editing, you could have Ghandi leading the French, or Washington leading the Germans.
Finally we have the CivilizationSelectionSound and CivilizationActionSound tags.
I personally am not too sure about sounds (yet), so just leave them.
You could possibly make them closed tags, if you wanted
...