Civilization – What are the chances of a spy stealing your cities’ information

civilization-5civilization-5-gods-and-kings

I understand that in the espionage tab of the game, there are stars next to the your cities and that they refer to the potential that each city has. However, I have more cities with 5-star potential than the number of spies I have (I have 4 spies by the way). Thus, I would like to know how to calculate the chances of your cities' information to be stolen and eliminate the enemy spies that are camped in my cities.

Is there a way to calculate the chance of your cities information? For example, maybe via your cities population, the science, or maybe the difficulty of the game.

In case this matters, I am also using the Gods and Kings expansion pack and not the Brave New World expansion pack.

Best Answer

As already mentioned, tech stealing has a 100% success rate regardless of detection, unless the spy dies from the presence of a counterspy in it. The chance of the latter is ~33/37/42% for levels 1/2/3 of the counterspy.

As for how long it takes for a spy to steal a tech - the raw science output of the city at the start of the spy's mission is stored and accumulated each turn. Once it accumulates more than 1.25x the cost of the highest tech the target civilization can research (again, determined at the start of the spy's mission), you trigger a steal.

The raw science output is modified by the presence of anti-spy buildings and the level of the spy (0/25/50% bonus for levels 1/2/3).

Source:
Source code from Steam -> Tools -> Sid Meir's Civilization 5 SDK:
..\CvGameCoreSource\CvGameCoreDLL_Expansion1\CvEspionageClasses.cpp
Functions CvPlayerEspionage::ProcessSpy, CvPlayerEspionage::CalcPerTurn, CvPlayerEspionage::CalcRequired

GlobalDefines.xml from the installation directory