Civ 5 CBP Wikia

The difficulty bonuses in the Community Patch are largely unchanged, but the rest of Vox Populi change difficulty bonuses greatly, as described below.

The information listed below is accurate as of the 3.0.4 release version.

Difficulty Level[]

Human Player Bonuses[]

Bonus Meaning Settler Chieftain Warlord Prince King Emperor Immortal Deity
MapPlacementPriority Determines the order in which players are placed on the map at game start[1] 1 2 3 3 3 3 3 3
HappinessDefault Global happiness bonus 9 8 8 7 7 7 6 5
HappinessDefaultCapital Local happiness bonus for the capital 3 3 2 2 2 1 1 1
ExtraHappinessPerLuxury Extra global happiness per owned Luxury Resource 1 0 0 0 0 0 0 0
PopulationUnhappinessMod % reduction to citizen happiness need modifiers -30 -15 0 0 0 0 0 0
MaintenanceFreeUnits Number of units that don't cost Gold maintenance 3 1 0 0 0 0 0 0
UnitSupplyBase Base unit supply[2] 10 9 8 8 8 7 6 6
UnitSupplyPerCity Amount added to unit supply for each city 1 1 1 1 1 1 1 1
UnitSupplyPopulationPercent % of total population added to unit supply[3] 35 30 25 20 20 15 15 15
StartingDefenseUnits Bonus Warriors (or era equivalent unit) at game start 1 1 0 0 0 0 0 0
ImprovementCostPercent Discount on road/railroad maintenance 60 80 100 100 100 100 100 100
UnitCostPercent Discount on unit maintenance 75 90 100 100 100 100 100 100
BuildingCostPercent Discount on building maintenance 75 90 100 100 100 100 100 100
ResearchPercent Discount on technology cost 90 95 100 100 100 100 100 100
PolicyPercent Discount on policy/tenet cost 80 90 100 100 100 100 100 100
ResistanceCap Maximum[4] CS/RCS bonus (%) to enemy units from this player's warmongering penalties 16 24 32 40 50 55 65 75

AI Player Bonuses[]

