The Newbie’s Guide to Modding Civilization 5

LuvToBuild

Prince
Joined
Mar 9, 2006
Messages
564
Location
Evansville, IN
Version 0.00 - [Currently Under Construction Pre-Release WIP - Please overlook the mess :) ]

The Newbie’s Guide to Modding

PREFACE
The intent of this guide is to be an addendum to Kael’s original guide for creating Civilization 5 mods. This document is not intended to replace the fine work done by Kael in his original modder’s guide. I highly recommend that all modders start with his guide as it contains a lot of useful information and insight that I do not intend to rehash in this guide. Most of the information he presents is still relevant. This guide is not intended for expert modders. Much of what is covered within this guide is information provided by those same modders in response to questions in the main Civ5 - C&C forum. It is the author’s intent to help other newbie modders who are struggling to mod Civilization 5. Some of the problems encountered are due to the fact that Kael’s mod is out of date and doesn’t cover everything. Several things have changed since the time Kael wrote his original modder’s guide. This is due to the addition of two expansion packs, as well as various Steam updates and game patches, all of which have changed the way mods have to be created in order to work properly. A new modder can become very frustrated just trying to create something as "simple" as a new civilization and leader if they are not aware of all the little things that have to be just right. The “solution” to this is to search the forum and/or ask a question. While searching the forum will sometimes provide an answer, it usually involves pouring through a lot of irrelevant posts and threads in order to find the few that are actually relevant to your common problem. It is also possible that the answer is out dated as well, which leads to even more frustration for the newbie modder. Because I have struggled with this myself as a newbie modder, I have decided to produce this addendum to the original guide by Kael in the hopes of helping other newbie modders.

Note: This guide was created with the assumption that you are creating a mod for the Brave New World expansion on a PC using the Sid Meier's Civilization 5 SDK available from Steam. If you are creating a mod for the original version of the game or just the Gods & Kings expansion, several things will be different, so proceed with caution. I will try to make special notes regarding this as we go along. If you are using a Mac, this guide might not be as helpful. You will need to seek additional help from other modders who use Macs. You can find this help in the Civ5 - Macintosh forum.

MUST HAVE REFERENCES - CREDIT WHERE CREDIT IS DUE

Kael's Modder’s Guide to Civilization 5 - The guide that started it all. Outdated but still a good read regarding the general concept of modding. Well worth the time for every newbie just starting out.

Civilization Modding Wiki - A good reference for many different aspects of modding Civilization 5. Experienced modders are encouraged to add to the wiki in order to help grow the available knowledge base.

whoward69’s [TUTORIAL] How to enable logging - An absolute must read for the newbie modder. One of the first things that you will want to do is enable logging. It is the only way to quickly troubleshoot XML syntax and parsing errors.

whoward69’s XML data files for Standard Civilizations (inc DLC) - The MyNewCiv template files used in this mod are based on the layout and file structure used by whoward69 in his template files.

whoward69’s [TUTORIAL] DDS Texture (Image File) Creation and Usage for Beginners - This thread covers many of the details and potential problems that a newbie modder will encounter when adding new icons and images to the game.

BoomerSooner76’s (Tutorial) How to add Civ Icons with Gimp 2 - A great tutorial on creating basic icons for new civilizations.

Irkalla's "Firaxis-Like" Civilization Icon Tutorial - A great tutorial for creating civilization icons that more closely match the ones produced by Firaxis.

whoward69’s [REFERENCE] File attributes/properties - Is that VFS, InGameUIAddin or UpdateDatabase? - A must have reference regarding the different settings required for different types of files. This thread helps to sort out some of the confusion regarding when to use what.

jpbar81’s New Leaders Spreadsheet

TABLE OF CONTENTS

IN THE BEGINNING - This section covers installing the SDK from Steam, downloading and installing the MyNewMod template, and preparing the template for your changes.

HOW TO CREATE A NEW CIVILIZATION - This section provides a tutorial for adding a new civilization using the MyNewCivilization.xml template found in the MyNewMod project.

HOW TO CREATE A NEW LEADER - This section provides a tutorial for adding a new leader using the MyNewLeader.xml template found in the MyNewMod project.

HOW TO CREATE A NEW TRAIT aka UNIQUE ABILITY (UA) - This section provides a tutorial for adding a new trait using the MyNewTrait.xml template found in the MyNewMod project.

HOW TO CREATE A NEW UNIQUE BUILDING (UB) - This section provides a tutorial for adding a new building using the MyNewBuilding.xml template found in the MyNewMod project.

HOW TO CREATE A NEW UNIQUE UNIT (UU) - This section provides a tutorial for adding a new unit using the MyNewUnit.xml template found in the MyNewMod project.

HOW TO CREATE A NEW ICON ATLAS FOR YOUR CIVILIZATION - This section provides a tutorial for using Paint.Net to create a new icon atlas. It also covers getting the icon atlas files into your mod project.
 
IN THE BEGINNING
If you are a complete noob and do not even know what we mean by the SDK, that's OK. This section is for you.

How do I start modding Civilization 5?
First, you will need to download and install the SDK from Steam if you haven’t already done so. Go to the Tools option under the Library menu in your Steam browser. Look through the list until you find the entry Sid Meier’s Civilization 5 SDK. Right click and select Install Game from the pop-up menu. Once it has finished installing, you should have a shortcut to the SDK in the Steam folder of your Start menu.



NOTE: Sometime prior to September 2013, Microsoft removed the main page for their Visual Studio 2010 Isolated Shell Redistributable. This must be installed for ModBuddy to work. For the time being, the English version is still available from Microsoft. You can also get it from Hulfgar here or from me here. If you are looking for a non-English version, I am sorry to say, good luck with your search.

Before continuing on, you should download the MyNewMod file located in the Civ5 Downloads database [NOTE: This doesn't exist there yet. It's not ready for distribution.]. I created this to help others follow along with this guide. Unzip the archive file and place it in …Documents\Firaxis ModBuddy or …My Documents\Firaxis ModBuddy depending on the version of Windows you are using. In …Firaxis ModBuddy\MyNewMod, you should have a file structure that looks like this. If you don’t, then you must not have unzipped the file and placed it correctly. Correct this now to avoid any potential confusion later.

Moderator Action: Note: "MyNewMod" still does not exist in the database - though it isn't needed to follow the rest of the guide.



The next step is to start Mod Buddy in the SDK.




Click Open Mod and navigate to the …Firaxis ModBuddy\MyNewMod folder. Open the MyNewMod Civilization V Solution.



  1. Right click on the Civilization V Solution name and select Rename. Type in whatever you want to call your mod.
  2. Do the same for the Civilization V Project file.
  3. Finally, right click on the Civilization V Project file again and select Properties.



  1. Click on the Mod Info tab.
  2. Click the New button. This will assign a new and unique Mod ID number for your mod. If you don't perform this step, your mod will conflict with this one on Steam.
  3. You can change the version of your mod here as you update it so that users who download your mod will be able to track which version they have installed. You don't need to change this with every change you make offline. You only need to update it when you are getting ready to upload an updated version of the mod to Steam.
  4. You can notify users of the current status of this version here. It is best to leave this as Alpha or Beta until you have a version that has been play tested enough you can safely call it Stable.
  5. This is where you can change all of the information that the mod user will see when they download and play your mod.
  6. This section determines whether or not the main screen of your mod will show the single player, multiplayer, and/or hotseat menu selections.
  7. There are a few graphic changes that require a reload of the graphic systems listed here. We will cover this in more detail later.
  8. Unless you are making very minor changes, chances are your mod will affect saved games. It is usually good practice for the users of your mod to start a new game when using a new version of your mod so it is best to leave this checked.
  9. Checking this box will hide the default Setup Game screen. You should leave this unchecked unless you have created a custom Setup Game UI for your mod. This is not typically done unless you are creating a scenario or total conversion mod.

