Civilization – Formula for City-State tribute values

civilization-5civilization-5-brave-new-world

I'd like to know what the mathematics are of the numbers seen in this screenshot. For example, how is "Overall Military Power" and "Military Near City-State" calculated? Are there upper limits?

Screencap of citystate diplomacy screen

Best Answer

I looked up the factors, which can be found after downloading the SDK (Steam -> Tools -> Sid Meier's Civilization V SDK)

...\steamapps\common\Sid Meier's Civilization V SDK\CvGameCoreSource\CvGameCoreDLL_Expansion2\CvMinorCivAI.cpp

starting at line 7796 (function CvMinorCivAI::CalculateBullyMetric).

First off, the negatives:

  • First off is the base reluctance of -110
  • If your non-war influence is less than -30, take a -300 penalty
  • If you're trying to bully for a unit (aka worker) and the city state is less than size 4, -300
  • Otherwise if you're trying to bully for a worker take off -30
  • If you've bullied the city state within the last 10 turns, -300
  • For bullying within the last 20 turns, -40
  • If the city has an ally, -10
  • If the city has a pledge of protection, -20
  • If the city is militaristic, -10
  • If the city is hostile, -10

And the positives:

  • Overall military power of all remaining major civs is ranked, with the first place getting 100 and the remaining getting decreasing amounts of 100 / [number of civs]. For example, for 5 civs this is 100/80/60/40/20
  • Local military power in a radius of 5 (increases with larger map sizes) around the city state is compared. Depending on the ratio of the power of your units and the city state units, you get 100 / 80 / 60 / 40 / 20 for 3x / 2x / 1.5x / 1x / 0.5x the power

Note that the three -300 penalties effectively means you cannot demand tribute. All of these values are hard-coded and cannot be modified without a DLL mod, with the exception of the non-war influence < -30, which is defined as FRIENDSHIP_THRESHOLD_CAN_BULLY found in

...\steamapps\common\sid meier's civilization v\assets\DLC\Expansion2\Gameplay\XML\AI\GlobalAIDefines.xml