The new patch includes some changes to the Espionage UI as well as some bugfixes, and I feel this is a good opportunity to discuss the Espionage system in more detail, because in my opinion it needs some reworking. There was a previous thread about espionage (thanks to azum4roll for pointing it out) but I'd prefer to open a new one as there have been some changes since then. Before discussing possible improvements, I want to describe how espionage works in detail:
Spy Mission Duration:
Each spy mission has a base duration, to which two percentage modifiers are applied. The Spy Power is a negative modifier, so it reduces mission length, and the City Resistance is a positive modifier and increases mission length. City Resistance is based on the Security Level, the value that is shown as a star rating for each city in the espionage screen. The total mission duration is always between 50% and 150% of the base mission duration.
Spy Power:
The base spy power for each spy is 25. To this value, percentage modifiers are applied:
Security Level:
The Security Level is a value between 5 and 50 (shown as a star rating) that changes during the game. Each city is initialized at level 50 when the first spy is recruited. Each turn, city security is modified based on the Spy Resistance, which in turn is based on city population, trade routes and other factors. Spy Resistance is shown as a percentage value, and it modifies City Security each turn by (Spy Resistance value)/20. So, if the shown value is -20%, City Security will decrease by 1 each turn.
Spy Resistance is the sum of the following:
After each completed foreign Spy Mission, City Security is reset to the maximum value of 50.
(*) This seems to be a formula that has been forgotten to update, as it is exactly the formula for local unhappiness from the base game (where 1 Pop = 1 Unhappiness), and all of the VP unhappiness sources are completely ignored in it.
(In this city, City Security decreases by 8/20 = 0.4 per turn)
City Resistance:
City Resistance, the negative modifier for spy mission duration, is calculated based on the Security Level explained above. To this value, percentage modifiers are applied. These modifiers are:
ID and Kill Chance:
These chances are calculated as a product of two factors. The first factor is (City Security * 2)/100. The second one is based on the mission type and possible counter-spies in the city. Each mission has a base ID and Kill Chance (see below). To the mission ID chance the value of +15 is always added. If there is a counter-spy in the city, both ID and kill chance are increased by +25 for each level the spy is above the first rank. Counter-espionage missions increase ID and kill chances as specified in the mission descriptions.
The total ID chance can't be smaller than 10%, and the total kill chance can't be higher than 75%. Spies are killed after completing their missions, so the mission result is always applied.
Spy Experience:
Issues related to the espionage system and mission duration calculation in general:
Issues related to specific missions:
Ideas how to improve this:
(1) I would like to keep the system with the variable city security in general, but make it more controllable for the player, and more relevant. The idea is to make the values by which city security changes per turn much lower, so that we have a more gradual change, and to remove the re-setting of city security after a completed mission. City security should be more of a long-time investment.
The negative modifiers need to be drastically reduced and we need some inherent positive modifier to make sure city security is not always falling. Initial idea (all values are the amount by which city-security changes per turn):
Negative:
Remove the spy effects from the military base, and add instead two more buildings in the Constabulary / Police Station line (two or three techs apart each)
(2) The modifiers for more or less policies/techs guarantee that espionage is a catch-up mechanic (which is in my opinion sorely needed given that most games are decided long before they're finished). They should be applied to the mission length directly and not to city security.
New Modifiers: +-4% for each policy, +-4% for each tech, both capped at +-20%.
(3) If a counterspy kills an enemy spy, their mission is not completed, and no mission results come into effect. To make up for this, base mission durations are reduced and an additional modifier to kill chance is added: -10% kill chance for every level the operating spy is above the first level.
(4) The siphon missions don't result in an instant yield, but in a yield change per turn. When a mission ends, a certain amount of gold will be transferred from one civ to the other each turn (like a trade deal). The transferred amount is based on the average of the city yields while the spy was in it to conduct the mission. The effect duration is always the base mission duration (so operating quicker than the base mission length will be rewarded).
(5) The "Copy a Great Work" mission is changed to "Steal a Great Work".
(6) If a spy has not been ID'd after a mission, the next mission can be chosen and is no longer automatically the same as before.
I'm thinking about making some proposals next session based on these ideas, and I would very much like to hear your thoughts about it. Or also more generally your thoughts about the espionage system and how to improve it.
One last thing: In case someone doesn't like the espionage system at all, with the new patch it should be possible to revert it back to the original system (only tech stealing, no events) by setting the option BALANCE_CORE_SPIES_ADVANCED to 0 in Vox Populi/Core Files/Core Changes/CommunityPatchDLLChanges.xml:
I haven't tested it that thoroughly, but it should work (except for some incorrect tooltips). If you do so, I'd recommend also to set BALANCE_CORE_SPIES to 0 in Community Patch/Core Files/Core Changes/CommunityPatchDLLChanges.xml (this controls spies scaling with map size, having that many spies to steal technologies would be too strong).
Spoiler :
Spy Mission Duration:
Each spy mission has a base duration, to which two percentage modifiers are applied. The Spy Power is a negative modifier, so it reduces mission length, and the City Resistance is a positive modifier and increases mission length. City Resistance is based on the Security Level, the value that is shown as a star rating for each city in the espionage screen. The total mission duration is always between 50% and 150% of the base mission duration.
Spy Power:
The base spy power for each spy is 25. To this value, percentage modifiers are applied:
- +50% if playing on Quick Game Speed
- +25% for each level the spy is above the first rank.
- +25% for open borders
- +25% for England
Security Level:
The Security Level is a value between 5 and 50 (shown as a star rating) that changes during the game. Each city is initialized at level 50 when the first spy is recruited. Each turn, city security is modified based on the Spy Resistance, which in turn is based on city population, trade routes and other factors. Spy Resistance is shown as a percentage value, and it modifies City Security each turn by (Spy Resistance value)/20. So, if the shown value is -20%, City Security will decrease by 1 each turn.
Spy Resistance is the sum of the following:
- -10% per trade route going to or coming from the city
- -2% per population
- a negative value for city unhappiness which is calculated as (City Population - Local Happiness) / (City Population) (*)
- +50% if a counterspy is present in the city
- +50% for Constabularies, Police Stations and Military Bases, +15% from NIA
- +10% for each Public Works
- +34% for the "Empiricism" Policy (Rationalism Branch)
After each completed foreign Spy Mission, City Security is reset to the maximum value of 50.
(*) This seems to be a formula that has been forgotten to update, as it is exactly the formula for local unhappiness from the base game (where 1 Pop = 1 Unhappiness), and all of the VP unhappiness sources are completely ignored in it.
(In this city, City Security decreases by 8/20 = 0.4 per turn)
City Resistance:
City Resistance, the negative modifier for spy mission duration, is calculated based on the Security Level explained above. To this value, percentage modifiers are applied. These modifiers are:
- The Spy Resistance percentage modifier that has already been used to calculate the change per turn of city security
- The difference in the number of policies between spy owner and targeted civ, multiplied by -10%, capped at +-50% (so spy missions are quicker if the targeted civ has more policies than the spy owner)
- The difference in the number of technologies between spy owner and targeted civ, multiplied by -2%, capped at +-50%
- A modifier based on the number of previous spy missions done by the civilization in that city (the square of the number of missions: +1% for one previous mission, +4% for two missions, +9% for three, etc.)
ID and Kill Chance:
These chances are calculated as a product of two factors. The first factor is (City Security * 2)/100. The second one is based on the mission type and possible counter-spies in the city. Each mission has a base ID and Kill Chance (see below). To the mission ID chance the value of +15 is always added. If there is a counter-spy in the city, both ID and kill chance are increased by +25 for each level the spy is above the first rank. Counter-espionage missions increase ID and kill chances as specified in the mission descriptions.
The total ID chance can't be smaller than 10%, and the total kill chance can't be higher than 75%. Spies are killed after completing their missions, so the mission result is always applied.
Spy Experience:
- For completing an offensive mission, a spy gets 50XP plus a value based on the mission
- Successfully rigging an election gives 20XP, a coup gives 50XP.
- Killing an enemy spy gives 50XP
- As a diplomat, uncovering intrigue gives 20XP (Until this version, there was a bug in the code that if a wonder is constructed in the target city, it gives 20XP to the diplomat for every turn in which the wonder is under construction, causing diplomats to rapidly level up. This has been fixed.)
Issues related to the espionage system and mission duration calculation in general:
- Spy resistance usually has a high negative value (at least until late in the game, when it can suddenly become a very high positive value), so most of the time, city security is constantly at the minimum value, unless it has recently been reset by a completed enemy spy mission
- The first point, together with the fact that counter-spies don't actually prevent enemies from completing their missions, makes counter-spies basically useless
- There is a strange double-dipping wrt spy resistance, which is used in two separate calculations, and which is also a value that's not controllable by the player at all
- If the modifier to city security (spy resistance plus modifiers from having more/less techs or policies) is close to -100%, city security doesn't matter at all, because the final value will always be 0
- Conversely, the value of that modifier doesn't matter at all if the city security is close to 0
Issues related to specific missions:
- The reward from the siphon missions is calculated based on the duration of the mission, meaning that mission duration effectively doesn't matter at all. There is no difference in the reward for completing two missions of 30 turns each and the reward for three missions of 20 turns each
- Yields are stolen as instant yields, which (a) encourages the gamey behavior of always spending all the gold one has to prevent it from being stolen, (b) can be frustrating and (c) contributes to overall yield inflation as the spy owner always gets the full amount even if that's more than can currently be stolen
- Compared to the other missions, the "copy great work" mission is very weak
Ideas how to improve this:
(1) I would like to keep the system with the variable city security in general, but make it more controllable for the player, and more relevant. The idea is to make the values by which city security changes per turn much lower, so that we have a more gradual change, and to remove the re-setting of city security after a completed mission. City security should be more of a long-time investment.
Spoiler :
The negative modifiers need to be drastically reduced and we need some inherent positive modifier to make sure city security is not always falling. Initial idea (all values are the amount by which city-security changes per turn):
Negative:
- -0.04 per population
- -0.1 per excess unhappiness
- maybe a negative modifier for trade routes, if it is necessary to punish tall players more
- +0.01*(City Strength)
- +0.08 per Public Work
- +1 for a counterspy
- +0.5 for Defense Process
- +0.2 for constabularies, police stations
Remove the spy effects from the military base, and add instead two more buildings in the Constabulary / Police Station line (two or three techs apart each)
(2) The modifiers for more or less policies/techs guarantee that espionage is a catch-up mechanic (which is in my opinion sorely needed given that most games are decided long before they're finished). They should be applied to the mission length directly and not to city security.
New Modifiers: +-4% for each policy, +-4% for each tech, both capped at +-20%.
(3) If a counterspy kills an enemy spy, their mission is not completed, and no mission results come into effect. To make up for this, base mission durations are reduced and an additional modifier to kill chance is added: -10% kill chance for every level the operating spy is above the first level.
(4) The siphon missions don't result in an instant yield, but in a yield change per turn. When a mission ends, a certain amount of gold will be transferred from one civ to the other each turn (like a trade deal). The transferred amount is based on the average of the city yields while the spy was in it to conduct the mission. The effect duration is always the base mission duration (so operating quicker than the base mission length will be rewarded).
(5) The "Copy a Great Work" mission is changed to "Steal a Great Work".
(6) If a spy has not been ID'd after a mission, the next mission can be chosen and is no longer automatically the same as before.
I'm thinking about making some proposals next session based on these ideas, and I would very much like to hear your thoughts about it. Or also more generally your thoughts about the espionage system and how to improve it.
One last thing: In case someone doesn't like the espionage system at all, with the new patch it should be possible to revert it back to the original system (only tech stealing, no events) by setting the option BALANCE_CORE_SPIES_ADVANCED to 0 in Vox Populi/Core Files/Core Changes/CommunityPatchDLLChanges.xml:
Spoiler :
I haven't tested it that thoroughly, but it should work (except for some incorrect tooltips). If you do so, I'd recommend also to set BALANCE_CORE_SPIES to 0 in Community Patch/Core Files/Core Changes/CommunityPatchDLLChanges.xml (this controls spies scaling with map size, having that many spies to steal technologies would be too strong).