1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Spies and Espionage

Discussion in 'Civ4Col - Medieval: Conquests' started by Kailric, Feb 17, 2014.

  1. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    There have been a few ways the Civ games have handled spies, but I like the idea of spies being units that you can control.

    The premises is simple, you give your unit the Spy Profession and send him out on missions such as:

    • Sabotage
    • Gather information
    • Incite revolts
    • Destroy Improvements
    • Counter Espionage
    • Infiltration
    • Falsify Information
    Infiltration
    Here is the cool one. You can send your experienced spies on infiltration missions. Basically your spy will inter the que for the enemies Immigration and once the spy has successfully infiltrated the enemy you can perform the missions more effectively and less chance to get caught. The enemy will use your unit as if it was its own. Special missions are allowed to infiltrators such as a research bonus to techs you are researching that the enemy already has.

    Double Agents

    Here is the real killer, if your infiltrated unit is given the Spy Profession by the enemy you now have a double agent. Double agents receive intel on the where abouts of other spies, and receive a huge bonus to counter espionage, among other benefits. Very Experienced Double Agents can even be sent on infiltration missions again and become a Triple Agent, gaining even more bonuses.

    After each mission, successful or not, the Spy attempts to go into hiding and become unavailable for a few turns. Infiltrators and Double Agents attempt to return to their jobs as normal. Depending on a spy's skill the longer he works the more suspicion he builds up, if his suspicion gets to high his covered could get blown and he would need to escape. Once your cover is blown for that Civ you can no longer Infiltrate that Civ. (In a world History Mod certain techs, like Plastic Surgery, can change this)

    Depending on how well Infiltrators and Double Agents perform missions, they can leave a trail of evidence that increases the Agents suspicion levels. Victims of Espionage can thus receive messages, little hints, that there may be a spy among your populace.

    Falsify Information
    This special mission can be performed by your spies. It attempts to draw the heat away from a real spy by planting falsehoods, or a false trail of evidence, that can make a player think there is a spy somewhere that there is not. It can lower the suspicion level of real spies.

    In the end, you just have no idea who you can really trust. Pray my child, pray!
     
  2. orlanth

    orlanth Storm God. Yarr!

    Joined:
    Nov 17, 2001
    Messages:
    1,759
    A lot of features re spies have been developed by other Civ4 mods like Dune Wars, & I think include some similar to the ones youre interested in:
    http://forums.civfanatics.com/showthread.php?t=338329
    http://forums.civfanatics.com/showthread.php?t=259221
    The spells and missions from Fall Further and Master of Mana could also be worth looking at since they enable modding a really wide variety of "actions" or effects, probably more than you could ever want.
    In general when considering adding things like this it's likely to be a lot better & easier to find features that have already been carefully implemented for AI and debugged in the many feature-rich Civ4BtS mods and port them to Civ4Col if you like them. Many of them spend hundreds of skilled programmer-hours making these systems work, solving unforeseen bugs & gameplay problems, and teaching the Civ4 AI to use them. The same goes for the discussion of the air system, it could likely save tons of headache reusing existing well-tested systems from Civ4. (It still seems like it could be a lot of work to bring over, but much less risk of grappling with tons of unforeseen bugs of AI problems due to extensive prior testing/development).
     
  3. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Again, keeping all this info in the correct spot I post this here.

    Well, at the moment the AI uses way to many units to stand guard when they could be producing stuff. So, I would like to address that and figure out why the AI feels this is needed. Units will auto equip weapons when attacked so again, I'm not understanding the need here.

    Anyway, that aside, what spies can do is two things; detect Units in the Field that are deployed and also detect how many potential units they could have based on a City's Population, Weapons, and Armor. When we do this we could have a Espionage screen set up similar to the Domestic Screen except we keep tabs on Enemy cities.

    What would the AI use this info for? Determining if a Civ is Weak or Strong, so it knows wether to befriend, exploit, or attack. Also, it can discover potential Enemy Forces build ups that maybe going to be directed at them, and thus initiate counter measures. What would humans use this info for? How was Espionage used in Civ4, can't quite remember?

    Right now the AI automatically knows a Civs Power and makes judgements based on that, perhaps this could be hidden and only through Espionage can a Civ learn such things. There is many possibilities here.
     
  4. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    espionage did many things and was expanded in many mods (as mentioned)

    The main two things were:

    'Civ-Knowledge'
    and
    'Missons'

    You would store up espionage points just like you would do with research and gold, research goes straight into the tech, gold to the bank and espionage to the spy bank.
    I am not sure exactly how the knowledge part worked.

    I think it went like this:

    Civ-Knowledge:
    On the espionage screen you assign every civ a priority say 0-10(you can give civs the same priority), then each civ would be portioned a percentage of the espionage points by their priority, which would go into a pool against that civ.
    You had knowledge milestones, and I think when your pool is above a certain amount you gain that mile stone.

    Like:
    location of cities
    Seeing inside cities
    Current research project etc.

    What I am not sure about (I don't do much with espionage) is if a mission can take points out of the pool and drop you below the threshold for a mile stone. So for example you have 1005 points and a milestone is 1000, you then do a mission costing 10 points, I don't know if that milestone then switches off till you refill the pool.

    Things like number of cities and the targets espionage pool size against you (relative strength) also increased the costs of milestones and missions against that civ I think.


    Missions:
    These would take points from the pool and are spent per mission.
    Stuff like you mentioned:
    Blow up a building
    Incite a revolt
    Change a civic
    Steal a tech

    Now I think you could only run a mission in a city where a spy is present. (I don't know if ones like steal a tech were different but I don't think they were) Also the longer a spy is stationary in a location (or perhaps it was a mission button like a sentry order or whatever), the more likely their mission will be successful, I think it also increased the risk of discovery though.
    Some mods introduced xp and promotions for successful missions that increased a spies skill in the various jobs.
    You could also use spies for counter inelligence in your own cities, increasing the likely hood of dicovering spies (good use for the law yield? Allo Allo Allo, wha's goin on ere then? SPY!!!!)

    I think it would be good to have an espionage yield, just like in civ, as a spy in the field is only half the system, you then have the people that organise the information and 'handle' the spies. Spy Masters oooooh! (cue thriller Music! No Stop dancing like zombies!! Not that Thriller Music!)
     
  5. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Yeah, I just looked over the Pedia rules in Civ4 and its pretty much like you say. I've also read some of my book, "The Bloody History of Knights, Spies, and Pirates", some good info there. Spies have been used ever since recorded history, but as you would think, most that went on was never recorded, but there is still much info and fun stuff to discover.

    We can use Ctrl-Z to look inside other Cities so I wonder if this can be made into a Spy feature. That way we can keep track of things like Weapons and such and know approximately a City's military strength.

    A Espionage Yield may work well with this for sure. This looks like a fun mod to work on but it is going to be a while.

    Thriller!?! Thriller Night, coming to terrorize "Jaws" neighborhood!
     
  6. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    Wuuubum..... wuuuubum....

    Yeah, it would diefinately be a version release in it's own right. (it was one of the major features that came with bts)

    The good news is like orlanth says, we have a great espionage 'model' from civ 4 we just need to figure out how much can be ported across and what fundemental differences between the bts structure and col structure of code there are.

    In terms of ideas for it, we really don't have to work that hard, as pretty much everything under the sun is waiting for us in bts/mods.

    Bts already has an espionage 'yield'(it's technically a 'commerce') so again the conceptual frame work is there already, just needs to be translated into col.

    We can add in stuff like destroy stores/yields missions(instead of poison the water from bts)
    bts has missions that can change civics(we hae civics) steeal techs(we got those) we could even add in 'censure' missions that can blight a civ for X turns on success.

    I think to have a double agent, you would need to catch a spy, then you can choose to kill or recruit him. This would lead to a 'narrow escape' message rather than a killed or capture message, and the spy is returned to it's owner with you seeing everything he now does as well. There could be a 50/50(or random wahtever) chance of it working or failing, so you release him, he goes back and you suddenly realise he is not reporting back to you! This could have the knock on effect of him being more likely to be caught if he returns or even auto caught on return (or this could be increased with techs) to your kingdom to spy. The player sending him there would not know he was previously compromised.

    You could also choose to torture caught spies for a 'payment' into your espionage pool against that nation.
     
  7. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    Sadly this screen is a bit buggy. A number of yield stuff is displayed using current player rather than city owner. I have yet to see the centre plot displaying the correct amount when using this feature. I suspect it's something like it adds the bonus for current player (me) and since I do not own the plot, it will not apply bonuses.

    The game mechanics are correct though. If the plot provides 4 yields, it adds 4 yields to the warehouse, even if the GUI tells that it is only 2. Because it is a debug only GUI issue I haven't really bothered to investigate. However it should be fixed if spies can expose the same bugs.

    Another thing. All plot yield display are based on the owner. This mean if an AI city gets docks, you can see it by the fact that the water plots increase production. I have this idea that it should display what the display should only display foreign plots like they were neutral and should hide yields, which can't be used and so on. Also while I fixed bonuses to not provide a bonus until they are enabled by CivEffects, they are always drawn. Also they always provide bonus in neutral plots when you look at potential yields. There is room for great improvements in this area, even without spies and if we add the ability to detect what other players earn from plots though diplomatic relations and spies, then it could really make a difference here.

    I think so too. However storing it in CvPlayer like research might not be ideal. That will allow you to produce yields, stockpile it for 200 years and then use it.

    I'm thinking something like std::list. Each turn it adds an int element with the production this turn. If the number of elements exceeds a certain threshold, then an element is removed from the other end. The number of points you can use is then the combined value of all elements and when you use some, you use from the old end. It's very likely that the combined value should be cached for performance reasons. That will make it a lot quicker to check if a certain action can take place since it will be comparing cost vs a single int.

    We can then add modifiers for how many turns you can have in the list. Gamespeed comes to mind, but also difficulty and CivEffects could contribute.
     
  8. Trade Winds

    Trade Winds Chieftain

    Joined:
    Nov 21, 2013
    Messages:
    235
    Another variable on the espionage mix: your victim’s espionage yield amount.
    Your chances to succeed depend on how much your victim has spent on counter-spying.

    Should we need a building to generate counter espionage and/or “espionage yield”?

    Other ideas to write reports about:
    Production capacity and money allocated to pay (or provisions stored to feed) soldiers: (two knights are receiving their salary although they are planting barley)
    Therefore a spy report could be:

    Number of current active soldiers: 5
    Number of current professional soldiers: 4
    Money allocated to the army: 30 per turn
    etc
    Current amount of weapons: 135
    Current amount of horses s: 67
    Current amount of siege wagons:3
    Current amount of cogs: 1
    etc
    Number of total armories:2
    Number of ore mines:5
    Number of master armores:3
    Weapon production capacity per turn: 21
    Etc
    Etc
    And this is only, let’s say, a report that corresponds to 46% of realty, that is what your spies could investigate out of the money they were provided with.

    I like infiltrators a lot. Imagine one of your agents working as a shepherd in a foreign civ.
     
  9. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    I was thinking that Law and Espionage could be mixed to make the combo yield Counter-Intelligence (or whatever name) the rate of this yield could be used in an equation to make a cost increase so it could be (base cost) x (C-I rate) or whatever.

    Then other factors could boost your espionage rate against a target civ.

    Having Open Borders or trade agreement +
    having a plotgroup connected to a city in the target civ +
    Having spies stationed in target civ territory/cities +

    etc.
     
  10. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    To go along with my post about the Conquest Screen additions, when we expand on Espionage we can perhaps have the Conquest Screen keep a report of all Known foreign units. You can click through the Civs you have spy reports on and it will give you that report. At the moment when you hover over an enemy unit it tells you all units that are present on the plot in the help text. We could prevent this unless you have a spy report of that plot. It could also report on Weapons and Armor amounts. This report would be different than the Military Advisor which only shows units that you can see, the Conquest Spy Report will give you a more accurate reading.

    Also, we can have the Spy Profession, and when you click to send spies you have to actually send one of your Units.
     
  11. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    That sounds cool, in bts I think 'seeing units' might be one of the espionage states you can attain if you have enough of a pool on that faction.
     
  12. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Moving Night's ideas here to keep track of them.

     
  13. orlanth

    orlanth Storm God. Yarr!

    Joined:
    Nov 17, 2001
    Messages:
    1,759
    Hmm well like I said I'm a bit hesitant to keep piling on additional rules/systems to an already quite large set of them, and would rather progress toward getting core components like economy/combat improved and finalized.. OTOH I wouldnt want to block adding espionage if you're into it since what could be cooler than a medieval James Bond :viking::cool::lol:

    I re-played Dune Wars recently and many of the spy behaviors and "Missions" you mention are indeed implemented in that mod, also including at least some AI implementation focused on enabling opponents to actually use the system. http://forums.civfanatics.com/showthread.php?t=338329 I think many of these were based around code from the earlier "Super Spies" mod of BtS, which enables several espionage-specific Promotions. http://forums.civfanatics.com/showthread.php?t=259221 Anyway, see if you can take a look at some of their code and see if any of this is something you think would be useful to merge/adapt for what you want. (I'd imagine this is something you'd want to take advantage of something already working if at all possible, otherwise having to make a medieval spy system totally from scratch could consume lots of effort and leave the already clueless Civ4Col AI becoming even more unable to cope :crazyeye:)
     
  14. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    I second this. The last time I checked, Kailric was doing some foreign trading stuff and now it's suddenly spies. While I like the idea, I would prefer to get the current features working and release. We are very long overdue for a release.

    CivEffects is suddenly near completion. I sure hope that that we can release when CivEffects is done (and tested) and that Kailric didn't half implement something, which is then broken and we have to wait for that to be completed.
     
  15. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,671
    Location:
    UK
    The current spy system is just about the REF army at the moment, it is about spotting the REF after there are rumours.

    This has been mentioned several times.

    The 'proper' espionage system is a 'for a later date' concept.

    I think it would be good if we could as much as possible butcher the Bts system for Col.

    After all a massive part of the Bts Expansion was adding espionage.

    As espionage already uses a collected 'commerce' in bts to do everything, it possibly would not be too hard to convert the system to play with an espionage yield instead.

    Then converting the various missions to work with any Col. differences.

    That would then (hopefully) allow many of the Bts espionage mods to be ported over into a col. espionage system without too much exta effort..
     
  16. Nightinggale

    Nightinggale Chieftain Supporter

    Joined:
    Feb 2, 2009
    Messages:
    3,986
    It's still a spy system and it makes no sense to implement a spy system for this and then a new spy system later on, meaning to do this right, the entire spy system should be planned now.

    Besides to be honest just looking at REF is a low priority task in my eyes. In fact I care so little for it that I wouldn't have coded it myself. I would be sad to see that such a feature delays a release.
     
  17. Kailric

    Kailric Jack of All Trades

    Joined:
    Mar 25, 2008
    Messages:
    3,094
    Location:
    Marooned, Y'isrumgone
    Lib says it right, we are just discussing ideas about Espionage, if we ever even implement these features. I've added a simple implementation for the REF to help it make more sense for Civs that do not have a King that owns the REF.

    What got me started on that was playing through a game I realized there was no ending for Civs that do not answer to a King/Pope. So, what I am working on is finishing the Victory condition, not Espionage. Spying on the REF I figured would be really easy to implement (which it was) and would help with the M:C story. I would have been finished weeks ago if not for school. Anyway, the current changes have been documented in the Victory thread.

    To recap, I want a victory type that does not involve "Independence", so to add to this effect I added spying on the REF. Which, for this story the player hears rumors of a growing threat and can send spies to investigate the REF. When the REF spawns it will spawn a Leader as well, and invade the Player. Both of these features are nearly done, but will need to be play tested.
     

Share This Page