Thank you for this!!!
I believe this is why my spies werent functionning properly? Because I never activate the event system...
you don't need the event system active for spies to work
Thank you for this!!!
I believe this is why my spies werent functionning properly? Because I never activate the event system...
Alright then thanks! Last patch i wasn't getting any rewards from spy missions but I guess i'll have to try again this patch!you don't need the event system active for spies to work
int iResistance = kLoopPlayer.GetEspionage()->GetSpyResistance(pLoopCity);
//are we better than 'average?'
int iDelta = GC.getESPIONAGE_GATHERING_INTEL_COST_PERCENT() - iResistance;
iDelta /= GC.getBALANCE_SPY_SABOTAGE_RATE();
//is our resistance better than average? Increase spy rank! Otherwise, reduce it.
if (iDelta < 0)
pLoopCity->ChangeEspionageRanking(iDelta, iNumSpies > 0);
else if (iDelta > 0)
pLoopCity->ChangeEspionageRanking(-iDelta, iNumSpies > 0);
<Row Tag="TXT_KEY_POTENTIAL_CALCULATION">
<Text>[ICON_SPY] Spy Resistance: [COLOR_POSITIVE_TEXT]{1_Num}[ENDCOLOR][NEWLINE][NEWLINE]If [ICON_SPY] Spy Resistance is negative, the City's Security Level will slowly [COLOR_NEGATIVE_TEXT]reduce[ENDCOLOR] to 1. If positive, it will slowly [COLOR_POSITIVE_TEXT]increase[ENDCOLOR] to 10.</Text>
</Row>
I’m playing a Huge map on Marathon, Emperor difficulty, with Tall Ethiopia. There are 10 civs left and admittedly, probably an insane amount of spies in my capital city. I’m in the Atomic era with a ton of spy defense modifiers: Rationalism’s spy policy, Order’s doubled counter-espionage, police stations, at least 6 levels of public works and rank 3 spies on +50% counterespionage missions in every city. All of my cities are basically on max security, all the time. Despite stacking all of these, I’ll only capture maybe a quarter of enemy spies and deal with 6-8 tiles being pillaged (which is crippling because I’m in tundra), 16000+ gold draining from my pockets or production completely reset every 5 turns or so.
The pillaging gets particularly annoying because it feels like I hadn’t even turned off Bad Events, and yet I still have to deal with repairing the same tiles 3 or 4 times per era.
Do my settings just break the system or am I doing something wrong here?
Correct me if I'm wrong, but the calculations seem to be a bit wonky for CvGame::SetHighestSpyPotential():
For reference, ESPIONAGE_GATHERING_INTEL_COST_PERCENT is 1000, iResistance is (100+Spy Resistance)% of that, Spy Resistance is the number you see on the when hovering on owned cities in the UI, and Espionage Ranking is the security level.Code:int iResistance = kLoopPlayer.GetEspionage()->GetSpyResistance(pLoopCity); //are we better than 'average?' int iDelta = GC.getESPIONAGE_GATHERING_INTEL_COST_PERCENT() - iResistance; iDelta /= GC.getBALANCE_SPY_SABOTAGE_RATE(); //is our resistance better than average? Increase spy rank! Otherwise, reduce it. if (iDelta < 0) pLoopCity->ChangeEspionageRanking(iDelta, iNumSpies > 0); else if (iDelta > 0) pLoopCity->ChangeEspionageRanking(-iDelta, iNumSpies > 0);
Anyway, it looks here that a city's security levels will decrease no matter what, unless its spy resistance is exactly at 0. If it's positive, the value is subtracted, and added when negative. This is in contrast with the tooltip that states:
Code:<Row Tag="TXT_KEY_POTENTIAL_CALCULATION"> <Text>[ICON_SPY] Spy Resistance: [COLOR_POSITIVE_TEXT]{1_Num}[ENDCOLOR][NEWLINE][NEWLINE]If [ICON_SPY] Spy Resistance is negative, the City's Security Level will slowly [COLOR_NEGATIVE_TEXT]reduce[ENDCOLOR] to 1. If positive, it will slowly [COLOR_POSITIVE_TEXT]increase[ENDCOLOR] to 10.</Text> </Row>
No, but an EspionageLog.csv would be useful for debugging.
View attachment 608709
OK this has been going on for a bit I think. While I do like the new spy system the yields just doesn't make any sense what so ever. At first I thought this was just some weird thing that would be sorted eventually but it's been going on for a bit now and it has not changed. So can someone, @Gazebo, explain how this system is actually supposed to work or what these fantasy calculations are based on?
I sure as hell didn't get 6000 gold, Mecca doesn't have 6000 gold or Arabia as a whole doesn't have 6000 gold. I'm not entirely sure how much gold I got, but I made as noted about 300g but I forgot to see how much G I had the turn before and if there was something else that gave me gold that turn (pop growth etc). But at best then it was supposed to have given me say 800g? So something in the range of 0 to 800g?
It's the same with other yields. They just are not reflections of reality in the game. That or there is some super secret Illuminati shadow economy in the game I'm not aware of.
you on the latest? I fixed some calculations on 1.0
Yes. This is 1.0.3. I made some more investigations and notifications. The side notification is actually showing the correct gold I stole but the popup window is showing a value that is 5x larger then the stolen or made amount (or the amount shown in the side notifications). See above for calculations and screenshots etc.
the notification on the side and the popup are produced by two different functions, with passed values going through iterative functions. I had it working correctly. I’m not sure why it is duplicating again.
the x5 is either coming from potential or era. What era are you in? What was the city’s potential? One of those two is the culprit.
+1 this would be a huge QoL featureThey should block continuing turns or display the leftover spy icon in red or something.
Changing the colour or something might be a good idea but turn blocking is bad since sometimes I want to wait or hold turn(s) before sending them out. With this I would be forced to send and abort missions which is just as anooying.
More or less that or if I'm waiting for a spy-quest. It just saves clicks. So while annoying sometimes when you forget to send them it will be equally annoying forcing you to do actions.In what situation would you want to do this? Only thing I can think of is to time a potential city blockade or wonder race sabotage, but currently these things aren't predictable enough anyways. If any such situations would occur more infrequently, then I'd still say it's better to have it be blocked. Ideally you could just "unblock" by sending them to hideout.
the notification on the side and the popup are produced by two different functions, with passed values going through iterative functions. I had it working correctly. I’m not sure why it is duplicating again.
the x5 is either coming from potential or era. What era are you in? What was the city’s potential? One of those two is the culprit.
Another thing I noticed was that when enemy spies steal gold from my treasury, I don't lose any money but they gain whatever they 'stole'. This behaviour does not extend to disrupting production however. I don't mind it because deductions are generally quite unfun but thought I'd mention it.