Be sure to save all of your changes and then close the Properties window. You are now ready to move onto creating your first mod. At this point, I would highly recommend reading through the Core Concepts and Design Philosophy sections of Kael's Modder’s Guide to Civilization 5. You should also read the Creating a Mod section starting at the bottom of Page 14 and stopping at the top of Page 24. There have been significant changes to the specifics of creating a mod since Kael wrote this guide. The tutorials in this thread will attempt to update the rest of that section of Kael's guide where applicable, so don't focus too much on reading all of that section. I will be referring back to Kael's guide in each section of this tutorial where relevant.

UP NEXT: HOW TO CREATE A NEW CIVILIZATION
 
MAIN PAGE
PREVIOUS TUTORIAL - IN THE BEGINNING

HOW TO CREATE A NEW CIVILIZATION
NOTE: This tutorial assumes you are already familiar with the material covered in the previous tutorial IN THE BEGINNING. If you have not already done so, you should read through that tutorial first.

Since the first thing most new modders want to create is a new civilization, we will start there. Follow along as I guide you through the MyNewMod project. The MyNewMod project more or less follows the same file structure that Kael gave in his guide on Page 16. Ultimately, it comes down to your particular preferences. There really isn't a "right" or "wrong" file structure, as long as everything is properly referenced and works. Right click on the MyNewCivilization.xml file under the XML folder. Rename the file to your desired filename, (for example, America.xml). Change only the MyNewCivilization part. If you delete the .xml part, you won’t be able to point to it in Actions later. Actions will be covered in more detail later in the guide, so don’t worry about it now.

DO NOT rename files or folders from outside your ModBuddy project. You are asking for trouble if you do. DO NOT delete a file from your ModBuddy project that you do not intend to delete permanently. Any time you change the name of a file or folder within the project, that change will be reflected in the file structure of your mod folder in ...\Firaxis ModBuddy\MyNewMod. If you need to temporarily remove a file from the project, but do not want it to be permanently deleted, make a copy first somewhere outside of the mod folder. Then, delete the file from the ModBuddy project and re-import it using Add-->Existing Item. Don't worry, we will cover that in more detail later.

Now, double click on the newly renamed MyNewCivilization.xml file. For the purpose of this tutorial, I will continue to refer to it in this manner, so don’t let that confuse you. In this file, you will find all of the tags that can be modified via XML to create a new civilization. This file is based on whoward69's XML data files for Standard Civilizations (BNW version). I create my new civilizations this way because it is much easier to find things like the civilization’s unique color scheme, TXT_KEY tags, and other such peripheral attributes if they are all in the same file. Firaxis separated all of these tags out into separate XML files which makes it difficult to find all of the relevant tags that you might want to change.

At this point, you should highlight the MYNEWCIV portion of COLOR_PLAYER_MYNEWCIV_ICON and hit CTRL-H. Type the name of your civilization in the Replace with: box. MYNEWCIV should already be in the Find what: box. Make sure the text in the Replace with: box is in all caps! If your civilization name is more than one word, be sure to use an underscore instead of a space to separate the words. Click the Replace All button and voila!



At the top of the file, you will find the new civilization’s color scheme. If you plan to use an existing color scheme, you can delete all of the code below. However, I would recommend leaving this portion in so that you can come back later and give your civilization a custom color.
Code:
<Colors>
     <Row>
          <Type>COLOR_PLAYER_MYNEWCIV_ICON</Type>
          <Red>1.000</Red>
          <Green>1.000</Green>
          <Blue>1.000</Blue>
          <Alpha>1.0</Alpha>
     </Row>
     <Row>
          <Type>COLOR_PLAYER_MYNEWCIV_BACKGROUND</Type>
          <Red>0.000</Red>
          <Green>0.000</Green>
          <Blue>0.000</Blue>
          <Alpha>1.0</Alpha>
     </Row>
</Colors>
<PlayerColors>
     <Row>
          <Type>PLAYERCOLOR_MYNEWCIV</Type>
          <PrimaryColor>COLOR_PLAYER_MYNEWCIV_ICON</PrimaryColor>
          <SecondaryColor>COLOR_PLAYER_MYNEWCIV_BACKGROUND</SecondaryColor>
          <TextColor>COLOR_PLAYER_WHITE_TEXT</TextColor>
     </Row>
</PlayerColors>
If you are familiar with RGB color values, then you can probably guess that the red, green, and blue tags are used to set these values. You cannot use the more traditional integer value for each of these tags directly. You will need to convert each of the integers to decimal numbers with a precision of three decimal places. This is because Civ5 uses a proportional value to determine how much of each color to &#8220;mix&#8221; with the other colors to create your desired color. To do this, first determine the integer value you want to use, then divide that number by 255. Round it to three decimal places and place the number in between the start and end tags for that color, preceded by a 0 as in 0.000. Don&#8217;t be too concerned about whether you should round up or down. Round it whichever way you prefer. It won&#8217;t matter that much when you look at the color in game. If you want either of your custom colors to be white, use 1.000 for all three RGB values. Black would be 0.000 for all three RGB values. If you don&#8217;t know what color you might want, go to a paint program like Paint that comes with Windows. Go to Edit Colors or whatever equivalent method your program has for viewing different RGB combinations. Find a color you like and then take note of the Red, Green, and Blue integer values displayed for that color. These are the numbers that you will need to divide by 255 in order to get your custom color.



The following section defines the main information for your civilization.

Code:
<Civilizations>
     <Row>
          <Type>CIVILIZATION_MYNEWCIV</Type>
          <Description>TXT_KEY_CIV_MYNEWCIV_DESC</Description>
          <ShortDescription>TXT_KEY_CIV_MYNEWCIV_SHORT_DESC</ShortDescription>
          <Adjective>TXT_KEY_CIV_MYNEWCIV_ADJECTIVE</Adjective>
          <CivilopediaTag>TXT_KEY_CIV5_MYNEWCIV</CivilopediaTag>
          <Playable>1</Playable>
          <AIPlayable>1</AIPlayable>
          <DefaultPlayerColor>PLAYERCOLOR_MYNEWCIV</DefaultPlayerColor>
          <ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
          <ArtStylePrefix>EUROPEAN</ArtStylePrefix>
          <ArtStyleSuffix>_EURO</ArtStyleSuffix>
          <IconAtlas>MYNEWCIV_COLOR_ICON_ATLAS</IconAtlas>
          <PortraitIndex>0</PortraitIndex>
          <AlphaIconAtlas>MYNEWCIV_ALPHA_ATLAS</AlphaIconAtlas>
          <MapImage>MyNewCivMap.dds</MapImage>
          <DawnOfManImage>MyNewLeader_DOM.dds</DawnOfManImage>
          <DawnOfManQuote>TXT_KEY_CIV5_DAWN_MYNEWCIV_TEXT</DawnOfManQuote>
          <DawnOfManAudio></DawnOfManAudio>
          <SoundtrackTag></SoundtrackTag>
     </Row>
</Civilizations>
We will skip over the TXT_KEY entries for now. They will be covered later in the tutorial HOW TO ADD CUSTOM TEXT. The TXT_KEYs for US English are included at the bottom of the file for convenience.

