Spies!

Gazebo

Lord of the Community Patch
Supporter
Joined
Sep 26, 2010
Messages
18,399
Location
Little Rock
Hey all,

I've been channeling my pre-travel anxieties into a bit of coding fun. I needed a break from policies and whatnot, so I turned my attention to spies. Right now, I have implemented a fairly-simple function that gives spies a bit more functionality whilst engaged in surveillance in a city. In short, there is now a small chance (around 20% or so, roughly) every turn that a spy in a foreign city will possibly conduct one of the following actions:

  • Disrupt wonder/building production
  • Delay a unit's production
  • Remove a chunk of GPP from the city's furthest-along GP track
  • Deal a small amount of damage to a city and cause it to enter temporary resistance

The efficacy (and possibility) of each of these actions is based on the level of the spy (they must be at least agents to do any of them, and a secret agent for #4), what is being produced in the city, and a second random roll that is done after the first (so the real % chance hovers around 5-10%). Players are always alerted if one of them is done to their city (they aren't always told who did it, of course). The system works, the notifications are all in place, and (best of all) I didn't have to make any custom lua for it to work, as the events occur 'naturally' while spies are stationed in foreign cities.

These events do increase the possibility of spies being killed from being counter-spied, but such are the risks of spying! My eventual plan is to have the possibility of each function increase based on the duration of a spy's residence in a city (up to a certain point), and to add a couple more possible actions to the mix.

Thoughts?
G
 
Not sure if I like the randomness of it, it would be better if you could actually choose new actions for the spies to do (yeah I know you don't have to say it, "no because AI coding yadda yadda")

But I like the idea of making spies more useful other than for just stealing techs / buying influence.
 
Not sure if I like the randomness of it, it would be better if you could actually choose new actions for the spies to do (yeah I know you don't have to say it, "no because AI coding yadda yadda")

But I like the idea of making spies more useful other than for just stealing techs / buying influence.

You took the words right out of my mouth. :)

Honestly, though, I'd want to get a framework up for spies to be able to do -anything- beyond their current limited roles first anyways. We can see about making it more interactive later on.

G
 
I have something like that in mind for my Total Conversion (eta 2017):

- Military Spies: Spies will *sometimes* disable temporarily military buildings (including Constabularies!) and halt military production (flat penalty, always on).

- Scientific Spies: As vanilla, but when stealing a tech, also hampens the current research.

- (Slander) Media Spies: Reduce Great People Points at some intervals.

- Social Spies: Slows growth (flat penalty, always on) and chance of having a 1 turn Anarchy.

- Civil Spies: Same effect as the military, but for Civilian units and non-Military buildings with 1 or more Maintenance.


Use anything if you want, ignore it, improve on it. :)
 
I like the idea. Spies are rather boring as it is.

I do however think you should make the values modable so we can experiment with them.

Another request: In standard bnw there' s no way of modding the rate (efficiency) at which spies steal techs (only through buildings). Is this something that can be made modable through the dll?

\Skodkim
 
Another request: In standard bnw there' s no way of modding the rate (efficiency) at which spies steal techs (only through buildings). Is this something that can be made modable through the dll?

I'm pretty sure CEP did that, atleast people complained about how the techstealrate was improved
 
I don't like it, sorry to say. Negative actions done to you against which you can't do anything (building constabularies etc. would not stop them if I read your description right?) are just annoying. Just imagine your one turn away from a wonder, you get delayed and then Egypt completes it the next turn...

There's a reason, the base game models spies only as positive forces, but ones that can get nearly all yields for you.

The only things I would change with Espionage is to make it more active, i.e. give a "steal map" function for spies (instead of having to send a unit to scout out that empire, just steal the maps), but as you point out, you want to keep the base functions the same.
 
The only things I would change with Espionage is to make it more active, i.e. give a "steal map" function for spies

Global - Espionage Mapping - written almost entirely in Lua with as minimum as possible (mainly API extensions) in the DLL, which means that the concepts can be reused for something else (eg sabotage) or it can be easily modified by other modders for their own purposes.
 
I don't like it, sorry to say. Negative actions done to you against which you can't do anything (building constabularies etc. would not stop them if I read your description right?) are just annoying. Just imagine your one turn away from a wonder, you get delayed and then Egypt completes it the next turn...

There's a reason, the base game models spies only as positive forces, but ones that can get nearly all yields for you.

The only things I would change with Espionage is to make it more active, i.e. give a "steal map" function for spies (instead of having to send a unit to scout out that empire, just steal the maps), but as you point out, you want to keep the base functions the same.

You can prevent them with counterspies and buildings.
G
 
I'm not a fan of this myself.

First off...is there really a balance issue with spies?

Second, the random hit to me (which will likely be in my capital) is not of interest to me.

Third, I find the tech steal of spies to be fine, especially in the early game. Honestly it may be too effective, after renaissance I can normally get tech parity pretty fast

If there is anything to me that might changed its spy actions in cs, I find spies there a waste of time in most cases
 
I'm not a fan of this myself.

First off...is there really a balance issue with spies?

Second, the random hit to me (which will likely be in my capital) is not of interest to me.

Third, I find the tech steal of spies to be fine, especially in the early game. Honestly it may be too effective, after renaissance I can normally get tech parity pretty fast

If there is anything to me that might changed its spy actions in cs, I find spies there a waste of time in most cases

As with all changes, it'll be toggleable, so to each their own. Personally, I find the absence of purpose for spies - beyond stealing techs - to be absurdly boring. Small pinpricks like these make the spies feel a bit more alive and active, and make it possible for spies in cities where you can't steal techs to level up.

In addition to the actions above, I've added in gold theft (steal a % of their treasury) and 'arming rebels' (immediate hit to growth, chance of rebel spawn near a city). The events occur in order of rarity, with Wonder production hits being the most rare, and gold theft the least rare.

Cheers,
G
 
You can prevent them with counterspies and buildings.
G
It's not signalled, though, which is the issue. You basically get hit out of nowhere - to defend effectively, you have to be slightly psychic (okay, usually, it's just the capital, but then it's just a "spy tax").

I'd like to see more use for spies, though, but random penalties are the least fun way to do that, I think. There are better ways to make them more interesting, even if it's just inverting it (random bonuses based on the location).
 
It's not signalled, though, which is the issue. You basically get hit out of nowhere - to defend effectively, you have to be slightly psychic (okay, usually, it's just the capital, but then it's just a "spy tax").

I'd like to see more use for spies, though, but random penalties are the least fun way to do that, I think. There are better ways to make them more interesting, even if it's just inverting it (random bonuses based on the location).

It is signalled, though - every 'hit' from a spy is reported to the city owner, though the spy isn't always identified (i.e. its origin). It is no more or less 'random' than the spies in Civ IV, or really any previous installation of civ, in terms of AI behavior. I'm not saying this is the end-all-be-all of spy changes, but, barring significant changes to the AI, this is largely within the realm of 'make spies more of a threat,' thus making counterspies and spy-related buildings all the more fruitful. The passive leech of technologies, and the minimal interaction with spies beyond techs, makes them feel lifeless. Making spies act as true infiltrators/saboteurs is more befitting of their roles in the game.

G
 
We were saying there was a reason why spies were changed from how they worked in civIV and so on. In the end, your changes work for someone "wanting to breathe in the athmosphere", but for a control freak, they're probably nightmares. For me, I'm on the fence. On one hand I like having a more simulationy feel, but on the other, this clutters up the game even more. I.e., where will I see where the yield change came from this turn. Now this gets a notification (I assume on the right side of the screen), but then there's also the yields from expanding borders, unit kills, buildings built, techs researched and Great People expended. It's fine, I just don't see the need for more espionage among all that. But this is of course highly subjective.

(If you're looking for challenges btw. on a purely superficial level, I would love for the date on the screen to work like the Mayan does for every civ. So for the Romans it would show Ab urbe condita :))

Seriously though, I feel like I should name areas of the game where we'd need functions like this you could look at. Perhaps the citadel or a fresh use for the Great Admiral (can repair x times?). Or maybe splitting up open borders into a military and a civilian and a trade one :)) And different priorities for which tiles get chosen by culture expand (coasts a bit quicker).

I'm not saying btw. that you need to code (just writing absent minded while watching football).
 
I think that is a good point about strengthening counter-spy buildings. I NEVER build them (Emperor and Immortal level), because enemy spies pose little threat, and also because I usually plant my low level spies in my 2 highest beaker producing cities hoping that another civ is spying on me and will get caught. Building a constabulary would just delay the ranking of my spies.

Making enemy spies stronger and more mosquito-like would certainly increase the value of constabularies and police stations.
 
I think that is a good point about strengthening counter-spy buildings. I NEVER build them (Emperor and Immortal level), because enemy spies pose little threat, and also because I usually plant my low level spies in my 2 highest beaker producing cities hoping that another civ is spying on me and will get caught. Building a constabulary would just delay the ranking of my spies.

Making enemy spies stronger and more mosquito-like would certainly increase the value of constabularies and police stations.

Precisely my purpose. This may crash and burn, but that's my goal with this. :)

(If you're looking for challenges btw. on a purely superficial level, I would love for the date on the screen to work like the Mayan does for every civ. So for the Romans it would show Ab urbe condita )

I think that can be done with LUA exclusively.

Seriously though, I feel like I should name areas of the game where we'd need functions like this you could look at. Perhaps the citadel or a fresh use for the Great Admiral (can repair x times?). Or maybe splitting up open borders into a military and a civilian and a trade one ) And different priorities for which tiles get chosen by culture expand (coasts a bit quicker).

Make a request thread for these. Easier to keep track of new ideas. :)
G
 
It is signalled, though - every 'hit' from a spy is reported to the city owner, though the spy isn't always identified (i.e. its origin).
Only after the fact.

It's an issue with the way spies are handled at the moment. If there was a better interface dedicated to them where you see the total amount of spies each civ has, where gathering information gives you a "fuzzed" number of spies that a civ has in yours and so on, I'd be fine with it.

Get a warning "espionage threat level elevated"? Ignore at your own risk. If your warning is losing a "safe" wonder race? Frustrataaation! ;)

And yeah, it's similar in the older Civ games, but I think we should aim to be better! :D
 
Only after the fact.

It's an issue with the way spies are handled at the moment. If there was a better interface dedicated to them where you see the total amount of spies each civ has, where gathering information gives you a "fuzzed" number of spies that a civ has in yours and so on, I'd be fine with it.

Get a warning "espionage threat level elevated"? Ignore at your own risk. If your warning is losing a "safe" wonder race? Frustrataaation! ;)

And yeah, it's similar in the older Civ games, but I think we should aim to be better! :D

If the issue is interface, and not c++ design, that's an easier solution, I believe. I too wish to be better, and I think we will. This is simply a proof-of-concept for more, better things.

G
 
Anti spy buildings with the new happy system are just fine right now. I build them constantly.


The reason I am so hesitant about the spy concept is we are focusing time on features instead of balance, and there's lots of balancing left to do.

I can definitely say that spies are useful, I have never played a game and didn't use them (whereas religion I have completely ignored)

Spies have 4 primary modes, tech steal, counterspy, diplomat, cs influence.

Is there any of these that is too strong or too weak? If so...that is where I think new features could be helpful...but only if needed.
 
Top Bottom