Bonus Meaning Settler Chieftain Warlord Prince King Emperor Immortal Deity
AIHappinessDefault Global happiness bonus 8 8 8 8 8 8 8 8
AIHappinessDefaultCapital Local happiness bonus for the capital 2 2 2 2 2 2 2 2
AIUnitSupplyBase Base unit supply[2] 8 8 8 8 8 8 8 8
AIUnitSupplyPerCity Amount added to unit supply for each city 1 1 1 1 1 1 1 1
AIUnitSupplyPopulationPercent % of total population added to unit supply[3] 25 25 25 25 25 25 25 25
AIStartingDefenseUnits Bonus Warriors (or era equivalent unit) at game start 0 0 0 1 1 1 1 1
AIWorkRateModifier % bonus to Worker tile improvement speed 0 0 0 25 35 50 60 70
AIBuildingCostPercent Discount on building maintenance 100 100 100 90 85 80 75 70
AIUnitCostPercent Discount on unit maintenance 100 100 100 90 85 80 75 70
AIUnitUpgradePercent Discount on unit upgrade costs[5] 100 100 100 90 80 70 60 50
AICivilianPercent Modifies Production cost of non-combat units 110 105 100 100 100 100 100 100
AITrainPercent Modifies Production cost of combat units 110 105 100 90 85 80 75 70
AITrainPerEraModifier Additional modifier per era[6] 0 0 0 -4 -6 -8 -9 -10
AIConstructPercent Modifies Production cost of buildings (except World Wonders) 110 105 100 90 85 80 75 70
AIConstructPerEraModifier Additional modifier per era[6] 0 0 0 -4 -6 -8 -9 -10
AIWorldConstructPercent Modifies Production cost of World Wonders and World Projects 110 105 100 100 100 100 100 100
AICreatePercent Modifies Production cost of Projects 110 105 100 90 85 80 75 70
AICreatePerEraModifier Additional modifier per era[6] 0 0 0 -4 -6 -8 -9 -10
AIWorldCreatePercent Modifies amount of Production required for World Congress Projects[7] 110 105 100 100 100 100 100 100
AIFreeXP Free XP given to new units, modified by game speed[8] 0 0 0 10 15 20 25 30
AIFreeXPPercent Extra XP earned from combat (%) 0 0 0 20 40 60 80 100
AIResistanceCap Maximum[4] CS/RCS bonus (%) to enemy units from this player's warmongering penalties 64 48 32 40 50 50 50 50
AIVisionBonus Extra sight[9] for AI units (# tiles) 0 0 0 0 0 0 1 2
AIDifficultyBonusBase See AI Periodic Yield Bonuses, below 0 0 0 4 7 10 12 14
AIDifficultyBonusA See below 0 0 0 320 335 350 360 375
AIDifficultyBonusB See below 0 0 0 190 210 230 240 260
AIDifficultyBonusC See below 0 0 0 100 123 145 160 180

City-State Bonuses[]

Bonus Meaning Settler Chieftain Warlord Prince King Emperor Immortal Deity
StartingCityStateDefenseUnits Bonus Warriors (or era equivalent unit) at game start 0 0 1 1 2 2 3 3
CityStateGrowthPercent Discount on Food required for cities to grow 75 75 75 75 75 75 75 75
CityStateTrainPercent Discount on Production cost of combat units 100 100 100 90 85 80 75 70
CityStateTrainPerEraModifier Additional discount per era[6] 0 0 0 -4 -6 -8 -9 -10
CityStateConstructPercent Discount on Production cost of buildings 100 100 100 90 85 80 75 70
CityStateConstructPerEraModifier Additional discount per era[6] 0 0 0 -4 -6 -8 -9 -10
CityStateCreatePercent Discount on Production cost of projects[10] 100 100 100 90 85 80 75 70
CityStateCreatePerEraModifier Additional discount per era[6] 0 0 0 -4 -6 -8 -9 -10
CityStateFreeXP Free XP given to new units, modified by game speed[8] 0 0 0 10 15 20 25 30
CityStateFreeXPPercent Extra XP earned from combat (%) 0 0 0 20 40 60 80 100
CityStateVisionBonus Extra sight[9] for City-State units (# tiles) 0 0 0 0 0 0 1 2

Barbarian Bonuses[]

Bonus Meaning Settler Chieftain Warlord Prince King Emperor Immortal Deity
EarliestBarbarianReleaseTurn Game turn when barbarians gain the ability to cross player borders and spawn inside player cities[11] 50 47 44 41 38 35 32 30
BonusVSBarbarians Extra CS/RCS % vs barbarians for human players 50 33 20 20 10 10 0 0
AIBonusVSBarbarians Extra CS/RCS % vs barbarians for AI players 0 10 20 20 25 25 30 30
BarbarianCampGold Gold given to human players when clearing an encampment[12] 50 50 50 50 50 50 50 50
AIBarbarianCampGold Gold given to AI players when clearing an encampment[12] 50 50 50 50 50 50 50 50
BarbarianLandTargetRange Maximum range for Barbarian land unit target search[13] 3 4 5 5 5 6 6 7
BarbarianSeaTargetRange Maximum range for Barbarian naval unit target search[13] 6 7 8 8 8 9 9 10

AI Behavior Modifiers[]

Modifier Meaning Settler Chieftain Warlord Prince King Emperor Immortal Deity
CityProductionChoiceCutoffThreshold % of the top score that a city production choice must have in order to be considered[14] 90 90 90 90 90 90 90 90
TechChoiceCutoffThreshold % of the top score that a tech choice must have in order to be considered[14] 90 90 90 90 90 90 90 90
PolicyChoiceCutoffThreshold % of the top score that a policy choice must have in order to be considered[14][15] 90 90 90 90 90 90 90 90
BeliefChoiceCutoffThreshold % of the top score that a belief choice must have in order to be considered[14] 90 90 90 90 90 90 90 90
TacticalOffenseMinCompletedPositions Tactical AI search depth (offensive moves) 17 17 23 23 23 23 23 23
TacticalOffenseMaxCompletedPositions Tactical AI search depth (offensive moves) 23 23 54 54 54 54 54 54
TacticalOffenseMaxBranches Tactical AI search depth (offensive moves) 3 3 5 5 5 5 5 5
TacticalOffenseMaxChoicesPerUnit Tactical AI search depth (offensive moves) 3 3 5 5 5 5 5 5
TacticalDefenseMinCompletedPositions Tactical AI search depth (defensive moves) 7 7 13 13 13 13 13 13
TacticalDefenseMaxCompletedPositions Tactical AI search depth (defensive moves) 23 23 54 54 54 54 54 54
TacticalDefenseMaxBranches Tactical AI search depth (defensive moves) 2 2 3 3 3 3 3 3
TacticalDefenseMaxChoicesPerUnit Tactical AI search depth (defensive moves) 2 2 3 3 3 3 3 3
LandDisputePercent % of base territorial dispute diplomacy weight[16][17][18] 50 60 70 80 90 100 115 125
WonderDisputePercent % of base World Wonder competition diplomacy weight[17][18] 50 60 70 80 90 100 115 125
MinorCivDisputePercent % of base City-State Influence competition diplomacy weight[17][18] 50 60 70 80 90 100 115 125
VictoryDisputePercent % of base victory competition (same victory condition) diplomacy weight[18][19] 50 60 80 90 110 125 134 150
VictoryDisputeMod Increases AI enmity for victory competition (same victory condition)[18][20] 1 1 2 2 2 2 3 3
VictoryBlockPercent % of base victory competition (different victory condition) diplomacy weight[18][19] 50 60 80 90 110 125 134 150
VictoryBlockMod Increases AI enmity for victory competition (different victory condition)[18][20] 2 2 2 3 3 4 4 5
WonderBlockPercent % of base World Wonder spamming diplomacy weight[17][18] 50 60 80 90 110 125 134 150
WonderBlockMod Changes the threshold before a player is considered a "World Wonder spammer" -2 -2 -2 -1 -1 0 0 0
TechBlockPercent % of base tech count lead diplomacy weight[17][18] 50 60 80 90 110 125 134 150
TechBlockMod Increases AI enmity for tech count lead[18][20] 2 2 2 3 3 4 4 5
PolicyBlockPercent % of base policy count lead diplomacy weight[17][18] 50 60 80 90 110 125 134 150
PolicyBlockMod Increases AI enmity for policy count lead[18][20] 1 1 2 2 2 2 3 3
PeaceTreatyDampenerTurns Number of non-aggression turns after signing a Peace Treaty[21] 20 20 20 18 16 14 12 11
HumanStrengthPerceptionMod % increase to human players' perceived military strength[18][22] 0 5 10 15 20 25 30 35
AggressionIncrease Increases AI aggression if the player's Opinion score is negative, and increases expansion desire[18] 0 2 4 6 9 12 14 16
HumanOpinionChange Diplomacy bonus or penalty to the AI's Opinion score for human players.[18][23] -10 -5 0 0 0 0 0 0

AI Periodic Yield Bonuses[]

When playing on difficulty levels higher than Warlord, the AI receives bonus yields periodically upon triggering certain events, in an effort to match increasingly skilled human players. These bonus yields scale exponentially with era, beginning in the Medieval Era, and are much higher in later eras. Successful AI players will tend to trigger yield bonuses more often and as a result become more difficult opponents for others to take on.

An AI civilization receives bonus yields when it achieves any of the following:

  • Enters a new era (3x normal bonus; Food, Gold, Golden Age Points, Science, Culture)
  • Founds its original capital (Gold, Golden Age Points)
  • Founds a new city, other than its capital (Food, Gold, Golden Age Points, Science, Culture)
  • Wins a war (warscore 25+) (Food, Gold, Golden Age Points, Science, Culture)
  • Starts a Golden Age (Food, Gold, Science, Culture)
  • Constructs a World Wonder (Gold, Golden Age Points)
  • Generates a Great Person (Gold, Golden Age Points)
  • Completes an antiquity site dig by building a Landmark or extracting an artifact (Gold)
  • Completes a trade route to another civilization or City-State (Gold)

The types of yields received by the AI differ based on the trigger for the event, and are listed above. Bonus Gold, Golden Age Points, Science and Culture yields are applied once at the empire level, whereas bonus Food yields are divided equally between the cities in the AI's empire, with any remainder going to the capital.

The specific amount of yields received is based on the formula below, with the following outside variables:

  • iEra is the game (average) era among all major civilizations[24]. It is 1 in Ancient/Classical, 2 in Medieval, 3 in Renaissance and so on.
  • iHandicapBase, iHandicapA, iHandicapB, and iHandicapC are defined in the DifficultyMod.xml file, and are listed above. iHandicapBase is effectively a multiplier on the total number of yields received.
  • InstantYieldPercent is 50 on Quick speed, 100 on Standard, 150 on Epic, and 200 on Marathon.

Finally the formula:

void CvPlayer::DoDifficultyBonus(HistoricEventTypes eHistoricEvent)
{
	if (!isAlive() || !isMajorCiv())
		return;

	int iEra = GC.getGame().getCurrentEra();
	if (iEra <= 0)
		iEra = 1;

	// First do the human difficulty bonus
	// [...] omitted for this wiki excerpt

	if (isHuman())
		return;

	// Now do the AI difficulty bonus
	pHandicapInfo = GC.getHandicapInfo(GC.getGame().getHandicapType());
	if (pHandicapInfo)
	{
		int iHandicapBase = pHandicapInfo->getAIDifficultyBonusBase();
		int iHandicapA = pHandicapInfo->getAIDifficultyBonusEarly();
		int iHandicapB = pHandicapInfo->getAIDifficultyBonusMid();
		int iHandicapC = pHandicapInfo->getAIDifficultyBonusLate();
		int iYieldHandicap = iHandicapBase * ((iHandicapC * iEra * iEra) + (iHandicapB * iEra) + iHandicapA) / 100;
		int iUnscaledYieldHandicap = iYieldHandicap;
		iYieldHandicap *= GC.getGame().getGameSpeedInfo().getInstantYieldPercent();
		iYieldHandicap /= 100;

		if (iYieldHandicap > 0)
		{
			CvString strLogString, strTemp;
			strLogString.Format("VP AI DIFFICULTY BONUS FROM ");

			switch (eHistoricEvent)
			{
			case HISTORIC_EVENT_ERA_CHANGE:
				strTemp.Format("HISTORIC EVENT: ERA - Received Handicap Bonus");
				break;
			case HISTORIC_EVENT_WORLD_WONDER:
				strTemp.Format("HISTORIC EVENT: WORLD WONDER - Received Handicap Bonus");
				break;
			case HISTORIC_EVENT_GREAT_PERSON:
				strTemp.Format("HISTORIC EVENT: GREAT PERSON - Received Handicap Bonus");
				break;
			case HISTORIC_EVENT_WON_WAR:
				strTemp.Format("HISTORIC EVENT: WAR - Received Handicap Bonus");
				break;
			case HISTORIC_EVENT_GOLDEN_AGE:
				strTemp.Format("HISTORIC EVENT: GOLDEN AGE - Received Handicap Bonus");
				break;
			case HISTORIC_EVENT_DIG:
				strTemp.Format("HISTORIC EVENT: DIG - Received Handicap Bonus");
				break;
			case HISTORIC_EVENT_TRADE_LAND:
				strTemp.Format("HISTORIC EVENT: TRADE ROUTE (LAND) - Received Handicap Bonus");
				break;
			case HISTORIC_EVENT_TRADE_SEA:
				strTemp.Format("HISTORIC EVENT: TRADE ROUTE (SEA) - Received Handicap Bonus");
				break;
			case HISTORIC_EVENT_TRADE_CS:
				strTemp.Format("HISTORIC EVENT: TRADE ROUTE (CITY-STATE) - Received Handicap Bonus");
				break;
			case HISTORIC_EVENT_CITY_FOUND_CAPITAL:
				strTemp.Format("HISTORIC EVENT: CAPITAL FOUNDING - Received Handicap Bonus");
				break;
			case HISTORIC_EVENT_CITY_FOUND:
				strTemp.Format("HISTORIC EVENT: CITY FOUNDING - Received Handicap Bonus");
				break;
			case HISTORIC_EVENT_CITY_CONQUEST:
				strTemp.Format("HISTORIC EVENT: CITY CONQUEST - Received Handicap Bonus");
				break;
			case HISTORIC_EVENT_PLAYER_TURNS_PASSED:
				strTemp.Format("HISTORIC EVENT: %d TURNS PASSED - Received Handicap Bonus", pHandicapInfo->getDifficultyBonusTurnInterval());
				break;
			case HISTORIC_EVENT_AI_TURNS_PASSED:
				strTemp.Format("HISTORIC EVENT: %d TURNS PASSED - Received Handicap Bonus", pHandicapInfo->getAIDifficultyBonusTurnInterval());
				break;
			default:
				return;
			}
			strLogString += strTemp;

			bool bSeparateYieldTypes = false;
			int iCommonMultiplier = -1;
			vector<YieldTypes> vYields;
			for (int iYieldLoop = 0; iYieldLoop < NUM_YIELD_TYPES; iYieldLoop++)
			{
				YieldTypes eYield = (YieldTypes)iYieldLoop;
				int iMultiplier = pHandicapInfo->getYieldMultiplierForAIDifficultyBonus(eHistoricEvent, eYield);
				if (iMultiplier <= 0)
					continue;
				else if (eYield == YIELD_POPULATION) // Pop boosts use a different formula than other yields, so always show individual yield gains
				{
					bSeparateYieldTypes = true;
				}
				else if (!bSeparateYieldTypes && iMultiplier != iCommonMultiplier)
				{
					if (iCommonMultiplier == -1)
						iCommonMultiplier = iMultiplier;
					else
						bSeparateYieldTypes = true;
				}

				// Is this a supported yield type?
				switch (eYield)
				{
				case YIELD_FOOD:
				case YIELD_PRODUCTION:
				case YIELD_GOLD:
				case YIELD_CULTURE:
				case YIELD_SCIENCE:
				case YIELD_FAITH:
				case YIELD_GOLDEN_AGE_POINTS:
				case YIELD_TOURISM:
				case YIELD_GREAT_GENERAL_POINTS:
				case YIELD_GREAT_ADMIRAL_POINTS:
				case YIELD_POPULATION:
				case YIELD_CULTURE_LOCAL:
					vYields.push_back(eYield);
					break;
				default:
					break;
				}
			}

			if (!vYields.empty())
			{
				bool bFirstYield = true;
				if (bSeparateYieldTypes)
				{
					strTemp.Format(": ");
				}
				else
				{
					strTemp.Format(" (%d in Yields): ", max(1, iYieldHandicap * iCommonMultiplier / 100));
				}
				strLogString += strTemp;

				// Food
				int iMultiplier = bSeparateYieldTypes ? pHandicapInfo->getYieldMultiplierForAIDifficultyBonus(eHistoricEvent, YIELD_FOOD) : iCommonMultiplier;
				if (std::find(vYields.begin(), vYields.end(), YIELD_FOOD) != vYields.end())
				{
					int iFood = max(1, iYieldHandicap * iMultiplier / 100);

					// How many valid cities can we divide this yield amongst?
					vector<int> vValidCities;
					int iLoop = 0;
					for (CvCity* pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
					{
						// Skip puppets, unless Venice.
						if (CityStrategyAIHelpers::IsTestCityStrategy_IsPuppetAndAnnexable(pLoopCity))
							continue;

						// Skip resistance or razing cities.
						if (pLoopCity->IsResistance() || pLoopCity->IsRazing())
							continue;

						vValidCities.push_back(pLoopCity->GetID());
					}
					if (vValidCities.size() > 0)
					{
						int iFoodPerCity = iFood / vValidCities.size();
						int iFoodRemainder = iFood - (iFoodPerCity * vValidCities.size());
						if (iFoodPerCity <= 0)
							iFoodPerCity = 1;

						for (std::vector<int>::iterator it = vValidCities.begin(); it != vValidCities.end(); it++)
						{
							CvCity* pCity = getCity(*it);
							if (pCity->isCapital())
								pCity->changeFood(iFoodPerCity + iFoodRemainder);
							else
								pCity->changeFood(iFoodPerCity);
						}

						if (bSeparateYieldTypes)
						{
							strTemp.Format("FOOD (%d; %d cities, %d per city)", iFood, vValidCities.size(), iFoodPerCity);
						}
						else
						{
							strTemp.Format("FOOD (%d cities, %d per city)", vValidCities.size(), iFoodPerCity);
						}
						strLogString += strTemp;
						bFirstYield = false;
					}
				}

				// Production
				iMultiplier = bSeparateYieldTypes ? pHandicapInfo->getYieldMultiplierForAIDifficultyBonus(eHistoricEvent, YIELD_PRODUCTION) : iCommonMultiplier;
				if (std::find(vYields.begin(), vYields.end(), YIELD_PRODUCTION) != vYields.end())
				{
					int iProduction = max(1, iYieldHandicap * iMultiplier / 100);

					// How many valid cities can we divide this yield amongst?
					vector<int> vValidCities;
					int iLoop = 0;
					for (CvCity* pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
					{
						// Skip puppets, unless Venice.
						if (CityStrategyAIHelpers::IsTestCityStrategy_IsPuppetAndAnnexable(pLoopCity))
							continue;

						// Skip resistance or razing cities.
						if (pLoopCity->IsResistance() || pLoopCity->IsRazing())
							continue;

						vValidCities.push_back(pLoopCity->GetID());
					}
					if (vValidCities.size() > 0)
					{
						int iProductionPerCity = iProduction / vValidCities.size();
						int iProductionRemainder = iProduction - (iProductionPerCity * vValidCities.size());
						if (iProductionPerCity <= 0)
							iProductionPerCity = 1;

						for (std::vector<int>::iterator it = vValidCities.begin(); it != vValidCities.end(); it++)
						{
							CvCity* pCity = getCity(*it);
							if (pCity->isCapital())
								pCity->changeProduction(iProductionPerCity + iProductionRemainder);
							else
								pCity->changeProduction(iProductionPerCity);
						}

						if (!bFirstYield)
						{
							strTemp.Format(", ");
							strLogString += strTemp;
						}
						if (bSeparateYieldTypes)
						{
							strTemp.Format("PRODUCTION (%d; %d cities, %d per city)", iProduction, vValidCities.size(), iProductionPerCity);
						}
						else
						{
							strTemp.Format("PRODUCTION (%d cities, %d per city)", vValidCities.size(), iProductionPerCity);
						}
						strLogString += strTemp;
						bFirstYield = false;
					}
				}

				// Gold
				iMultiplier = bSeparateYieldTypes ? pHandicapInfo->getYieldMultiplierForAIDifficultyBonus(eHistoricEvent, YIELD_GOLD) : iCommonMultiplier;
				if (std::find(vYields.begin(), vYields.end(), YIELD_GOLD) != vYields.end())
				{
					int iGold = max(1, iYieldHandicap * iMultiplier / 100);
					GetTreasury()->ChangeGold(iGold);

					if (!bFirstYield)
					{
						strTemp.Format(", ");
						strLogString += strTemp;
					}
					if (bSeparateYieldTypes)
					{
						strTemp.Format("GOLD (%d)", iGold);
					}
					else
					{
						strTemp.Format("GOLD");
					}
					strLogString += strTemp;
					bFirstYield = false;
				}

				// Golden Age Points
				iMultiplier = bSeparateYieldTypes ? pHandicapInfo->getYieldMultiplierForAIDifficultyBonus(eHistoricEvent, YIELD_GOLDEN_AGE_POINTS) : iCommonMultiplier;
				if (std::find(vYields.begin(), vYields.end(), YIELD_GOLDEN_AGE_POINTS) != vYields.end())
				{
					int iGAP = max(1, iYieldHandicap * iMultiplier / 100);
					ChangeGoldenAgeProgressMeter(iGAP);

					if (!bFirstYield)
					{
						strTemp.Format(", ");
						strLogString += strTemp;
					}
					if (bSeparateYieldTypes)
					{
						strTemp.Format("GAP (%d)", iGAP);
					}
					else
					{
						strTemp.Format("GAP");
					}
					strLogString += strTemp;
					bFirstYield = false;
				}

				// Culture
				iMultiplier = bSeparateYieldTypes ? pHandicapInfo->getYieldMultiplierForAIDifficultyBonus(eHistoricEvent, YIELD_CULTURE) : iCommonMultiplier;
				if (std::find(vYields.begin(), vYields.end(), YIELD_CULTURE) != vYields.end())
				{
					int iCulture = max(1, iYieldHandicap * iMultiplier / 100);
					changeJONSCulture(iCulture);

					if (!bFirstYield)
					{
						strTemp.Format(", ");
						strLogString += strTemp;
					}
					if (bSeparateYieldTypes)
					{
						strTemp.Format("CULTURE (%d)", iCulture);
					}
					else
					{
						strTemp.Format("CULTURE");
					}
					strLogString += strTemp;
					bFirstYield = false;
				}

				// Science
				iMultiplier = bSeparateYieldTypes ? pHandicapInfo->getYieldMultiplierForAIDifficultyBonus(eHistoricEvent, YIELD_SCIENCE) : iCommonMultiplier;
				if (std::find(vYields.begin(), vYields.end(), YIELD_SCIENCE) != vYields.end())
				{
					int iScience = max(1, iYieldHandicap * iMultiplier / 100);
					TechTypes eCurrentTech = GetPlayerTechs()->GetCurrentResearch();
					if (eCurrentTech == NO_TECH)
					{
						changeOverflowResearch(iScience);
					}
					else
					{
						GET_TEAM(getTeam()).GetTeamTechs()->ChangeResearchProgress(eCurrentTech, iScience, GetID());
					}

					if (!bFirstYield)
					{
						strTemp.Format(", ");
						strLogString += strTemp;
					}
					if (bSeparateYieldTypes)
					{
						strTemp.Format("SCIENCE (%d)", iScience);
					}
					else
					{
						strTemp.Format("SCIENCE");
					}
					strLogString += strTemp;
					bFirstYield = false;
				}

				// Faith
				iMultiplier = bSeparateYieldTypes ? pHandicapInfo->getYieldMultiplierForAIDifficultyBonus(eHistoricEvent, YIELD_FAITH) : iCommonMultiplier;
				if (std::find(vYields.begin(), vYields.end(), YIELD_FAITH) != vYields.end())
				{
					int iFaith = max(1, iYieldHandicap * iMultiplier / 100);
					ChangeFaith(iFaith);

					if (!bFirstYield)
					{
						strTemp.Format(", ");
						strLogString += strTemp;
					}
					if (bSeparateYieldTypes)
					{
						strTemp.Format("FAITH (%d)", iFaith);
					}
					else
					{
						strTemp.Format("FAITH");
					}
					strLogString += strTemp;
					bFirstYield = false;
				}

				// Tourism
				iMultiplier = bSeparateYieldTypes ? pHandicapInfo->getYieldMultiplierForAIDifficultyBonus(eHistoricEvent, YIELD_TOURISM) : iCommonMultiplier;
				if (std::find(vYields.begin(), vYields.end(), YIELD_TOURISM) != vYields.end())
				{
					int iTourism = max(1, iYieldHandicap * iMultiplier / 100);
					GetCulture()->AddTourismAllKnownCivsWithModifiers(iTourism);

					if (!bFirstYield)
					{
						strTemp.Format(", ");
						strLogString += strTemp;
					}
					if (bSeparateYieldTypes)
					{
						strTemp.Format("TOURISM TO MET CIVS (%d; modifiers apply)", iTourism);
					}
					else
					{
						strTemp.Format("TOURISM TO MET CIVS (modifiers apply)");
					}
					strLogString += strTemp;
					bFirstYield = false;
				}

				// Great General Points
				iMultiplier = bSeparateYieldTypes ? pHandicapInfo->getYieldMultiplierForAIDifficultyBonus(eHistoricEvent, YIELD_GREAT_GENERAL_POINTS) : iCommonMultiplier;
				if (std::find(vYields.begin(), vYields.end(), YIELD_GREAT_GENERAL_POINTS) != vYields.end())
				{
					int iGGPoints = max(1, iYieldHandicap * iMultiplier / 100);
					changeCombatExperienceTimes100(iGGPoints * 100);

					if (!bFirstYield)
					{
						strTemp.Format(", ");
						strLogString += strTemp;
					}
					if (bSeparateYieldTypes)
					{
						strTemp.Format("G GENERAL POINTS (%d)", iGGPoints);
					}
					else
					{
						strTemp.Format("G GENERAL POINTS");
					}
					strLogString += strTemp;
					bFirstYield = false;
				}

				// Great Admiral Points
				iMultiplier = bSeparateYieldTypes ? pHandicapInfo->getYieldMultiplierForAIDifficultyBonus(eHistoricEvent, YIELD_GREAT_ADMIRAL_POINTS) : iCommonMultiplier;
				if (std::find(vYields.begin(), vYields.end(), YIELD_GREAT_ADMIRAL_POINTS) != vYields.end())
				{
					int iGAPoints = max(1, iYieldHandicap * iMultiplier / 100);
					changeNavalCombatExperienceTimes100(iGAPoints * 100);

					if (!bFirstYield)
					{
						strTemp.Format(", ");
						strLogString += strTemp;
					}
					if (bSeparateYieldTypes)
					{
						strTemp.Format("G ADMIRAL POINTS (%d)", iGAPoints);
					}
					else
					{
						strTemp.Format("G ADMIRAL POINTS");
					}
					strLogString += strTemp;
					bFirstYield = false;
				}

				// Population (does not scale with game speed!)
				// This one is divided by 100 for sanity. Each 100 points = +1 citizen. The minimum gain is +1 citizen.
				iMultiplier = bSeparateYieldTypes ? pHandicapInfo->getYieldMultiplierForAIDifficultyBonus(eHistoricEvent, YIELD_POPULATION) : iCommonMultiplier;
				if (std::find(vYields.begin(), vYields.end(), YIELD_POPULATION) != vYields.end())
				{
					int iPopulationBoost = max(1, iUnscaledYieldHandicap * iMultiplier / 10000);

					// Distribute Population deck-of-cards style to cities in order of Local Happiness.
					CvWeightedVector<CvCity*> CitiesSortedByLocalHappiness;
					int iLoop = 0;
					for (CvCity* pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
					{
						// Skip puppets, unless Venice.
						if (CityStrategyAIHelpers::IsTestCityStrategy_IsPuppetAndAnnexable(pLoopCity))
							continue;

						// Do not distribute Population to razing or resistance cities
						if (pLoopCity->IsRazing() || pLoopCity->IsResistance())
							continue;

						int iLocalHappiness = pLoopCity->GetLocalHappiness(0, /*bExcludeEmpireContributions*/ false);
						CitiesSortedByLocalHappiness.push_back(pLoopCity, iLocalHappiness);
					}
					if (CitiesSortedByLocalHappiness.size() > 0)
					{
						CitiesSortedByLocalHappiness.SortItems();
						int iPopToGive = iPopulationBoost;
						while (iPopToGive > 0)
						{
							for (int i = 0; i < CitiesSortedByLocalHappiness.size(); i++)
							{
								CvCity* pCity = CitiesSortedByLocalHappiness.GetElement(i);
								pCity->changePopulation(1, true, true);
								iPopToGive--;

								if (iPopToGive == 0)
									break;
							}
						}

						if (!bFirstYield)
						{
							strTemp.Format(", ");
							strLogString += strTemp;
						}

						strTemp.Format("EMPIRE POPULATION (%d)", iPopulationBoost);
						strLogString += strTemp;
						bFirstYield = false;
					}
				}

				// Border Growth Points
				iMultiplier = bSeparateYieldTypes ? pHandicapInfo->getYieldMultiplierForAIDifficultyBonus(eHistoricEvent, YIELD_CULTURE_LOCAL) : iCommonMultiplier;
				if (std::find(vYields.begin(), vYields.end(), YIELD_CULTURE_LOCAL) != vYields.end())
				{
					int iBorderGrowthPoints = max(1, iYieldHandicap * iMultiplier / 100);

					// How many valid cities can we divide this yield amongst?
					vector<int> vValidCities;
					int iLoop = 0;
					for (CvCity* pLoopCity = firstCity(&iLoop); pLoopCity != NULL; pLoopCity = nextCity(&iLoop))
					{
						// Skip puppets, unless Venice.
						if (CityStrategyAIHelpers::IsTestCityStrategy_IsPuppetAndAnnexable(pLoopCity))
							continue;

						// Skip resistance or razing cities.
						if (pLoopCity->IsResistance() || pLoopCity->IsRazing())
							continue;

						vValidCities.push_back(pLoopCity->GetID());
					}
					if (vValidCities.size() > 0)
					{
						int iBGPPerCity = iBorderGrowthPoints / vValidCities.size();
						int iBGPRemainder = iBorderGrowthPoints - (iBGPPerCity * vValidCities.size());
						if (iBGPPerCity <= 0)
							iBGPPerCity = 1;

						for (std::vector<int>::iterator it = vValidCities.begin(); it != vValidCities.end(); it++)
						{
							CvCity* pCity = getCity(*it);
							if (pCity->isCapital())
								pCity->ChangeJONSCultureStored(iBGPPerCity + iBGPRemainder);
							else
								pCity->ChangeJONSCultureStored(iBGPPerCity);
						}

						if (!bFirstYield)
						{
							strTemp.Format(", ");
							strLogString += strTemp;
						}
						if (bSeparateYieldTypes)
						{
							strTemp.Format("BORDER GROWTH POINTS (%d; %d cities, %d per city)", iBorderGrowthPoints, vValidCities.size(), iBGPPerCity);
						}
						else
						{
							strTemp.Format("BORDER GROWTH POINTS (%d cities, %d per city)", vValidCities.size(), iBGPPerCity);
						}
						strLogString += strTemp;
						bFirstYield = false;
					}
				}

				strTemp.Format(".");
				strLogString += strTemp;

				if (GC.getLogging() && GC.getAILogging())
				{
					CvString strBaseString;

					CvString strFileName = "DifficultyHandicapLog.csv";
					FILogFile* pLog = NULL;
					pLog = LOGFILEMGR.GetLog(strFileName, FILogFile::kDontTimeStamp);

					CvString strPlayerName;
					strPlayerName = getCivilizationShortDescription();
					strBaseString += strPlayerName;
					strBaseString += ", ";

					CvString strTurn;

					strTurn.Format("%d, ", GC.getGame().getGameTurn()); // turn
					strBaseString += strTurn;

					strBaseString += strLogString;

					pLog->Msg(strBaseString);
				}
			}
		}
	}
}

Notes[]

  1. In pregenerated maps only, players with lower MapPlacementPriority 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 MapPlacementPriority value, the order of placement is determined randomly. Civilizations are always placed on the map before City-States, since the MapPlacementPriority value for City-States is multiplied by 10.
  2. 2.0 2.1 If the game starts in a later era (e.g. Industrial rather than Ancient), an additional 2 base unit supply is added per era, beginning in the Classical Era.
  3. 3.0 3.1 Puppet cities only contribute half of their total population towards this percentage, unless you're playing as Venice.
  4. 4.0 4.1 This is the maximum bonus when fighting in the enemy's territory. In neutral territory, the maximum CS/RCS bonus is reduced by half (rounded down). In owned territory, the bonus does not apply. The bonus begins at 0, is raised by the player's warmongering behavior (declaring war, capturing cities and using nukes), and decays over time.
  5. Unit upgrade costs are based on the unit's base Production cost (excluding any reductions from difficulty).
  6. 6.0 6.1 6.2 6.3 6.4 6.5 Per era modifiers: 1) Use the game era - the average era among major civs, not the era this specific player is in. 2) Start applying in the Classical Era (a -4 modifier is 0 in Ancient, -4 in Classical, -8 in Medieval, and so on). 3) Are multiplicative with the base discount, if any. So a base discount of 70 with a -10 modifier results in 63% of the regular cost, not 60%.
  7. A value of 110 means the AI must contribute 110 Production in order to be credited for 100 Production towards the project.
  8. 8.0 8.1 The AI receives 33% less XP on Quick, 50% more XP on Epic, and 200% more XP on Marathon.
  9. 9.0 9.1 AI units that gain XP from revealing tiles (i.e. scouts) do not receive the sight bonus.
  10. There are no projects which City-States can build in Vox Populi, but other mods might add some.
  11. This value is randomized in each game by +/- 2 turns.
  12. 12.0 12.1 Songhai receives triple this amount.
  13. 13.0 13.1 This is measured in approximate pathfinder turns (i.e. a range of 3 means a Barbarian unit will search for visible targets that it can reach within 3 turns of movement.)
  14. 14.0 14.1 14.2 14.3 Scores are internal AI evaluations of how good each option is for its current situation. The AI will make a weighted randomized choice of each option that makes the cutoff. If the AI's highest scoring choice has 1000 weight and the second highest choice has 900, the AI will pick the first one 11.11% more often (1000:900 ratio). If there are three options of 1000, 950, and 900, the ratio of selecting them would be 1000:950:900. By default, these choices are not affected by difficulty level, but players can change this in the difficulty files.
  15. The AI will not open another policy branch while one policy branch is unfinished.
  16. This includes the penalty for "recklessly expanding" without building up a strong military.
  17. 17.0 17.1 17.2 17.3 17.4 17.5 This means any opinion/approach penalties or bonuses received for competing or not competing with the AI. A value of 80 means 80% of the base penalty or bonus is applied.
  18. 18.00 18.01 18.02 18.03 18.04 18.05 18.06 18.07 18.08 18.09 18.10 18.11 18.12 18.13 18.14 If a player is playing at a different difficulty level than the game difficulty level (possible in multiplayer), the AI will use this value when interacting with them. The AI will interact with other AI players using the value for the game difficulty level (which is the average difficulty level among human players, with Settler being 0, Chieftain being 1, etc. and any decimals being rounded down).
  19. 19.0 19.1 This means any opinion/approach penalties received for competing with the AI. A value of 80 means 80% of the base penalty is applied. Only the highest out of the victory dispute and victory block penalties will be applied. Also, 10% of this value is added to the AI's weight to denounce a player who is close to victory.
  20. 20.0 20.1 20.2 20.3 The higher this value, the more likely the AI is to consider a player a competitor for this category. Their dispute or block level (NONE, WEAK, STRONG, FIERCE) will be more likely to be higher, which affects diplomacy modifiers to approach and opinion.
  21. During this time, the AI has WAR, HOSTILE and DECEPTIVE approach scores of 0 towards the player they made peace with, and is much less likely to enter wars with them.
  22. This modifier might be reduced or negated if the AI believes the human player is performing poorly.
  23. Negative values improve opinion, while positive values reduce it.
  24. Calculated by adding the era number of each major civ team together, then dividing by the number of major civ teams and rounding down.