You should delete the lines <Playable> and <AIPlayable> if you plan for your civilization to be playable by both the human player and the AI. These are already set to true by default. If you want your new civilization to be playable by the human only, then delete <Playable> and change <AIPlayable> to false (Not False or FALSE. Don't get creative. Syntax is important.). If you want this new civilization to be playable by the AI only, then delete <AIPlayable> and change <Playable> to false. Do not include both of these and set them both to false. Your civilization will not show up when you go to test your mod for what should be an obvious reason. You told it nobody can play this civilization.

If you deleted the XML code for a custom color scheme, you need to replace PLAYERCOLOR_MYNEWCIV in
Code:
<DefaultPlayerColor>[COLOR="blue"][B]PLAYERCOLOR_MYNEWCIV[/B][/COLOR]</DefaultPlayerColor>
with an existing PLAYERCOLOR_ found in any one of the following files:

Version Filename Path
Vanilla CIV5PlayerColors.xml ...\Sid Meier's Civilization V\assets\Gameplay\XML\Interface
G&K CIV5PlayerColors_Expansion.xml ...\Sid Meier's Civilization V\assets\DLC\Expansion\Gameplay\XML\Interface
BNW CIV5Civilizations_Expansion2.xml ...\Sid Meier's Civilization V\assets\DLC\Expansion2\Gameplay\XML\Civilizations

The <ArtStyleType> tag specifies the type of building art that will be used for your civilization&#8217;s cities. Browse through the CIV5ArtStyleTypes.xml file located in ...\assets\Gameplay\XML\GameInfo to see the different options available. The <ArtStylePrefix> tag and <ArtStyleSuffix> tag are used for ethnic unit art related to the generic units that all civilizations can build. They allow your mod to add ethnic diversity without creating unique units for all of the units that a civilization can build. These three tags together control how your civilization&#8217;s generic artwork will look in game. There are five different ethnic types used in the game:
Code:
<ArtStylePrefix>_AFRI</ArtStylePrefix>
<ArtStyleSuffix>AFRICAN</ArtStyleSuffix>
----------------------------------------------------
<ArtStylePrefix>_AMER</ArtStylePrefix>
<ArtStyleSuffix>AMERICAN</ArtStyleSuffix>
----------------------------------------------------
<ArtStylePrefix>_ASIA</ArtStylePrefix>
<ArtStyleSuffix>ASIAN</ArtStyleSuffix>
----------------------------------------------------
<ArtStylePrefix>_EURO</ArtStylePrefix>
<ArtStyleSuffix>EUROPEAN</ArtStyleSuffix>
----------------------------------------------------
<ArtStylePrefix>_MED</ArtStylePrefix>
<ArtStyleSuffix>MEDITERRANEAN</ArtStyleSuffix>
We will skip the rest of these tags for now. We will come back to them later after we have created some new artwork for our civilization and leader.

The following code assigns a specific leader to this civilization. At this point, we will leave the LeaderheadType as LEADER_MYNEWLEADER. We will come back and change this later after we have created our new leader in the MyNewLeader.xml file.
Code:
<Civilization_Leaders>
     <Row>
          <CivilizationType>CIVILIZATION_MYNEWCIV</CivilizationType>
          <LeaderheadType>LEADER_MYNEWLEADER</LeaderheadType>
     </Row>
</Civilization_Leaders>
Next we come to the code for setting a preferred religion for your new civilization. If you plan to add a new religion, you can leave this code just as it is for now, then come back later and assign your new religion. If you are creating a mod for the original version of the game, you must delete this section of code. The original version of Civilization 5 does not have religion, so this section of code will generate one or more XML errors.
Code:
<Civilization_Religions>
     <Row>
          <CivilizationType>CIVILIZATION_MYNEWCIV</CivilizationType>
          <ReligionType>RELIGION_[COLOR="blue"][B]MYNEWRELIGION[/B][/COLOR]</ReligionType>
     </Row>
</Civilization_Religions>
If you want to add a religion here that already exists, you can do that now by replacing MYNEWRELIGION with the name of an existing religion. It needs to match exactly one of the religions in the Civ5Religions.xml file. This file can be found in the following locations:

Version Path
G&K ...assets\DLC\Expansion\Gameplay\XML\Religions
BNW ...assets\DLC\Expansion2\Gameplay\XML\Religions

Now we come to the part that gives a lot of new modders trouble. This is because your civilization must have two uniques. It doesn't matter what sort of combination you choose for your two uniques, as long as you have two of them. You can have two unique buildings, two unique units, or one of each. If you do not properly code this section, or you have an XML error in the file which contains your new unit and/or new building, the quick select scrollable list on the game setup screen will "crash" when you go to select your new civilization during testing. Basically, you will only see the first five or so civilizations in the list with no scroll bar for scrolling down the list. The advanced setup screen will still work but the quick select list won't.

For the purposes of this tutorial and mod template, I have created two "uniques" based on the monument and warrior. This will keep the game setup civ select list working properly until you are able to get your new uniques added to the mod. For now, we will skip this section until we have covered creating these uniques.
Code:
     <Civilization_BuildingClassOverrides>
          <Row>
               <CivilizationType>CIVILIZATION_MYNEWCIV</CivilizationType>
               <BuildingClassType>BUILDINGCLASS_MONUMENT</BuildingClassType>
               <BuildingType>BUILDING_MYNEWBUILDING</BuildingType>
          </Row>
     </Civilization_BuildingClassOverrides>
     <Civilization_UnitClassOverrides>
          <Row>
               <CivilizationType>CIVILIZATION_MYNEWCIV</CivilizationType>
               <UnitClassType>UNITCLASS_WARRIOR</UnitClassType>
               <UnitType>UNIT_MYNEWUNIT</UnitType>
          </Row>
     </Civilization_UnitClassOverrides>
Now you need to give your civilization some freebies. These are the free buildings, units and technologies that your civilization will have at the start of the game. If you are creating a "normal" civilization, such as the existing ones that come with the game, these three sections should look something like what you see below.
Code:
     <Civilization_FreeBuildingClasses>
          <Row>
               <CivilizationType>CIVILIZATION_MYNEWCIV</CivilizationType>
               <BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
          </Row>
     </Civilization_FreeBuildingClasses>
     <Civilization_FreeUnits>
          <Row>
               <CivilizationType>CIVILIZATION_MYNEWCIV</CivilizationType>
               <UnitClassType>UNITCLASS_SETTLER</UnitClassType>
               <UnitAIType>UNITAI_SETTLE</UnitAIType>
               <Count>1</Count>
          </Row>
     </Civilization_FreeUnits>
     <Civilization_FreeTechs>
          <Row>
               <CivilizationType>CIVILIZATION_MYNEWCIV</CivilizationType>
               <TechType>TECH_AGRICULTURE</TechType>
          </Row>
     </Civilization_FreeTechs>
If there are any techs that you wish to disable from being researched by this civilization, you can add them under the next section. This is not a section that is normally used, so you should delete it if you won't be using it for your civilization.
Code:
     <Civilization_DisableTechs>
          <Row>
               <CivilizationType>CIVILIZATION_MYNEWCIV</CivilizationType>
               <TechType>TECH_FUTURE_TECH</TechType>
          </Row>
     </Civilization_DisableTechs>
The next section allows you to set a starting location priority for your new civilization. This is used if you want your civilization to always start along the ocean or a river or a particular region. If there is a region where you don't want your civilization to start, then use the region avoid table at the end. The existing regions recognized by the game can be found in the CIV5Regions.xml file located in ...assets\Gameplay\XML\Civilizations. Be sure to read the modding notes provided by Firaxis. I've included them here for reference. If you set your civilization to start along the ocean, you can include it in the Civilization_Start_Place_First_Along_Ocean table. This will give it a higher priority for starting along the ocean than other civilizations in the game. This is a new table added for BNW. Take note that Venice already has an entry in this table.
Code:
[COLOR="blue"]
<!-- NOTE TO MODDERS: Each Civ can belong to only one of the four Start Bias categories, listed below. -->
<!-- If a Civ has entries in any of the four following tables, any entries in later tables will be ignored. -->
<!-- So... Coastal bias trumps River bias trumps Region Priority trumps Region Avoid.   -->
<!-- The best practice is to pick only one of the four types (or none), for each civilization.    -->[/COLOR]
<Civilization_Start_Along_Ocean></Civilization_Start_Along_Ocean>
<Civilization_Start_Along_River></Civilization_Start_Along_River>
[COLOR="blue"]<!-- NOTE TO MODDERS: Both single and multiple entries for Region Priority (per Civ) are supported!    -->
<!-- If a Civ has one Priority, then on maps without a region of that type, fallback methods apply.    -->
<!-- The fallback methods will match the given civ with a region that has the most tiles of the priority    -->
<!-- terrain type. For instance, if Russia is set for Tundra priority but a map has no Tundra regions, they -->
<!-- will look for a region that has some tundra. If a Civ is given multiple priorities, fallbacks are not  -->
<!-- used: the bias isn't applied when a map has none of those region types.  -->[/COLOR]
<Civilization_Start_Region_Priority></Civilization_Start_Region_Priority>
[COLOR="blue"]<!-- NOTE TO MODDERS: Both single and multiple entries for Region Avoid (per Civ) are supported!  -->
<!-- Region Avoid only kicks in for Civs that do not have a Coast, River or Priority need.   -->
<!-- If a civ cannot avoid being placed in types it tries to avoid, the Avoid has to be ignored.  -->[/COLOR]
<Civilization_Start_Region_Avoid></Civilization_Start_Region_Avoid>
<Civilization_Start_Place_First_Along_Ocean></Civilization_Start_Place_First_Along_Ocean>
Next, you need to have some city names. You should add enough city names here that the player can build a lot of cities without running out of names. How many is enough? Well, that is kind of up to you, but Firaxis includes roughly 60 for their civilizations. You must have at least one name for your capital city. I have included 100 for this mod template. It's up to you to come up with that many names for the actual text. If you don't feel you need that many, you can delete them here. I would recommend leaving the corresponding TXT_KEYs at the end of the file in case you decide to add back some more city names later. Having extra TXT_KEYs won't hurt anything, but forgetting to add them back after adding back the references to them here will cause an XML error for each one that you no longer have loaded in the database.

NOTE: This example code is included for illustration purposes only! Do not copy and paste this into your mod exactly as it is here. The ..... will cause an error.
Code:
<Civilization_CityNames>
     <Row>
          <CivilizationType>CIVILIZATION_MYNEWCIV</CivilizationType>
          <CityName>TXT_KEY_CITY_NAME_MYNEWCIV_0</CityName>
     </Row>
     .....
     <Row>  
          <CivilizationType>CIVILIZATION_MYNEWCIV</CivilizationType>
          <CityName>TXT_KEY_CITY_NAME_MYNEWCIV_99</CityName>
     </Row>
</Civilization_CityNames>
Finally, you need some spynames for your spies. If you don't add these, the game will either crash upon entering the Renaissance Era or the civilization won't receive any spies. The Firaxis civilizations include ten spy names so you should have at least that many for your civilization. If you intend to have a lot of extra spies for this civilization, you should add a spy name for each extra spy.

NOTE: This example code is included for illustration purposes only! Do not copy and paste this into your mod exactly as it is here. The ..... will cause an error. Also, if this mod is for the original vanilla version of the game, you should not have any spy names. There is no espionage in the original version of the game. Adding spy names to a mod for the original game will cause XML errors.
Code:
<Civilization_SpyNames>
     <Row>
          <CivilizationType>CIVILIZATION_MYNEWCIV</CivilizationType>
          <SpyName>TXT_KEY_SPY_NAME_MYNEWCIV_0</SpyName>
     </Row>
     .....
     <Row>
          <CivilizationType>CIVILIZATION_MYNEWCIV</CivilizationType>
          <SpyName>TXT_KEY_SPY_NAME_MYNEWCIV_9</SpyName>
     <Row>
</Civilization_SpyNames>

That covers everything for creating a new civilization except for defining the TXT_KEYs. We will cover this in more detail in HOW TO ADD CUSTOM TEXT.

UP NEXT: HOW TO CREATE A NEW LEADER
 
MAIN PAGE
PREVIOUS TUTORIAL - HOW TO CREATE A NEW CIVILIZATION

HOW TO CREATE A NEW LEADER
NOTE: This tutorial assumes you are already familiar with the material covered in the previous tutorial IN THE BEGINNING. If you have not already done so, you should read through that tutorial first.

Now that you have your new civilization created, it's time to create your new leader. Open up your MyNewMod project. Right click on the MyNewLeader.xml file. Rename the file to your desired filename, (for example, Washington.xml).

Now, double click on the newly renamed MyNewLeader.xml file. For the purpose of this tutorial, I will continue to refer to it in this manner, so don&#8217;t let that confuse you. In this file, you will find all of the tags that can be modified via XML to create a new leader. This file is based on whoward69's XML data files for Standard Civilizations (BNW version). I create my new leaders this way because it is much easier to find things like the leader's TXT_KEY tags and other such peripheral attributes if they are all in the same file. Firaxis separated all of these tags out into separate XML files which makes it difficult to find all of the relevant tags that you might want to change.

At this point, you should highlight the MYNEWLEADER portion of LEADER_MYNEWLEADER and hit CTRL-H. Type the name of your new leader in the Replace with: box. MYNEWLEADER should already be in the Find what: box. Make sure the text in the Replace with: box is in all caps! If your leader name is more than one word, be sure to use an underscore instead of a space to separate the words. Click the Replace All button and voila!



At the top of the file, you will find the main information for your leader.
Code:
<Leaders>
     <Row>
          <Type>LEADER_MYNEWLEADER</Type>
          <Description>TXT_KEY_LEADER_MYNEWLEADER</Description>
          <Civilopedia>TXT_KEY_LEADER_MYNEWLEADER_PEDIA</Civilopedia>
          <CivilopediaTag>TXT_KEY_CIVILOPEDIA_LEADERS_MYNEWLEADER</CivilopediaTag>
          <VictoryCompetitiveness>5</VictoryCompetitiveness>
          <WonderCompetitiveness>5</WonderCompetitiveness>
          <MinorCivCompetitiveness>5</MinorCivCompetitiveness>
          <Boldness>5</Boldness>
          <DiploBalance>5</DiploBalance>
          <WarmongerHate>5</WarmongerHate>
          <WorkAgainstWillingness>5</WorkAgainstWillingness>
          <WorkWithWillingness>5</WorkWithWillingness>
          <DenounceWillingness>5</DenounceWillingness>
          <DoFWillingness>5</DoFWillingness>
          <Loyalty>5</Loyalty>
          <Neediness>5</Neediness>
          <Forgiveness>5</Forgiveness>
          <Chattiness>5</Chattiness>
          <Meanness>5</Meanness>
          <ArtDefineTag>MyNewLeader_Scene.xml</ArtDefineTag>
          <IconAtlas>MYNEWCIV_COLOR_ICON_ATLAS</IconAtlas>
          <PortraitIndex>1</PortraitIndex>
     </Row>
</Leaders>
We will skip over the TXT_KEY entries for now. They will be covered later in the tutorial HOW TO ADD CUSTOM TEXT. The TXT_KEYs for US English are included at the bottom of the file for convenience.

The columns in this section handle the various diplomacy modifiers that exist in the game. Most of these should be fairly self-explanatory. For the purpose of this template, I put a value of 5 in each column as a sort of "middle road" starting point. The values for the Firaxis created leaders tend to range between 0 and 10, but are occasionally higher than 10. Ultimately, you will have to do some trial and error experimentation to tweak the values to your liking.

We will skip the <ArtDefineTag>, <IconAtlas>, and <PortraitIndex> tags for now. We will come back to them later after we have created some new artwork for our civilization and leader.

This section of code assigns a leader trait for this civilization. We will cover this in the tutorial HOW TO CREATE A NEW TRAIT, so you should leave this code just as it is for now.
Code:
<Leader_Traits>
     <Row>
          <LeaderType>LEADER_MYNEWLEADER</LeaderType>
          <TraitType>TRAIT_MYNEWTRAIT</TraitType>
     </Row>
</Leader_Traits>

This next section of code handles the various approach biases for how the AI for this civilization interacts with other major civilizations in the game. Most of the columns in this section should be fairly self-explanatory. For the purpose of this template, I put a value of 5 in each column as a sort of "middle road" starting point. The values for the Firaxis created leaders tend to range between 0 and 10, but are occasionally higher than 10. Ultimately, you will have to do some trial and error experimentation to tweak the values to your liking.
Code:
<Leader_MajorCivApproachBiases>
     <Row>
          <LeaderType>LEADER_MYNEWLEADER</LeaderType>
          <MajorCivApproachType>MAJOR_CIV_APPROACH_WAR</MajorCivApproachType>
          <Bias>5</Bias>
     </Row>
     ..........
     <Row>
          <LeaderType>LEADER_MYNEWLEADER</LeaderType>
          <MajorCivApproachType>MAJOR_CIV_APPROACH_NEUTRAL</MajorCivApproachType>
          <Bias>5</Bias>
     </Row>
</Leader_MajorCivApproachBiases>
This next section of code handles the various approach biases for how the AI for this civilization interacts with the minor civilizations in the game. Most of the columns in this section should be fairly self-explanatory. For the purpose of this template, I put a value of 5 in each column as a sort of "middle road" starting point. The values for the Firaxis created leaders tend to range between 0 and 10, but are occasionally higher than 10. Ultimately, you will have to do some trial and error experimentation to tweak the values to your liking.

Code:
<Leader_MinorCivApproachBiases>
     <Row>
          <LeaderType>LEADER_MYNEWLEADER</LeaderType>
          <MinorCivApproachType>MINOR_CIV_APPROACH_IGNORE</MinorCivApproachType>
          <Bias>5</Bias>
     </Row>
     ..........
     <Row>
          <LeaderType>LEADER_MYNEWLEADER</LeaderType>
          <MinorCivApproachType>MINOR_CIV_APPROACH_BULLY</MinorCivApproachType>
          <Bias>5</Bias>
     </Row>
</Leader_MinorCivApproachBiases>
This next section of code handles the various leader flavors for how the AI for this civilization decides what to produce in it's cities, which tiles to improve, etc. Most of the columns in this section should be fairly self-explanatory. For the purpose of this template, I put a value of 5 in each column as a sort of "middle road" starting point. The values for the Firaxis created leaders tend to range between 0 and 10, but are occasionally higher than 10. Ultimately, you will have to do some trial and error experimentation to tweak the values to your liking.

Code:
<Leader_Flavors>
     <Row>
          <LeaderType>LEADER_MYNEWLEADER</LeaderType>
          <FlavorType>FLAVOR_OFFENSE</FlavorType>
          <Flavor>5</Flavor>
     </Row>
     <Row>
          <LeaderType>LEADER_MYNEWLEADER</LeaderType>
          <FlavorType>FLAVOR_DEFENSE</FlavorType>
          <Flavor>5</Flavor>
     </Row>
     ..........
</Leader_Flavors>
That covers everything for creating a new civilization except for defining the TXT_KEYs. We will cover this in more detail in HOW TO ADD CUSTOM TEXT.

Now that you have created your new leader, you need to go back to your MyNewCivilization.xml file and assign this new leader to the new civilization that you created in HOW TO CREATE A NEW CIVILIZATION. To do this, first copy the new name for your leader from the MyNewLeader.xml file. Scroll up to the top of the file and double click the LEADER_MYNEWLEADER text where MYNEWLEADER has been replaced with your new leader name.
Code:
<Leaders>
     <Row>
          <Type>[COLOR="blue"][B]LEADER_MYNEWLEADER[/B][/COLOR]</Type>
          .....
Hit CTRL-C to copy this text exactly as it is in the leader file. Now double click your MyNewCivilization.xml file in the Solution Explorer tree to open the MyNewCivilization.xml file. Scroll down to the following section of code:
Code:
<Civilization_Leaders>
     <Row>
          <CivilizationType>CIVILIZATION_MYNEWCIV</CivilizationType>
          <LeaderheadType>[COLOR="blue"][B]LEADER_MYNEWLEADER[/B][/COLOR]</LeaderheadType>
     </Row>
</Civilization_Leaders>
Double click LEADER_MYNEWLEADER highlighted in blue above. Hit CTRL-V to paste your new leader name here. Doing this will help you to avoid the potential for introducing a typo into your XML code. Typos can be a real pain to find sometimes so anything you can do to avoid them will help you to spend less time :wallbash: and more time modding.

UP NEXT: HOW TO CREATE A NEW TRAIT aka UNIQUE ABILITY (UA)
 
MAIN PAGE
PREVIOUS TUTORIAL - HOW TO CREATE A NEW LEADER

HOW TO CREATE A NEW TRAIT aka UNIQUE ABILITY (UA)
NOTE: This tutorial assumes you are already familiar with the material covered in the previous tutorial IN THE BEGINNING. If you have not already done so, you should read through that tutorial first.

Now that you have your new civilization and leader created, it's time to create your new trait. Open up your MyNewMod project. Right click on the MyNewTrait.xml file. Rename the file to your desired filename, (for example, ManifestDestiny.xml).

Now, double click on the newly renamed MyNewTrait.xml file. For the purpose of this tutorial, I will continue to refer to it in this manner, so don&#8217;t let that confuse you. In this file, you will find all of the tags that can be modified via XML to create a new trait. This file is based on whoward69's XML data files for Standard Civilizations (BNW version). I create my new traits this way because it is much easier to find things like the trait's TXT_KEY tags and other such peripheral attributes if they are all in the same file. Firaxis separated all of these tags out into separate XML files which makes it difficult to find all of the relevant tags that you might want to change.

At this point, you should highlight the MYNEWTRAIT portion of TRAIT_MYNEWTRAIT and hit CTRL-H. Type the name of your new trait in the Replace with: box. MYNEWTRAIT should already be in the Find what: box. Make sure the text in the Replace with: box is in all caps! If your trait name is more than one word, be sure to use an underscore instead of a space to separate the words. Click the Replace All button and voila!



At the top of the file, you will find the main information for your trait.

Code:
<Traits>
   <Row>
      <Type>TRAIT_MYNEWTRAIT</Type>
      <Description>TXT_KEY_TRAIT_MYNEWTRAIT</Description>
      <ShortDescription>TXT_KEY_TRAIT_MYNEWTRAIT_SHORT</ShortDescription>
We will skip over the TXT_KEY entries for now. They will be covered later in the tutorial HOW TO ADD CUSTOM TEXT. The TXT_KEYs for US English are included at the bottom of the file for convenience.

Most of the columns in this section should be fairly self-explanatory. For the sake of clarity, I have gone through all of the traits and their text descriptions to give you a better understanding of what each one does and how you can go about modifying it to suit your leader and civilization. For the purpose of this template, I left the default value of 0 in each column that expects an integer value. For the columns that expect a boolean value, I changed the 0s inserted by whoward69 to false. This better reflects the type of value that needs to be here. While you can get away with using a 0 or 1, it is usually better to use true or false to help you remember that the value is a boolean rather than an integer. By default, these values are set to 0 or false even if you don't include the tag. This means you can delete the line altogether if you don't intend to use it for your trait. However, it doesn't hurt to leave them like they are with the default value. You may want to come back later and put a value here, so it's good to already have the XML tag there.

You will notice that a lot of the integer columns end with Modifier. These values are usually a percentage change bonus added to the value being calculated. For instance, if you wanted your new civilization to generate twice as many great people than normal, you would enter 100 in the <GreatPeopleRateModifier> column. Some of the values are percentage modifiers without being quite so obvious in the column name. I have tried to note this where applicable.

The following column value adjusts the amount of XP required for your units to receive their next promotion. This value is a percentage modifier. In most cases you will want to decrease the amount of experience required by entering a negative value (ex: -25). If for some reason you want to increase the amount of experience required, you would enter a positive value (ex: 25).
Code:
<LevelExperienceModifier>0</LevelExperienceModifier>

This column value adjusts the rate at which points are accumulated towards all Great People. This value is a percentage modifier. In most cases you will want to increase the rate of generation by entering a positive value (ex: 10). If for some reason you want to decrease the rate of generation, you would enter a negative value (ex: -10).
Code:
<GreatPeopleRateModifier>0</GreatPeopleRateModifier>
This column value adjusts the rate at which points are accumulated towards Great Scientists. This value is a percentage modifier. In most cases you will want to increase the rate of generation by entering a positive value (ex: 10). If for some reason you want to decrease the rate of generation, you would enter a negative value (ex: -10).
Code:
<GreatScientistRateModifier>0</GreatScientistRateModifier>
This column value adjusts the rate at which Great Generals are generated. This value is a percentage modifier. In most cases you will want to increase the rate of generation by entering a positive value (ex: 10). If for some reason you want to decrease the rate of generation, you would enter a negative value (ex: -10).
Code:
<GreatGeneralRateModifier>0</GreatGeneralRateModifier>
This column adjusts the combat strength bonus that a land unit will receive from a nearby Great General. This value is a percentage modifier, meaning the combat strength bonus is changed by the percentage value entered here. In most cases, you will want to increase the bonus by entering a positive value (ex: 10). If for some reason you want to decrease the bonus, you would enter a negative value (ex: -10).
Code:
<GreatGeneralExtraBonus>0</GreatGeneralExtraBonus>
This column adjusts the amount of City State influence received by gifting a Great Person to a City State. This value is not a percentage modifier. The value entered here is the amount of influence that will be received. (ex: Sweden gets 90 influence for gifting a Great Person to a City State)
Code:
<GreatPersonGiftInfluence>0</GreatPersonGiftInfluence>
These three columns adjust the rate of production towards any building which has the corresponding MaxGlobalInstances, MaxTeamInstances, or MaxPlayerInstances set to a value of 1 or higher. These values are percentage modifiers, meaning the amount of production applied each turn is changed by the percentage value entered here. In most cases, you will want to increase the bonus by entering a positive value (ex: 10). If for some reason you want to decrease the bonus, you would enter a negative value (ex: -10).
Code:
<MaxGlobalBuildingProductionModifier>0</MaxGlobalBuildingProductionModifier>
<MaxTeamBuildingProductionModifier>0</MaxTeamBuildingProductionModifier>
<MaxPlayerBuildingProductionModifier>0</MaxPlayerBuildingProductionModifier>
This column adjusts the amount of unhappiness generated by the number of cities this civilization owns. This value is a percentage modifier, meaning the amount of unhappiness is changed by the percentage value entered here. If you want to increase the amount of unhappiness generated, you would enter a positive value (ex: 10). If you want to decrease the amount of unhappiness generated, you would enter a negative value (ex: -10).
Code:
<CityUnhappinessModifier>0</CityUnhappinessModifier>
This column adjusts the amount of unhappiness generated by the number of citizens. This value is a percentage modifier, meaning the amount of unhappiness is changed by the percentage value entered here. If you want to increase the amount of unhappiness generated, you would enter a positive value (ex: 10). If you want to decrease the amount of unhappiness generated, you would enter a negative value (ex: -10).
Code:
<PopulationUnhappinessModifier>0</PopulationUnhappinessModifier>

Code:
<CityStateBonusModifier>0</CityStateBonusModifier>

Code:
<CityStateFriendshipModifier>0</CityStateFriendshipModifier>

Code:
<CityStateCombatModifier>0</CityStateCombatModifier>

Code:
<LandBarbarianConversionPercent>0</LandBarbarianConversionPercent>
<LandBarbarianConversionExtraUnits>0</LandBarbarianConversionExtraUnits>
<SeaBarbarianConversionPercent>0</SeaBarbarianConversionPercent>

Code:
<LandUnitMaintenanceModifier>0</LandUnitMaintenanceModifier>
<NavalUnitMaintenanceModifier>0</NavalUnitMaintenanceModifier>
This column adjusts
Code:
<CapitalBuildingModifier>0</CapitalBuildingModifier>
Code:
<PlotBuyCostModifier>0</PlotBuyCostModifier>
<PlotCultureCostModifier>0</PlotCultureCostModifier>
This column adjusts
Code:
<CultureFromKills>0</CultureFromKills>
This column adjusts
Code:
<CityCultureBonus>0</CityCultureBonus>
This column adjusts
Code:
<CapitalThemingBonusModifier>0</CapitalThemingBonusModifier>
This column adjusts
Code:
<PolicyCostModifier>0</PolicyCostModifier>
This column adjusts
Code:
<CityConnectionTradeRouteChange>0</CityConnectionTradeRouteChange>
This column adjusts
Code:
<WonderProductionModifier>0</WonderProductionModifier>
This column adjusts
Code:
<PlunderModifier>0</PlunderModifier>
This column adjusts
Code:
<ImprovementMaintenanceModifier>0</ImprovementMaintenanceModifier>

Code:
<GoldenAgeDurationModifier>0</GoldenAgeDurationModifier>
Code:
<GoldenAgeMoveChange>0</GoldenAgeMoveChange>
Code:
<GoldenAgeCombatModifier>0</GoldenAgeCombatModifier>
Code:
<GoldenAgeTourismModifier>0</GoldenAgeTourismModifier>
Code:
<GoldenAgeGreatArtistRateModifier>0</GoldenAgeGreatArtistRateModifier>
Code:
<GoldenAgeGreatMusicianRateModifier>0</GoldenAgeGreatMusicianRateModifier>
Code:
<GoldenAgeGreatWriterRateModifier>0</GoldenAgeGreatWriterRateModifier>
Code:
<ExtraEmbarkMoves>0</ExtraEmbarkMoves>
Code:
<NaturalWonderFirstFinderGold>0</NaturalWonderFirstFinderGold>
Code:
<NaturalWonderSubsequentFinderGold>0</NaturalWonderSubsequentFinderGold>
Code:
<NaturalWonderYieldModifier>0</NaturalWonderYieldModifier>
Code:
<NaturalWonderHappinessModifier>0</NaturalWonderHappinessModifier>
Code:
<NearbyImprovementCombatBonus>0</NearbyImprovementCombatBonus>
Code:
<NearbyImprovementBonusRange>0</NearbyImprovementBonusRange>
This column adjusts
Code:
<CultureBuildingYieldChange>0</CultureBuildingYieldChange>
Code:
<CombatBonusVsHigherTech>0</CombatBonusVsHigherTech>
Code:
<CombatBonusVsLargerCiv>0</CombatBonusVsLargerCiv>
This column adjusts
Code:
<RazeSpeedModifier>0</RazeSpeedModifier>
This column adjusts
Code:
<DOFGreatPersonModifier>0</DOFGreatPersonModifier>
This column adjusts
Code:
<LuxuryHappinessRetention>0</LuxuryHappinessRetention>
This column adjusts
Code:
<ExtraSpies>0</ExtraSpies>
This column adjusts
Code:
<UnresearchedTechBonusFromKills>0</UnresearchedTechBonusFromKills>
This column adjusts
Code:
<ExtraFoundedCityTerritoryClaimRange>0</ExtraFoundedCityTerritoryClaimRange>
This column adjusts
Code:
<FreeSocialPoliciesPerEra>0</FreeSocialPoliciesPerEra>
Code:
<NumTradeRoutesModifier>0</NumTradeRoutesModifier>
Code:
<TradeRouteResourceModifier>0</TradeRouteResourceModifier>
Code:
<UniqueLuxuryCities>0</UniqueLuxuryCities>
Code:
<UniqueLuxuryQuantity>0</UniqueLuxuryQuantity>
This column adjusts
Code:
<WorkerSpeedModifier>0</WorkerSpeedModifier>
This column adjusts
Code:
<AfraidMinorPerTurnInfluence>0</AfraidMinorPerTurnInfluence>
Code:
<LandTradeRouteRangeBonus>5</LandTradeRouteRangeBonus>
Code:
<TradeReligionModifier>100</TradeReligionModifier>
Code:
<TradeBuildingModifier>0</TradeBuildingModifier>
This column allows
Code:
<FightWellDamaged>false</FightWellDamaged>
This column allows
Code:
<MoveFriendlyWoodsAsRoad>false</MoveFriendlyWoodsAsRoad>
This column allows
Code:
<FasterAlongRiver>false</FasterAlongRiver>
This column allows
Code:
<FasterInHills>false</FasterInHills>
This column allows
Code:
<EmbarkedAllWater>false</EmbarkedAllWater>
This column allows
Code:
<EmbarkedToLandFlatCost>false</EmbarkedToLandFlatCost>
This column allows
Code:
<NoHillsImprovementMaintenance>false</NoHillsImprovementMaintenance>
This column allows
Code:
<TechBoostFromCapitalScienceBuildings>false</TechBoostFromCapitalScienceBuildings>
This column allows
Code:
<StaysAliveZeroCities>false</StaysAliveZeroCities>
This column allows
Code:
<FaithFromUnimprovedForest>false</FaithFromUnimprovedForest>
This column allows
Code:
<BonusReligiousBelief>false</BonusReligiousBelief>
This column allows
Code:
<AbleToAnnexCityStates>false</AbleToAnnexCityStates>
This column allows
Code:
<CrossesMountainsAfterGreatGeneral>false</CrossesMountainsAfterGreatGeneral>
This column allows
Code:
<MayaCalendarBonuses>false</MayaCalendarBonuses>
This column allows
Code:
<NoAnnexing>false</NoAnnexing>
This column allows
Code:
<TechFromCityConquer>false</TechFromCityConquer>
This column allows
Code:
<UniqueLuxuryRequiresNewArea>false</UniqueLuxuryRequiresNewArea>
This column allows
Code:
<RiverTradeRoad>false</RiverTradeRoad>
This column allows
Code:
<AngerFreeIntrusionOfCityStates>false</AngerFreeIntrusionOfCityStates>
This column allows
Code:
<FreeUnit></FreeUnit>
Code:
<FreeUnitPrereqTech></FreeUnitPrereqTech>
Code:
<CombatBonusImprovement></CombatBonusImprovement>
Code:
<FreeBuilding></FreeBuilding>
Code:
<FreeBuildingOnConquest></FreeBuildingOnConquest>
Code:
<ObsoleteTech></ObsoleteTech>
Code:
<PrereqTech></PrereqTech>

If you run into a column name that isn't so easy to understand, you can browse through the existing trait files to see if it is used by an existing civilization's leader. These files can be found in the following locations:

Version File Path
Vanilla CIV5Traits ...\Sid Meier's Civilization V\assets\Gameplay\XML\Civilizations
G&K CIV5Traits ...\Sid Meier's Civilization V\assets\DLC\Expansion\Gameplay\XML\Civilizations
G&K CIV5Traits_Expansion ...\Sid Meier's Civilization V\assets\DLC\Expansion\Gameplay\XML\Civilizations
BNW CIV5Traits ...\Sid Meier's Civilization V\assets\DLC\Expansion2\Gameplay\XML\Civilizations
BNW CIV5Traits_Expansion2 ...\Sid Meier's Civilization V\assets\DLC\Expansion2\Gameplay\XML\Civilizations
BNW CIV5Traits_Inherited_Expansion2 ...\Sid Meier's Civilization V\assets\DLC\Expansion2\Gameplay\XML\Civilizations

Once you find a trait that uses that particular column, go into the game text files and search for the trait description using the associated TXT_KEY_ in the <Description> column. The game text files can be found in the following location:

Version File Path
Vanilla CIV5GameTextInfos_Jon ...\Sid Meier's Civilization V\assets\Gameplay\XML\NewText\EN_US
G&K CIV5GameTextInfos_FoR_Scenario ...\Sid Meier's Civilization V\assets\DLC\Expansion\Gameplay\XML\Text\en_US
G&K CIV5GameTextInfos_Jon_Expansion ...\Sid Meier's Civilization V\assets\DLC\Expansion\Gameplay\XML\Text\en_US
G&K CIV5GameTextInfos_Steampunk_Scenario ...\Sid Meier's Civilization V\assets\DLC\Expansion\Gameplay\XML\Text\en_US
G&K CIV5GameTextInfos_Traits_Expansion ...\Sid Meier's Civilization V\assets\DLC\Expansion\Gameplay\XML\Text\en_US
BNW CIV5GameTextInfos_Jon_Expansion2 ...\Sid Meier's Civilization V\assets\DLC\Expansion2\Gameplay\XML\Text\en_US
BNW CIV5GameTextInfos_Jon_Inherited_Expansion2 ...\Sid Meier's Civilization V\assets\DLC\Expansion2\Gameplay\XML\Text\en_US
BNW CIV5GameTextInfos_Traits_Expansion2 ...\Sid Meier's Civilization V\assets\DLC\Expansion2\Gameplay\XML\Text\en_US
BNW CIV5GameTextInfos_ScrambleAfricaScenario ...\Sid Meier's Civilization V\assets\DLC\Expansion2\Gameplay\XML\Text\en_US
BNW CIV5GameTextInfos_Traits_Inherited_Expansion2 ...\Sid Meier's Civilization V\assets\DLC\Expansion2\Gameplay\XML\Text\en_US
 
HOW TO CREATE A NEW ICON ATLAS FOR YOUR CIVILIZATION
If you are like me, you are not much of an artist. You may or may not be familiar with using Photoshop, Paint.Net, and/or GIMP. If you are an accomplished artist, then you probably don&#8217;t need this lesson. Otherwise, sit back, relax, and try to get through this as painlessly as possible.

I have already referenced a couple of good sources for information regarding the art creation process.

whoward69&#8217;s [TUTORIAL] DDS Texture (Image File) Creation and Usage for Beginners
BoomerSooner76&#8217;s (Tutorial) How to add Civ Icons with Gimp 2.

Much of the credit for the information contained here really goes to BoomerSooner76 and Syrinxo for helping me to figure out how to do this in GIMP. I have tried to take what I learned in that thread and convert it for Paint.NET. If you already have and know how to use Photoshop, you can learn to create a professional looking icon of your own by following Irkalla's "Firaxis-Like" Civilization Icon Tutorial.

This tutorial will use Paint.NET because a)it is free and b)I have come to like it better than GIMP. If you do not already have it installed, go to Paint.NET and download the latest version. This tutorial is using version 3.5.10 shown here as it was the latest when this tutorial was first created.



