Effect of spy level

fodazd

Chieftain
Joined
Mar 5, 2013
Messages
75
Hello.

I have been playing civ6 for a pretty long time now, but I have never really used the espionage-system for anything other than counterspying, because my offensive spies were always captured/killed and it didn't seem like a good investment to me.

Now, I am considering giving it a shot. However, I still have no idea how the civ6 espionage system actually works. What does "spy level" do? I guess it increases the probability of a successful mission, but by how much? What is the probability of escaping a failed mission without being captured/killed, given a particular escape route? How does the presence of a counterspy influence these probabilities? Are there any other variables besides spy level that have an effect on these probabilities?
 
None of this is from my own work or gameplay but I remember reading this thread helped me understand spies a lot better and make better use of them in-game.
 
Yes, that thread has some useful information in it. But after reading it, I still don't feel like I have the complete picture.
 
Spies have promotions like other units. You can choose, as with other units.

Some promotions will increase the odds of successful art theft or funds siphoning for example, while others can increase the performance of other spies among other things.

The various probabilities of success will be presented to you when choosing a mission; the relative odds of successful escape will similarly be displayed in the event.

Build a few spies and use them. It's the best way to learn the basics.
 
I would suggest counterspying until they level up before sending them out first.
That is very much hit and miss, particularly since in the later versions of the game, AI is much less aggressive (and predictive!) with their spies than they used to be, so your spy may end up doing nothing for a long time.

To answer OP:

I don't know the details, but each level your spy attains adds ~10 % success chance to ALL missions. On top of this, you can pick promotions to boost specific missions even further.

The best ways to use a spy is generally to first send them to a city with a commercial hub. This is because the Siphon Funds mission has the highest base success rate (unfortunately, AI seems to avoid Commercial Hubs almost at all cost for whatever reason). Once you're there, first gain sources, as this will significantly increase your chance of success. Then try to Siphon Funds and hope for the best. If your spy succeeds, focus on the following promotions:
  • Ace Driver: This one is great, because it will help your spy survive even if he is caught. May seem a bit boring to pick as first promotion, but you'll still get the passive boost for leveling up.
  • Linguist (25 % shorter time) or Disguise (no time to set up): These are awesome to maximize impact of your spy.
  • Quartermaster: Great once you get multiple spies.
  • Seduction: Only if you want to prioritize counterespionage.
  • Cat Burglar: Only if you want to focus on stealing Great Works (AI Kongo/Russia says hello). A good promotion because this mission has low base chance.
  • Rocket Scientist: Only if you are afraid an AI will run away and win space victory (AI Kongo/Rome says hello). A good promotion because this mission has low base chance.
Avoid promotions that boost Siphon Funds, Steal Technology, Sabotage Production or Recruit Rebels. This is because these missions have quite high base chance (the former three) or seem rather useless (the latter). For the first three, you'll hit maximum success chance (90 %) even without the dedicated promotions, if you manage to get your spy to level 4 and/or run the card that increases spies on offensive missions and/or has a spy with Quartermaster ability at home.

After your spy gets a level or two, use them for whatever purpose you get promotions for.

