Customizing Difficulty Levels

This guide will teach you how to customize the individual settings for difficulty levels (Settler through Deity).

**Important:** You must be playing with the Community Balance Overhaul mod enabled.

This guide is accurate as of the **6-19 Release version** and later. If you are modifying the file from an earlier version, the information on this page will still be useful, but you may encounter some difficulties if you don't know what you're doing.

## DifficultyMod.xml Overview

* The DifficultyMod.xml file overrides the BNW difficulty settings. The Windows file path is: Documents/My Games/Sid Meier's Civilization 5/MODS/(2) Community Balance Overhaul/Balance Changes/Difficulty/DifficultyMod.xml
* It is divided into 9 different handicaps, also known as difficulty levels. These range from Settler to Deity, along with a special AI\_DEFAULT difficulty, which AI players use.
* Each handicap is divided into 4 sections.
* It is important to note that AI free techs have been removed from all difficulty levels in Vox Populi via the **DifficultyMod.sql** file.

### Handicap Sections

* **Player Bonuses:** Bonuses applying only to human players (AI players use the player bonuses from their special AI\_DEFAULT difficulty).
* **City-State Bonuses:** Bonuses applying only to City-States.
* **AI Bonuses:** Bonuses applying to AI-controlled Civilizations.
* **Barbarians:** Handicap values relating to Barbarians, which generally affect the human player.

## Customizing Difficulty Settings

This section concerns modifying the various difficulty settings for each handicap.

Once you have opened the **DifficultyMod.xml** file, to change a value for a difficulty, you must simply change the number in the appropriate row.

**Caution:** It is advised that you make a backup copy of the file before making changes. This way, they can easily be reverted.

### Example 1: Add a 20% unit maintenance discount for the human player on Chieftain.

1. Find HANDICAP\_PRINCE.
2. Change the UnitCostPercent line to: <UnitCostPercent>80</UnitCostPercent>
3. Save your changes.

### Example 2: Add a starting Worker for human players to all difficulty levels.

1. Find HANDICAP\_SETTLER.
2. Change the StartingWorkerUnits line to: <StartingWorkerUnits>1</StartingWorkerUnits>
3. Repeat steps 1-2 for each handicap up to HANDICAP\_DEITY (but *not* AI\_DEFAULT).
4. Save your changes.

### Example 3: Change the AI to always make optimal choices for City Production, Technology and Social Policy choices on all difficulties (remove randomness).

1. Find HANDICAP\_SETTLER.
2. Change the CityProductionNumOptionsConsidered line to: <CityProductionNumOptionsConsidered>1</CityProductionNumOptionsConsidered>
3. Repeat step 2 for TechNumOptionsConsidered and PolicyNumOptionsConsidered.
4. Repeat steps 1-3 for each handicap up to HANDICAP\_DEITY (but *not* AI\_DEFAULT).
5. Save your changes.

### Notes

* Changes made to one difficulty level will only apply to that difficulty level.
* Changes made to the AI's special AI\_DEFAULT difficulty level will apply to all difficulty levels, but only change this if you know what you're doing.

## Explanation of Settings

This section will explain what the various values you can change do. To see the default values for each of these, please see AI and Difficulty.

***\*** Certain percentage values are marked with an asterisk. For these values, 100 equals normal cost. Values below 100 are discounts, values above 100 are increases.*

*So, 80 would be a 20% discount, 30 would be a 70% discount, 150 would be a 50% increase, etc.*

### Player Bonuses

**StartingLocPercent:** Determines the order in which players are placed on the map at game start. Players with lower StartingLocPercent values are placed on the map before players with higher values (somewhat increasing the odds of obtaining a favorable starting position). If two or more players have the same StartingLocPercent value, the order of placement is determined randomly. Civilizations are always placed on the map before City-States, since the StartingLocPercent value for City-States is multiplied by 10.

**HappinessDefault:** Bonus to Global Happiness from difficulty level.