When you have your software installed, start it up and click File -> Open. Navigate to ...Firaxis ModBuddy\MyNewMod\MyNewMod\Art\GameInfo and select the IconAtlasTemplate256.png file. This is a file I created from scratch in Windows Paint based on the one SamBC did for GIMP.

It is 2048x2048. Each icon circle is 172x172 inside of a 256x256 box. This is how the game expects to see your icons. Don't try to use this template with Windows Paint because that program doesn't distinguish the Alpha layer from the color white. You should now see the following in Paint.NET.



The next step is to save this template as a new filename so that we don't inadvertently overwrite our template file. Click File -> Save As. Navigate to ...Firaxis ModBuddy\MyNewMod\MyNewMod\Art\GameInfo and select the MyNewCiv_ColorIconAtlas256.png file. You should see a Save Configuration dialog box. Save it as 8bit, dithering level 8, and a transperancy level of 255.



  1. Now go to the zoom drop down box and select 400%. Scroll all the way left and all the way up until you can see the full upper right hand white circle.
  2. Minimize Paint.NET, go to Windows Explorer, and navigate to the ...Firaxis ModBuddy\MyNewMod\MyNewMod\Art\GameInfo folder. Select the MyNewCivIcon.png file. Drag it down to the Paint.NET icon in the taskbar. Paint.NET should popup. Release the LMB.
  3. You should get the Drag and Drop dialog popup. Click Add Layer.



  1. You should now see the MyNewCivIcon.png image as a new layer floating above your icon atlas background.
  2. The next thing you need to do is click the Move Pixel tool on the Tools palette. Select the icon image and move it until it is roughly centered on the upper left white circle.
  3. Now click the Layer Properties button on the Layers palette, making sure the MyNewCivIcon layer is selected before you do. At the bottom of the Layer Properties dialog box, change the Opacity to around 128 (50%). This should allow you to see the template background through the icon.
  4. Click OK. Using the arrow keys, move the icon one pixel at a time until you have it perfectly centered in the circle. The icon square is 172x172 and the circle is 172px in diameter. You will know it is perfectly centered if moving the square 1px in any of the four directions reveals the outer edge of the circle. In other words, the four sides of the square should be tangent with the circle as shown below.