PS: Spys are absolutely AWESOME and can be very potent tool against the AI. Not least because (and here's a bit of AI abuse) AI doesn't seem to understand to repair spaceport districts once you sabotage them.
 
The trouble is commercial hubs are not often available at first, especially when using Catherine.
I'm not sure what part of the picture the OP is missing so cannot comment further apart from saying I have not looked at the mechanics too much for precise figures. I just suggest you go for it. If someone has not worked something out by xmas I'll give it a go.
 
The spying formula are a bit difficult to figure out based on the information in the .XML and .lua files alone.

---

By experimenting in game, it seems that the probabilities shown for success/fail/(capture or kill) are picked from a discrete set. The set with the highest success probability is 90%/7%/3%, the next one is 84%/14%/2%, and so on. The possible success probabilities in order are (16, 25, 37, 50, 63, 74, 84, 90). 16% is the probability for the hardest mission (partisans) for a non-promoted spy, so it's the smallest you'll see, but it doesn't take enemy counterspy into account, so it could go lower (perhaps 10% for symmetry?).

For a spy recruit with no promotions or modifiers, the probabilities are 16% for partisans, 25% for rocketry or heist, 37% for tech or sabotage, and 50% for siphon. Every +1 level moves the probability one up in the scale, e.g. disrupt rocketry for an agent (+1 promotion) is 50%, and if on top of that you gain sources (+2 levels) it's 74%.

In addition to not taking into account counterspy, the probabilities shown seem misleading in other ways:
- when your spy just finished a mission in a city with an active boost and you pick a new city, it will show the probabilities with the boost even though that new city doesn't have gain sources active;
- the probability of being captured/kill is always the same, even if the spy has an ace driver promotion, which should reduce it?

Since the probabilities always come from this set we don't really need to know the underlying formula, though if I had to guess it looks a lot like a logistic function: something like 1/(1+exp(0.54x)) with x from -4 to 4.

--

From the XML files (in Assets/Gameplay/Data):

in UnitOperations.xml:
- each mission is described with a base probability that goes UP with difficulty, i.e.
13 for siphon, 14 for tech/sabotage, 15 for rocketry/heist, 16 for partisans.
- there are also a few other "probability change" values that are the same for each mission: level (1), enemy (3), enemy level (1)
- there is a "SPY_TRAVEL_NEW_CITY" entry with "turns=3". no clue to the formula for how travel time varies with city distance.

in GlobalParameters.xml:
<Replace Name="ESPIONAGE_BONUS_GAIN_SOURCES" Value="2" />
<Replace Name="ESPIONAGE_ESCAPE_BASE_CHANCE" Value="10" />
<Replace Name="ESPIONAGE_ESCAPE_COUNTERSPY_LEVEL_MODIFIER" Value="-1" />
<Replace Name="ESPIONAGE_ESCAPE_LEVEL_BOOST" Value="1" />
<Replace Name="ESPIONAGE_ESCAPE_POLICE_CORRECT_MODIFIER" Value="-4" />
<Replace Name="ESPIONAGE_GAIN_SOURCES_DURATION_MULTIPLIER" Value="3" />
<Replace Name="ESPIONAGE_MAX_LEVEL" Value="4" />

Some of them make immediate sense, e.g. +2 level for gain sources, gain source durations is 3x standard mission time of 8 turns = 24 turns,
and a spy can't go beyond level 4 (recruit + 3 promotions). Others are less obvious without the formula for the probabilities of success and escape.


Also, the formula for spy production cost is 225 + 75 x previous copies (similar to settler/builder formula)
 
Because spies are slow to get going, the best bet I think is to start early, i.e. use the Machiavellianism policy, and start producing the first spy as soon as you get Diplomatic Service. Counterspy is best if you know the enemy has been spying, otherwise Siphon Funds. Quartermaster is the best promotion to pick early since it makes new spies effective right out of the gate. Better to get +2 from the quartermaster than give the spy +2 for rocketry and have it die in the next mission due to bad luck.

I can confirm from a Deity game finished yesterday than the enemy STILL doesn't repair spaceports. I sabotaged about 15 spaceports from 4 different opponents, and some of them built a new spaceport rather than repair a pillaged one.
 
Thank you, @antimony this is exactly the kind of information I have been looking for. :)

So it seems there are 8 or 9 (with the hypothetical 10% with enemy counterspy/cryptography) possible sets of probabilities. Do you also have the capture/kill vs. fail probability for each of them? I know 3% capture kill goes with 90% success and 16% capture/kill goes with 50%. Based on that, maybe the pattern is that fail is about twice as likely as capture/kill?

Remaining questions for me:
-> It seems to be the case that once you are "captured/killed", you still get a chance to save the spy by choosing an escape method, and maybe ace driver affects the probability of this being successful. How is this escape probability calculated?
-> Does the boost from gain sources scale with game speed? I mostly play marathon, so most missions take 24 turns for me... And the boost from gain sources also lasts 24 turns? This seems like a bug.
 
Thank you, @antimony this is exactly the kind of information I have been looking for. :)

So it seems there are 8 or 9 (with the hypothetical 10% with enemy counterspy/cryptography) possible sets of probabilities. Do you also have the capture/kill vs. fail probability for each of them? I know 3% capture kill goes with 90% success and 16% capture/kill goes with 50%. Based on that, maybe the pattern is that fail is about twice as likely as capture/kill?

Remaining questions for me:
-> It seems to be the case that once you are "captured/killed", you still get a chance to save the spy by choosing an escape method, and maybe ace driver affects the probability of this being successful. How is this escape probability calculated?
-> Does the boost from gain sources scale with game speed? I mostly play marathon, so most missions take 24 turns for me... And the boost from gain sources also lasts 24 turns? This seems like a bug.

It does seem wrong that the boost wouldn't scale with game speed, especially since it's implemented as a multiplier.

For captured/killed, I agree it's ambiguous what exactly they refer to... In practice, the spy can fail the mission but stay undetected in the city, or the mission can succeed yet the spy is detected and must flee (if the mission was sabotage, it doesn't matter if the spy is caught, but if it's siphon funds / steal tech / heist, you don't get the "loot" unless the spy successfully escapes).
 
Ok, then it would also be very interesting to find out what the probability behind "you succeed, but are detected and must escape" is.
 
One thing im not sure of is when counterspying, if for example i put two spies in my space port will i get extra sabotage protection?
 
Top Bottom