**HappinessDefaultCapital:** Bonus to the capital's Local Happiness.

**PopulationUnhappinessMod:** Reduces citizen Unhappiness from needs (distress, boredom, etc.) by a %. Negative values reduce Unhappiness, positive values increase it.

**ExtraHappinessPerLuxury:** Bonus to the amount of Global Happiness provided by *each* Luxury Resource.

**StartingPolicyPoints:** Bonus Culture at game start (modified by game speed).

**FreeCulturePerTurn:** Bonus to empire-wide Culture per turn.

**Gold:** Bonus Gold at game start (modified by game speed).

**GoldFreeUnits:** # of units that don't count when calculating unit Gold maintenance.

**ProductionFreeUnits:** Base unit supply. Going above maximum unit supply results in empire-wide Production and Growth penalties.

**ProductionFreeUnitsPerCity:** Base amount of unit supply provided by each owned city.

**ProductionFreeUnitsPopulationPercent:** % of total citizens added to unit supply. (Note that puppet cities will only add half of their total population % modifier, unless you're playing Venice)

**StartingDefenseUnits:** # of *extra* Warrior (or era equivalent) Units that the player starts the game with, in addition to the one they normally start with.

**StartingExploreUnits:** # of *extra* Pathfinder (or era equivalent) Units that the player starts the game with, in addition to the one they normally start with.

**StartingWorkerUnits:** # of *extra* Worker Units that the player starts the game with.

**\*RouteCostPercent:** Percentage discount on Gold maintenance for tile improvements (roads/railroads).

**\*UnitCostPercent:** Percentage discount on Gold maintenance for Units.

**\*BuildingCostPercent:** Percentage discount on Gold maintenance for Buildings.

**\*ImprovementCostPercent:** Percentage discount on the amount of time required for Workers to construct Improvements.

**\*PolicyPercent:** Percentage discount on the Culture cost of Social Policies.

**\*ResearchPercent:** Percentage discount on the Science cost of Technologies.

**ResistanceCap:** The maximum % bonus to Combat Strength/Ranged Combat Strength for anti-warmonger fervor that other players can obtain against this player.

### City-State Bonuses

**StartingMinorDefenseUnits:** # of Warrior (or era equivalent) Units that City-States start the game with.

### AI Bonuses

**CityProductionNumOptionsConsidered:** The AI will randomly pick between the top X choices when choosing City Production, where X is the value of CityProductionNumOptionsConsidered.

**TechNumOptionsConsidered:** The AI will randomly pick between the top X choices when choosing Technologies, where X is the value of TechNumOptionsConsidered.

**PolicyNumOptionsConsidered:** The AI will randomly pick between the top X choices when choosing Social Policies, where X is the value of PolicyNumOptionsConsidered.

**AttitudeChange:** Affects the AI's diplomatic Opinion score towards human players, making diplomacy easier or harder. Positive values increase Opinion, negative values decrease Opinion. Not currently used, but can be enabled by the player.

**AIDeclareWarProb:** This value affects AI hostility towards human players *who are close to a victory condition ONLY.* Higher values make the AI more aggressive and lower DoF/DP willingness in the lategame.

**AIStartingDefenseUnits:** # of *extra* Warrior (or era equivalent) Units that AI civilizations start the game with, in addition to the one they normally start with.

**AIStartingExploreUnits:** # of *extra* Pathfinder (or era equivalent) Units that AI civilizations start the game with, in addition to the one they normally start with.

**AIStartingWorkerUnits:** # of *extra* Worker Units that AI civilizations start the game with.

**AIStartingUnitMultiplier:** # of *extra* Settler Units that AI civilizations start the game with, in addition to the one they normally start with.

**AIWorkRateModifier:** % bonus to AI Worker speed when constructing/repairing Improvements or scrubbing fallout. At a value of 100, they work twice as fast as normal.

**AIUnhappinessPercent:** Reduces citizen Unhappiness from needs (distress, boredom, etc.) for AI civilizations by a %. Negative values reduce Unhappiness, positive values increase it.

**\*AIGrowthPercent:** Percentage discount on the amount of Food required for AI cities to grow.

**\*AIUnitCostPercent:** Percentage discount on AI Gold maintenance for Units.

**\*AIBuildingCostPercent:** Percentage discount on AI Gold maintenance for Buildings.

**\*AIUnitUpgradePercent:** Percentage discount on the Gold cost for AI Units to upgrade.

**\*AICreatePercent:** Percentage discount on the base Production cost of certain projects, such as the Apollo Project. This does NOT apply to processes like Arts, Research or Wealth.

**\*AIWorldConstructPercent:** Percentage discount on Production cost of World Wonders.

**\*AIWorldCreatePercent:** Percentage discount on the Production cost of World Congress projects.

**AIFreeXP:** Amount of extra XP that all AI military Units start with (this can result in free promotions).

**AIFreeXPPercent:** % bonus to the amount of XP that AI military Units gain from combat. 100 = twice as much XP.

**VisionBonus:** Extra Sight bonus for all AI Units (in # tiles). Sight can still be blocked by hills, forests, etc. This bonus is NOT given to units that gain XP from revealing tiles (i.e. scouts).

#### Per Era Bonuses

**\*AITrainPercent:** Discount on the base Production cost of Units for the AI. Reduced by AIPerEraModifier every era.

**\*AIConstructPercent:** Discount on the base Production cost of Buildings for the AI. Reduced by AIPerEraModifier every era.

**AIUnitSupplyPercent:** % bonus to total AI unit supply cap. Increased by AIPerEraModifier every era. This bonus is not given to AI teammates of human players.

**AIPerEraModifier:** Increases the bonuses above based on era. 0 means no change, -1 means -1% of Production costs and +1% unit supply for every era, and so on. Be careful with this one! Note that the AIPerEraModifier's effect on Production costs is multiplicative with AITrain/ConstructPercent (i.e. the base discount is applied first, and the AIPerEraModifier is a percentage reduction of the *reduced* cost, not the base cost).

#### CBP Difficulty Bonus

These values control the amount of bonus yields the AI gains when founding/conquering Cities or triggering Historic Events. The full details of this function can be found here.

**DifficultyBonusBase:** Multiplier on the amount of total yields gained. If 0, no bonus yields are gained.

**DifficultyBonusA:** The "early game bonus".

**DifficultyBonusB:** The "mid game bonus". In the yield function, it is multiplied by the current era.

**DifficultyBonusC:** The "late game bonus". In the yield function, it is multiplied by the current era squared (era^2).

### Barbarians

**EarliestBarbarianReleaseTurn:** The # of turns that must pass before Barbarians can enter the human player's lands.

**BarbarianBonus:** % bonus to player Combat Strength/Ranged Combat Strength VS Barbarians.

**AIBarbarianBonus:** % bonus to AI Combat Strength/Ranged Combat Strength VS Barbarians.

**BarbCampGold:** Gold bonus from clearing a Barbarian encampment (modified by game speed).

**BarbSpawnMod:** Delays spawns from Barbarian encampments by X turns (modified by game speed).

**BarbarianLandTargetRange:** Maximum distance for the Barbarian land unit pathfinder when searching for visible targets. This is measured in estimated turns (i.e. a range of 3 means the Barbarian unit will search for targets it can reach within 3 turns).

**BarbarianSeaTargetRange:** Maximum distance for the Barbarian naval unit pathfinder when searching for visible targets. This is measured in estimated turns (i.e. a range of 3 means the Barbarian unit will search for targets it can reach within 3 turns).

## Notes

1. ↑ The penalty does not apply on a player's own territory, and is halved in neutral territory (any territory that doesn't belong to the attacker or the defender). It is tied to the player's warmonger penalty score and decays over time. AI players have a value of 50% for this, which can be edited by changing HANDICAP\_AI\_DEFAULT.