Now for the somewhat tricky but really cool part.

  1. Click on the icon atlas background layer in the Layers palette.
  2. Select the Magic Wand tool from the Tools palette.
  3. Move the cursor inside the white circle area that is behind the square icon layer. Click to select the inside of the circle.
  4. Now go to Edit -> Invert Selection. Select the icon layer in the Layers palette.
  5. Press the DELETE key. You should now have a nicely cropped circular icon inside the white circle of the template.
  6. Go back to the Layer Properties to set Opacity back to 255.



Now, with the icon layer still selected, go to Layers -> Merge Layer Down. This will combine both layers into a single layer.



Save your work at this point to the MyNewCiv_ColorIconAtlas256.png file. You may have noticed that you have all of those extra white circles that aren't being used. If you are creating a mod that does nothing but add a single civilization, you can use this same icon atlas to store the leader, UB, and UU icons as well. You can then crop the atlas to just have the icons that are actually being used. This will help to cut down on the amount of graphic memory needed to store your artwork while the game is running.

  1. Repeat the procedure above with your leader, UB, and UU icons. For the purposes of this tutorial, the second circle in the first row is used for the leader icon, the third one for the unique building, and the fourth one for the unique unit.
  2. Once you have finished adding these icons, select Image -> Canvas Size.
  3. In the Canvas Size dialog box, make sure Maintain Aspect Ratio is unchecked. Change the width to 1024px and the height to 256px. Click OK.



