Behind the Espionage screen

Bushface

Deity
Joined
Nov 28, 2005
Messages
2,550
Location
Torquay, England
Can anybody tell me how some of the figures on the espionage screen are calculated ? In particular, what affects the EPs needed to be able to see into the AI's cities ?
I ask because in my current game something strange has happened. Over a period of 5 turns, the EPs I need to see into Athens have risen from 3296 to 7265, which is a 120% rise. And the necessary EPs to see into his other cities have also risen hugely, all but 3 to 4492 and higher (the three being those where my state religion is present, which has to be a major factor).
Some data :-
Athens, pop.17, needs 7265 EPs: it has a Security Bureau.
Pergamon, pop.9, needs 7320 EPs: it too has a Security Bureau.
Samos, pop. only 2, needs 5046 EPs: it has no buildings at all, and is the only Greek city with which I am not trading.
Halicarnassus, pop.18, needs 2727 EPs, the lowest of all. No SecBu., and my state religion is present.

I could understand the rise in Athens and Pergamon as being due to new SecBu's, but surely this should not have a nationwide effect: there are none in his other cities (I have found out using WB). Why does Pergamon need more EPs than Athens, and why should little Samos be so costly ? I can't see distance as a factor, as the Greek cities are all from 40 to 56 tiles away from my capital (on a huge pangaea): no espionage activity by me, and none detectable by Pericles: no wars in progress anywhere: no Wonders built by anybody in the five turns in question: no treaties signed: his attitude unchanged, at "Cautious" (-1): so why the huge rise ?

Any information would be most welcome.
 
The costs for the passive espionage missions are equal to their base costs (200 for investigate city) multiplied by (100+TheirPointsAgainstYou)/100 but then they are also subject to the same modifiers as the active missions. These all work multiplicative:
  • One of your cities has a trade route to the target city: -20% = *0.8

  • Your state religion is present in the city (these two bonuses will add up to a total of -40% = *0.6):
+ You have the holy city for this religion: -25% = *0.75
+ Target Player has adopted a different/no state religion: -15% = *0.85​
  • Target City has a certain amount of your city culture (not plot culture!): -50% * YourCC/(TheirCC+YourCC) --> *0.5 ... *1.0
  • Target City has a Security Bureau: +50% = *1.5
  • Distance Modifier: +100%*(PlotDistanceToYourCapital + MapMaxPlotDistance)/MapMaxPlotDistance (MapMaxPlotDistance = 72 / 111 for standard / huge maps) --> *1.02 ... *2.0
  • Multiplier for ratio of total/ever accumulated :espionage: points (not the allocated points for missions): (2*TheirPoints + YourPoints)/(TheirPoints + 2*YourPoints) --> *0.5 ... *2.0 (this is the percentage given behind the player's name in the espionage screen)
  • Target Player has recently run a counterespionage mission against you: +100% = *2.0
  • {for active missions: discount for fortified turns of spy: -10% ... -50% = *0.9 ... *0.5}

I guess the 120% increase comes from the Security Bureaus + either a counterespionage mission against you (which has cost Pericles points against you so that the increase < 150%) or an infiltration by a Great Spy which lead to a drastic increase of TheirPointsAgainstYou and shifted the ratio of total/ever accumulated :espionage: points. The mission costs are independent of CitySize so Pergamon is a bit more expensive than Athens because it probably is farther away from your capital. Samos doesn't get the *0.8 from TradeRoutes but has no SecBureau. Halicarnassus has no SecBureau and gets the additional *0.6 for your State Religion (I assume you have the Holy City). But this is all very speculative, a save might help to clarify things.
 
Many thanks for the explanation, but the figures don't add up. I have worked them through for Athens, Halicarnassus, and Samos, and in all cases the numbers in my results are considerably higher than the actual in-game values. I have suffered only two sabotages so far, and my watchful eye on the EPs my opponents had determined one of these to have been by Saladin, now dead, and one by Willem: I myself have performed one counterespionage mission against Pericles, if he has done one against me it must have expired as there's no *3 factor possible. (N.B. you give *2 as the ctr-esp factor, but the game says +200% which means a factor of *3). The factor for accumulated EPs has not altered in that one turn, though the individual figures have gone up, and there has been no change to the other factors. None the less, the EPs I need to see into Pericles' cities have risen by 6.77% to 7.0% in just one turn.
Why and how ?
 
(N.B. you give *2 as the ctr-esp factor, but the game says +200% which means a factor of *3).
Unfortunately this is another example for a discrepancy between information you are given in the game and the true mechanics implemented in the code...
The counterespionage mission is handled this way:
iModifier *= kTargetTeam.getCounterespionageModAgainstTeam(getTeam());
iModifier /= 100;
with iCounterespionageMod = 200 (from CIV4EspionageMissionInfo.xml) which means it works only as a factor of 2 not 3.

So could it have been a counterespionage mission against you? Probably not, because I just browsed through the code a bit further--the game should always give you a message for any successful espionage mission a neighbor has performed against you. For the counterespionage mission the message is: "Enemy spies appear to be extra vigilant to our espionage efforts in the near future." I've never seen this message in my games so I guess the AI never chooses this mission (they only seem to like poisoning water, stealing techs and destroying improvements...).

The slight rise of +7% could be the result of a new combination of the minor discounts (did Pericles switch to Mercantilism? --> +20%; did he convert from your state religion to something else / Free Religion? --> -15%; adds up to +5%) +2% due to more EPs allocated towards you. But you said there was no change in the other factors. As Dresden mentioned above, 2 saves are much better than a crystal ball ;).
 
No saves available. First the espionage went utterly haywire ( went from one of Pericles' cities needing 6000-odd to see up to 10000-odd and drop to 4000-odd in the same turn, for example), then the game crashed ("Civ4 has stopped working") and now won't let me load any of my saves or start a new game. Need to reinstall, I'm afraid, and I shan't back up any saves.
It's not reassuring to be told that the in-game information is wrong, though. What else is affected ? And where does it say (in your posts, Dan, or elsewhere) that your opponent's civics changes can affect espionage costs ? Finally, I don't understand how the Holy City and opponent's religion multipliers work: are these factors always present, or only if your state religion is present in the target city.
 
"Civ4 has stopped working" sure sucks!
There are a couple of things in Civ where the coded mechanics don't exactly follow the descriptions given in the Civilopedia or elsewhere in the game. To name just one example that I can remember right now: The Sea Patrol function (yes, that's an evergreen :)) will not let the patrolling unit attack pillagers like the mouseover tells you but actually works the other way around, it triggers combat so that the pillager attacks the patrol (which can therefore benefit from +10% coastal defense). But it's mainly minor stuff.

There are only the 2 above mentioned civic changes that have an effect on espionage mission costs:
+ Mercantilism cancels trade routes into the relevant city and thus negates the 20% discount and
+ Free Religion means your opponent does not follow your state religion, circumstances that give a 15% discount

So let's say you have founded Hinduism (and still own the Holy City) and you have spread this religion to Halicarnassus.
If you have Hinduism as your state religion --> you will always get a 25% discount for espionage missions for owning the Hindu Holy City.
If Pericles has no state religion (maybe due to Free Religion) or follows a different faith --> you will get an additional 15% discount for espionage missions in Halicarnassus. These 2 religious discounts are special because they are added up before being applied as a total multiplier of 40%.

You can test all of this with WB and spies, the mouseover for the active missions gives a nice break down of all the modifiers.
Spy.jpg
 
Back
Top Bottom