From Civilization V Wiki
The following is a list of the XML files found in Civilization 5, located in the "<install directory>\assets\Gameplay\XML" directory. Details are provided here so that modders have a reference of the available XML assets and their respective attributes.
This directory contains a wide range of AI configuration files. Things that were only possible by modding the source code in Civilization IV can be easily changed in XML. There are files for city strategies, economic strategies, grand strategies (what sort of victory the AI will pursue), military strategies, tactical moves, diplomacy and general AI defines (for things like how quickly the AI expands, how much it values gold, etc).
This directory covers the definition of all the more mundane game assets. Unit Combat types are defined here, Invisibility types, domains, etc. In general these are simple declarations (just naming a type without any attributes) and they aren't commonly changed by modders. But if you set an invisibility type (for example) on a unit the game needs to have a place where that invisibility type is defined, which it is here.
Much as you would expect the building definitions are held here. There are two files, one for the Building Classes and another for the actual Buildings.
Building Classes are base definitions for buildings, for example a Barracks. But there can be multiple Buildings for a single Building Class. So the Barracks Building Class has two Buildings referenced to it, the Barracks and the Krepost. Allowing multiple buildings to be referenced to one Building Class is the games way to replace buildings for a civilization. So one civilization builds a Krepost instead of a Barracks as a unique building. But since both Barracks and Krepost are associated with the Barracks Building Class the game can simply refer to it as a Building Class Barracks and know that it will get whatever form of the barracks is available for that player.
As an example all civilizations start with a free BUILDINGCLASS_PALACE. If you created a new civilization and gave it a unique palace your new building wouldn't be a BUILDING_PALACE, but would be associated with BUILDINGCLASS_PALACE so that when the free palace was given out your new civilization would get its custom palace instead of the standard one.
Civilizations, Minor Civilizations, Regions and Traits are defined here. Civilizations will probably be one of the first things people want to mod and add to and this document will cover a specific example of that later on.
This is where all the text strings for things like the first greeting, declaration of war, refusal of deals, etc are all linked.
This is where Firaxis stuck everything that doesn't fit anywhere else. The following files and assets are defined here:
- CIV5ArtStyleTypes.xml- The list of the available ArtStyles for cities. This is reference for the civilization definitions. There is very little to add here since it is just a tag for the name.
- CIV5Climates.xml- These are the definitions for the various climate types (arid, cold, temperate, tropical, etc) with variables use by the random map generator to create the world. Though this won't be as flexible as creating a unique mapscript, this is an easy way to allow players to select maps with more or less jungle, forests, mountains, deserts, etc.
- CIV5CultureLevels.xml- This file is obsolete and unused in Civilization V.
- CIV5Cursors.xml- This is a link to the cursor animations that are used by the game. Creating a new cursor set is as easy as adding new .ani files and updating this file with the new link.
- CIV5EmphasizeInfos.xml- This file is obsolete and unused in Civilization V.
- CIV5Eras.xml- In general these are the settings for late game starts (determining how many units you start with, starting gold, if goodie huts should be spawned, etc). But it does contain some attributes for games that reach these eras such as a modifier to improvement build times, free population in new cities and the definition for the city art (so your cities look differently in different eras). The EventChancePerTurn and SoundtrackSpace attributes in this file are obsolete.
- CIV5Flavors.xml- This is a list of tags used in other files for flavor types.
- CIV5ForceControlInfos.xml- This file is obsolete and unused in Civ5.
- CIV5GameOptions.xml- These are the tags for the Game Options (quick combat, raging barbarians, etc).
- CIV5GameSpeeds.xml- This is where the game speeds are defined. They include modifications to the build speed, population growth and improvement growth.
- CIV5GoodyHuts.xml- Contains all the possible goody hut results. The actual chance that each result is returned is based on the difficulty level which is configured in CIV5HandicapInfos.xml.
- CIV5HandicapInfos.xml- This is where the difficulty levels are set. It's a great place to see what changes at the different difficulty levels. In this file we can see that "EarliestBarbarianReleaseTurn" at settler difficulty is 10000. Most modders won't change the difficulty adjustments, but some modders increase the AI's advantage to balance for new mechanics that favor human players. Others may decrease the AI's advantage if they improve the AI enough that it doesn't need the boost.
- CIV5HurryInfos.xml- This is where production rush methods are defined. If you want to modify the amount production given for population sacrifice or the amount of gold per production to gold rush, this is the file to do it in.
- CIV5IconFontMapping.xml- This is the file where the icon assets (such as ICON_BULLET) is mapped to a picture in the icon atlas.
- CIV5IconTextureAtlases.xml- This is where icon atlas's (such as TECH_ATLAS_1) are mapped to specific files (such as TechnologyAtlas.dds). It is useful to see what dds files are mapped to if modders want to change the icons, or if a modder wants to add a new icon atlas.
- CIV5MultiplayerOptions.xml- This is where the multiplayer game options are defined. There are no attributes on these options other than their default state, and text strings. All of the real definition is handled in the source code. Because of that adding a new Multiplayer Option to this file will cause a new option to appear in the selection lists, but it won't do anything.
- CIV5PlayerOptions.xml- This is where all the non-multiplayer game options are defined. Just like the multiplayer game options there aren't any meaningful attributes here. The real effect of having these options enabled or disabled happens in the source code.
- CIV5Policies.xml- This is where all the policies are defined. Policies are all linked to a policy branch here. All aspects of a policy are defined here, though you may have to look through the several tables in this file to get all the information.
- CIV5PolicyBranchTypes.xml- This is where the policy branches are applied. The only real configuration stored on them is if one branch blocks another. Outside of that, they are available for modders to add or remove policy branches that policies set in CIV5Policies.xml can be configured to use.
- CIV5Processes.xml- The build wealth and build research options can be modified in this file if a modder wants to change the ratios.
- CIV5Projects.xml- Projects are defined here. Notice that there is a table defined in schema that isn't being used, Project_ResourceQuantityRequirements, which may allow modders to create some interesting projects.
- CIV5SeaLevels.xml- This file determines the increased probability of ocean tiles based on the players choice of sea levels.
- CIV5SmallAwards.xml- This file is unused in Civ5. It appears to be capable of displaying notifications when thresholds around victory points, number of cities and population are reached.
- CIV5Specialists.xml- This is where the specialists are defined. You can use this file to modify the amount of yields produced by various specialists, add or remove specialists from the game, or change the amount they contribute to various great people.
- CIV5Trades.xml- This file controls the AI weight valuations for trades (what the AI values research, culture and gold at).
- CIV5TurnTimers.xml- These define the turn timers when auto-end turns are set in the multi-player game options.
- CIV5Victories.xml- This is where the victory conditions are defined. In general the victory conditions in Civ5 don't expose much to modding. The domination victory, for example, just has the Conquest element set to true(<Conquest>true</Conquest>). What the Conquest element does is set in the source code, not exposed to XML. But looking closely at schema for this file shows that there is a table defined in schema that isn't being used, VictoryPointAwards. Firaxis has a victory point system integrated and unused in Civ5. A modder can add new Victories that don't have WinsGame set to true and then assign points to them in the VictoryPointsAwards table.
- CIV5Votes.xml- This file is obsolete and unused in Civ5.
- CIV5VoteSources.xml- This file is obsolete and unused in Civ5.
- CIV5Worlds.xml- This is where the world sizes are defined. The grid width and height (how tall and wide the map is) are configured here as are the default players and some tunables. Adding a new map size to this file doesn't work well because most of the map scripts refer to the map sizes by name to set variables. If the new map size isn't one of the names the script accounts for then it won't work correctly.
The definitions for interface modes, colors and player colors are here. Player colors become important if you want to look and see what player color to assign to a new civ you create. A player color is the primary color, the secondary color and the text color for players using that player color. Player color red, for example, has a primary color of red, a secondary color of white and a text color of red. In the colors file is where the colors are defined (as in exactly what "COLOR_RED" is). Firaxis uses this to assign more than just traditional colors, but has color defines for things like COLOR_TECH_TEXT.
This folder is setup differently than the others. Rather than having a common file with all the schema and assets Firaxis has the schema in one file and each leader in their own file. This doesn't affect modability, but it does make it easier to look at all the values specific to a leader, and a bit more difficult to compare values between leaders.
This is where notifications and routes (roads and railroads) are defined. Modders may be interested in changing the yields or movement rate modifier from roads or railroads.
This is where all the text values used in the game are assigned to actual strings. Where TXT_KEY_CIV_ARABIA_DESC is set to decode to "Arabian Empire" for English players. There is a separate directory for German (de_DE), English (EN_US), Spanish (es_ES), French (fr_FR), Italian (it_IT) and Japanese (JA_JP). English modders who want to find out what a specific text value decodes to will want to look in the files in the /XML/NewText/EN_US/ directory.
This is where the technologies are defined. Technologies have GridX and GridY elements. These determine where the tech is displayed on the tech tree. When adding a technology you may need to update the GridX and GridY attributes of other technologies to make room for it in the tech tree.
This is where features (including unique features), improvements, resources, terrains and yields are defined.
Units and anything related to units are defined here, including promotions, builds, missions, formations, etc.
GlobalDefines.xml- Contains the default definitions for a wide range of game settings such as the starting year, initial city population and max buildings per city (defaults to unlimited). Hundreds of game rules changes can be made simply by modifying the values in this file.
- Non-functional XML Fields for cataloguing of fields and tables that are in the schema but do not appear to do anything, work incorrectly, or do things that are just plain weird and useless.