Now you are ready to begin creating the DDS files that the game will actually use to display your new icon.

  1. Go to File -> Save As and select .dds for the file extension type.
  2. Select the MyNewCiv_ColorIconAtlas256.dds file and click OK.

    Be sure that you don't leave the file extension as .png and/or select the MyNewCiv_ColorIconAtlas256.png file. You will overwrite your 256x256 icons with smaller ones. It is always best to start with the largest icon size and then shrink it down rather than enlarging it from a smaller icon size. It will become pixelated if you start from a smaller size and work your way up instead of down. This is why we don't need to save a .png version of each size. The 256x256 size is the only .png version that we need.

  3. You should get the Save Configuration dialog box. Select A8R8G8B8 and then click OK.
  4. Now go to Image -> Resize. In the Resize dialog box, make sure Maintain Aspect Ratio is checked. Adjust the height of the image to 128. The width will automatically be adjusted to the correct size because we have Maintain Aspect Ratio checked. Click OK.
  5. Go to File -> Save As and make sure.dds is still selected for the file extension type. Select the MyNewCiv_ColorIconAtlas128.dds file and click OK.
  6. At this point you should get the Save Configuration dialog box again. Make sure A8R8G8B8 is still selected and then click OK.



Notice a pattern here? ;) The nice thing about having a single row cropped image like this one is the fact that you don't have to try and remember which canvas size goes with which icon size. In this case, the height will always match the icon size you are creating. So for 80x80 you would change the height to 80 and save the file to MyNewCiv_ColorIconAtlas80.dds. So on and so forth.

If you left your icon atlas size as an image 2048x2048 with 8 rows and 8 columns, then you may want to refer to the following table of icon sizes. This table includes all of the icon types that the game uses. You do not need all of the sizes for some of the icon types but it never hurts to create them anyway. A future version of the game may need them or you might create a custom UI screen that uses a size not normally used by the base game.



When you have finished creating the different DDS icon files, you will need to provide the game with some basic information about them.
 
HOW TO ADD CUSTOM TEXT
NOTE: If you came to this post from outside of the main thread, please be sure to read through the beginning of this tutorial thread The Newbie’s Guide to Modding Civilization 5. Before getting any further into this section of the tutorial, I would recommend you also read through Kael's Modders Guide to Civilization V starting at the bottom of Page 24 through the top of Page 26.

Now that you have finished with the main XML code, you need to define the TXT_KEY entries that you entered previously. These have already been defined in each file of the MyNewMod project for US English, which tends to be the de facto standard language for a lot of mods. For a truly complete mod, you should also add the other languages supported by Civilization 5. This is an area where you might need some help from multilingual modders to come up with an appropriate translation.

To add other languages, you will need to add the other language tables, such as <Language_DE_DE> for German. These can be found in the Text folders ...\assets\DLC\Expansion\Gameplay\XML\Text for G&K or ...\assets\DLC\Expansion2\Gameplay\XML\Text for BNW.

For ease of reference, I have created the table below.
LANGUAGE TABLE TAGS
German <Language_DE_DE></Language_DE_DE>
Spanish <Language_ES_ES></Language_ES_ES>
French <Language_FR_FR></Language_FR_FR>
Italian <Language_IT_IT></Language_IT_IT>
Japanese <Language_JA_JP></Language_JA_JP>
Korea <Language_KO_KR></Language_KO_KR>
Polish <Language_PL_PL></Language_PL_PL>
Russian <Language_RU_RU></Language_RU_RU>

Code:

Code:
 
This all looks great and I cannot wait to try it, but when I am try to open modbuddy, am told I need the Visual studio 2010 isolated shell redistributable, which does not exist. I have downloaded the 2008 version, but that has not worked. I am sure there is an answer somewhere on the forums, I just have not found it.
 
This all looks great and I cannot wait to try it, but when I am try to open modbuddy, am told I need the Visual studio 2010 isolated shell redistributable, which does not exist. I have downloaded the 2008 version, but that has not worked. I am sure there is an answer somewhere on the forums, I just have not found it.

See post 2 in this thread (http://forums.civfanatics.com/showpost.php?p=12379088&postcount=2), it has links to the 2010 version; after the text, "Sometime prior to September 2013, Microsoft removed..."
 
See post 2 in this thread (http://forums.civfanatics.com/showpost.php?p=12379088&postcount=2), it has links to the 2010 version; after the text, "Sometime prior to September 2013, Microsoft removed..."

I appreciate that you are trying to help, but this information was added in response to ronjon's question, so it wasn't there when he posted. I PMed ronjon a couple of days ago with this information.

For everyone, please refrain from posting questions and responses here. I'd like to keep this thread as clean as possible so that people don't have to scroll through a lot of posts that are no longer relevant. I know it's a bit sparse right now, but I intend to add a lot more over time. If you have a question about the tutorial, please PM me. If you have a general modding question that you don't feel is adequately answered here, please post in the main C&C forum as you will probably get a quicker response. Thanks.

Note: As of now the MyNewMod referenced in the tutorial has not been released. I will be including a link to the download location once I have gotten it to a point where I feel comfortable releasing it.
 
Hello,
Escuse me for the message.
Your post is very interessant but can you post the "MyNewMod" please ?
Archerman
 
Sorry, I don't mean to be a total pain, but is there a timeline for when you could upload the MyNewCiv file? I'm somewhat lost without that.
 
sorry for being a little pushy but do have any idea when the MyNewMod file will be available for download? This tutorial is unusable without it.
 
Are there any alternatives to mynewmod?
 
Top Bottom