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

Espionage discussion

Discussion in 'Civ4 - General Discussions' started by vincentz, May 28, 2016.

  1. vincentz

    vincentz Programmer

    Joined:
    Feb 4, 2009
    Messages:
    3,533
    Gender:
    Male
    Location:
    Denmark
    I like spies. I like espionage. What I dont like is the espionage points directed to each civ.
    I'm considering making it a pool instead, and wanted the high councils wise members of the esteemed civ fanatics fantastic forum wanderers opinion on the matter.

    How would your ideal Espionage look like?
    What should be changed in the current implementation to make espionage great?
    What is the worst about the BtS espionage?
     
  2. Seraiel

    Seraiel Chieftain

    Joined:
    Sep 6, 2011
    Messages:
    7,954
    Gender:
    Male
    The worst thing is definitely Spies getting discovered all the time because the AIs build too many of them. Generally Spies are quite expensive and the detection-rate of them is just too high imo. City revolts are imo. also too expensive and imo. should scale with the size of cities because in the early game cities are smaller and espionage is rare making them not viable early or only in the most rare situations.
     
  3. Lennier

    Lennier Chieftain

    Joined:
    Mar 10, 2013
    Messages:
    1,196
    Gender:
    Male
    Location:
    Orange County, NY
    The spread culture mission needs tweaking as well. It's rediculus that an espionage based culture win can be done much faster than a legit culture win.
     
  4. f1rpo

    f1rpo plastics

    Joined:
    May 22, 2014
    Messages:
    374
    Location:
    Germany
    Here are some notes I took a while ago about overhauling espionage. I concluded that they're infeasible to implement because of the necessary AI changes, but maybe there's some useful bit in there (or not :lol:).
    Spoiler :
    * No esp. points, no spy specialists, no Great Spy, no Int. Agency, no Sec. Bureau, no esp. slider, no esp. screen. Demographics always available. Scotland Yard as a national wonder can train spies exclusively. I.e. pretty much back to WL.
    * Spy has "Infiltrate" missions that attach it permanently (until canceled) to a city for a small per-turn effect such as extra research ("tech stealing"), gold, culture spread; like a leech. Can't attach several spies to the same city.
    * Starting an infiltration mission costs gold. The cost is based on the distance to the nearest city that is friendly (owned or vassal) or already infiltrated (infiltration chain, "spy network"). Other potential factors for cost: OB, city defense, city religion, proactive counter espionage. Interface should show a cost breakdown.
    * Missions that can't work on a per-turn basis: Either removed from the game, or require one or several spies infiltrating the target civ to be sacrificed. No gold cost (already paid for infiltration), guaranteed success (or no cost for failure - can try again next turn).
    * No per-turn detection chance, but possibly a per-turn chance for an event that hints at spy activity in a city; can be a false positive. A counter espionage mission (carried out abroad) could also produce these unreliable hints.
    * Spy unit can "Investigate" own (vassal?) city for rival infiltrators. The cost of investigation should be small enough not to hurt when paid once, and high enough to disincentivize constant investigations; should only make sense when there is a concrete suspicion. Some 50 gold (or based on population) or maybe -1 population (purge). Has a small (30%?) chance of discovery for each infiltrator that is actually present. Can investigate a city only once per turn (to discourage reload cheats).
    While I find the notion of "espionage points" uninspired, the splitting of points is the only part of the BtS system that I actually enjoy; figuring out whom I need intel on most. It's not so fiddly either.
     
  5. Drakarska

    Drakarska Epic Dadness

    Joined:
    Jan 4, 2010
    Messages:
    2,539
    Location:
    Twilight Zone
    I usually play modded, which depending on mods, has varying tweaks to espy. This is just my observations;

    Likes;

    Promo's- I like the idea that spies can gain experience, and improve. Just like a regular unit.
    Point of return- This one is a biggy. I usually play huge-giant maps, and having a spy return to the capitol instead of nearest city is a witch.
    Counter-spy; I really enjoy the spy vs spy option in a couple of mods that I play. It adds a new element of immersion for me.
    Plot sabotage; This is fun. Nothing like taking out a key resource from an opponent without declaring war.

    Dislikes:

    Points: This one bugs me, especially since active points can only be vs 1 target
    Returns: As mentioned above, I really dislike that spies always return to the capitol
    Sleep: You can't place a spy in "alert" mode like a regular unit. There should be an option for a spy to wake and counter when an enemy spy is near ( I'm looking at you Sitting Bum).

    Just a few thoughts.
     
  6. Pangaea

    Pangaea Rock N Roller

    Joined:
    Sep 17, 2010
    Messages:
    5,107
    Active points can be against as many targets as you want. With more targets, you obviously gain less against each, but it's a fine option to take, especially later in the game when you get heaps of :espionage: from loads of cities (courthouses) and various EP buildings.

    What probably annoys me the most is how easily spies are caught, and that they return to the capital.
     
  7. Rodney Nelson

    Rodney Nelson Chieftain

    Joined:
    Feb 24, 2016
    Messages:
    25
    Location:
    Connecticut
    Sometimes I miss the notification that a spy was caught. Since it often takes a bazillion turns for the spy to get to wherever it's going, it's easy to lose track of it. But it gets back to the capital really fast.
     
  8. 6K Man

    6K Man Bureaucrat

    Joined:
    Jul 17, 2007
    Messages:
    2,109
    Location:
    in a Gadda Da Vida
    I don't know how the mechanics of catching spies works. One would think that a passive spy would never get caught in a civ you have Open Borders with - I mean, if the spy never performs a mission, how would the other civ know she was a spy? At the very least, spies should have a lesser chance of getting caught if you they're in a civ you have OB with.

    I also think that the longer a spy is stationary in a city, the smaller the chance of being caught should be (to simulate 'sleeper' spies). So, if there's a 2% chance per turn by default, it should drop to 1% after, say, 20 turns, and 0.5% after 20 more turns... etc.
     
  9. ConfusedCounsel

    ConfusedCounsel Chieftain

    Joined:
    Jan 10, 2016
    Messages:
    293
    I would think that the spy has to remain somewhat active to be an effective spy. You can't just pretend to be a saffron merchant and only sell and buy saffron and then the next day know where to find the top secret tech or incite the entire city to a night of debauchery or break into the treasury. You gotta prepare that stuff, "The Americans" style.
    If anything, the fact that a spy is ready to do any of the missions at any time is kinda weird. I mean, you don't chose a mission when you start keeping him stationary. Is he doing a round each night of the well, the treasury, the unhappy downtrodden and the top researchers? :crazyeye:
     
  10. 6K Man

    6K Man Bureaucrat

    Joined:
    Jul 17, 2007
    Messages:
    2,109
    Location:
    in a Gadda Da Vida
    It makes sense if you consider a "Spy" to be some larger group of spies, the same way that a "Rifleman" is a regiment or division of guys with rifles. Presumably a larger group of spies would be able to prepare for a set of widely differing missions. But of course, it's an abstraction.

    Anyway, I stand by the premise that a nation should find it easier to root out foreign spies if they have closed borders with the spies' nation. Foreigners of that stripe would stand out a lot more, and there'd be fewer pretexts under which a spy could be introduced into the closed-border nation.
     
  11. vincentz

    vincentz Programmer

    Joined:
    Feb 4, 2009
    Messages:
    3,533
    Gender:
    Male
    Location:
    Denmark
    Some really good ideas here. Thanks :D

    I know Lemon made a mod that makes the spy go to nearest city instead of capital.
    Regarding the promotions. I made my own, but Super Spies have some really great ones.
    Funny thing is that when I made mine, I accidently gave one of them too high a value, so they never get caught when just standing still or moving around, and I enjoy it so much I just kept it that way.
    The tweaking of the costs of missions is fairly easy.

    Im thinking about changing a few things:
    Maybe make spies have really low detection rate when not doing anything in enemy lands, and completely removed if have a promotion.
    Instead of save-up time, make it active espionage time, so after mission is activated the spy will stand still and do his espionage action for a few turns (1-5 depending on mission). In these turns the spy will have increased chance of getting caught.

    Also I'm thinking about making a new Action for spies in homeland, where, when activated, he will increase the spy detection, sort of a counter agent.
    Maybe to a degree where, if it isnt done, the inactive enemy spies cannot get caught.
     
  12. rah

    rah Warlord Supporter

    Joined:
    Sep 12, 2005
    Messages:
    7,700
    Location:
    Chicago
    My biggest problem with spies should be easy to fix but it never has.
    HAVING AN AUTO SEARCH option. It has never made sense to me that they don't have it.
     
  13. 6K Man

    6K Man Bureaucrat

    Joined:
    Jul 17, 2007
    Messages:
    2,109
    Location:
    in a Gadda Da Vida
    I like those ideas. It makes sense that a Spy action should take a few turns to implement - you can't expect a Spy to be able to foment unrest or drop VX into the waterworks on a moment's notice. But, you'll be messing with the "drop AI cultural defenses with 1 turn of revolt" mechanic. That has its pros and cons.

    Agree that a Spy should have to expend espionage points to defend against enemy spies. Maybe not a lot of points, but some.
     
  14. vincentz

    vincentz Programmer

    Joined:
    Feb 4, 2009
    Messages:
    3,533
    Gender:
    Male
    Location:
    Denmark
    This annoyed me too, and looking at the espionage code (which in many places are redundant imho) I almost gave up before starting, though it was pretty easy in the end with only 2 edits in CvPlayer.cpp:
    CvPlayer::canDoEspionageMission
    PHP:
    //Vincentz NewSpy
    //        int iEspionagePoints = GET_TEAM(getTeam()).getEspionagePointsAgainstTeam(GET_PLAYER(eTargetPlayer).getTeam());
            
    int iEspionagePoints GET_TEAM(getTeam()).getEspionagePointsEver();;
    CvPlayer::doEspionageMission
    PHP:
    // Vincentz NewSpy
    //        iHave = GET_TEAM(getTeam()).getEspionagePointsAgainstTeam(eTargetTeam);
            
    iHave GET_TEAM(getTeam()).getEspionagePointsEver();
            if (
    bSomethingHappened)
            {
    //            GET_TEAM(getTeam()).changeEspionagePointsAgainstTeam(eTargetTeam, -iMissionCost);
                
    GET_TEAM(getTeam()).changeEspionagePointsEver(-iMissionCost);
            }
    and since the total Espionage points gathered isnt shown anywhere I put an extra line after missions showing how much is left (not ideal, have to add it to UI somewhere) :

    PHP:
            gDLL->getInterfaceIFace()->addMessage(getID(), trueGC.getEVENT_MESSAGE_TIME(), gDLL->getText("TXT_KEY_ESPIONAGE_MISSION_PERFORMED"), "AS2D_POSITIVE_DINK"MESSAGE_TYPE_INFOARTFILEMGR.getInterfaceArtInfo("ESPIONAGE_BUTTON")->getPath(), (ColorTypes)GC.getInfoTypeForString("COLOR_GREEN"), iXiYtruetrue);
    //Vincentz NewSpy
            
    gDLL->getInterfaceIFace()->addMessage(getID(), trueGC.getEVENT_MESSAGE_TIME(), gDLL->getText("TXT_KEY_ESPIONAGE_POINTS_LEFT"GET_TEAM(getTeam()).getEspionagePointsEver()), "AS2D_POSITIVE_DINK"MESSAGE_TYPE_INFOARTFILEMGR.getInterfaceArtInfo("ESPIONAGE_BUTTON")->getPath(), (ColorTypes)GC.getInfoTypeForString("COLOR_GREEN"), iXiYtruetrue);
    Now since all the code for distributing the espionage points to civ is still there, it can function to lower/raise costs against specific civs (as it have done previously), and therefore still have a function in game, though now EverSpendAgainstAI is basically the same as PresentPointsAgainstAI.

    Question is now, should a failed attempt cost espionage points now? since its easier to get points "directed" at an AI now, maybe there should be a penalty or cost for trying even if failing (could be ½ cost?)

    Spoiler :
     
  15. Drakarska

    Drakarska Epic Dadness

    Joined:
    Jan 4, 2010
    Messages:
    2,539
    Location:
    Twilight Zone
    I like the idea of a point cost on a failed attempt. Price of a spy blowing his cover :).
     
  16. rah

    rah Warlord Supporter

    Joined:
    Sep 12, 2005
    Messages:
    7,700
    Location:
    Chicago
    I was actually surprises that the designers didn't do that in the first place. It seemed like the obvious thing to do.
     
  17. Pangaea

    Pangaea Rock N Roller

    Joined:
    Sep 17, 2010
    Messages:
    5,107
    Given how easily spies are caught, that would pull the rug under from the entire spying business.
     
  18. vincentz

    vincentz Programmer

    Joined:
    Feb 4, 2009
    Messages:
    3,533
    Gender:
    Male
    Location:
    Denmark
    It bugs me about the ease of spies gets caught, but looking around it is actually fairly easy to adjust:
    In globalDefines.xml these (and a lot others) can be adjusted. Best way is to copy file, paste it, and rename it to globalDefinesAlt.xml. Then clear the rest of the entries except the espionage part, and then tweak until satisfied ;)

    The first is a modifier to how easy the spy is caught. The less, the harder.
    The second is the same, but within a civ you have Open Borders (its harder to get caught with open borders)
    PHP:
        <Define>
            <
    DefineName>ESPIONAGE_SPY_INTERCEPT_MOD</DefineName>
            <
    iDefineIntVal>-75</iDefineIntVal>
        </
    Define>
        <
    Define>
            <
    DefineName>ESPIONAGE_SPY_NO_INTRUDE_INTERCEPT_MOD</DefineName>
            <
    iDefineIntVal>-90</iDefineIntVal>
        </
    Define>
    These are modifiers for the cost of espionage points for doing a mission:
    Size of city, Have traderoute with our city, Have same religion as our in city, Do we have the holy city of that religion, Do we have culture in that city, How far from their capital is the city, Modifier and well, self explaining ;)
    Spoiler :
    PHP:
        <Define>
            <
    DefineName>ESPIONAGE_CITY_POP_EACH_MOD</DefineName>
            <
    iDefineIntVal>0</iDefineIntVal>
        </
    Define>
        <
    Define>
            <
    DefineName>ESPIONAGE_CITY_TRADE_ROUTE_MOD</DefineName>
            <
    iDefineIntVal>-20</iDefineIntVal>
        </
    Define>
        <
    Define>
            <
    DefineName>ESPIONAGE_CITY_RELIGION_STATE_MOD</DefineName>
            <
    iDefineIntVal>-15</iDefineIntVal>
        </
    Define>
        <
    Define>
            <
    DefineName>ESPIONAGE_CITY_HOLY_CITY_MOD</DefineName>
            <
    iDefineIntVal>-25</iDefineIntVal>
        </
    Define>
        <
    Define>
            <
    DefineName>ESPIONAGE_CULTURE_MULTIPLIER_MOD</DefineName>
            <
    iDefineIntVal>50</iDefineIntVal>
        </
    Define>
        <
    Define>
            <
    DefineName>ESPIONAGE_DISTANCE_MULTIPLIER_MOD</DefineName>
            <
    iDefineIntVal>100</iDefineIntVal>
        </
    Define>
        <
    Define>
            <
    DefineName>ESPIONAGE_SPENDING_MULTIPLIER</DefineName>
            <
    iDefineIntVal>100</iDefineIntVal>
        </
    Define>
        <
    Define>
            <
    DefineName>ESPIONAGE_EACH_TURN_UNIT_COST_DECREASE</DefineName>
            <
    iDefineIntVal>10</iDefineIntVal>
        </
    Define>


    Added chance to catch enemy spy when our spy is present, Increased chance to catch after doing Counterspy Mission, Increased chance to catch a spy in same city after another spy just did mission, Chance of spy reveal nationality, chance of escape modifier
    PHP:
        <Define>
            <
    DefineName>ESPIONAGE_INTERCEPT_COUNTERSPY</DefineName>
            <
    iDefineIntVal>15</iDefineIntVal>
        </
    Define>
        <
    Define>
            <
    DefineName>ESPIONAGE_INTERCEPT_COUNTERESPIONAGE_MISSION</DefineName>
            <
    iDefineIntVal>20</iDefineIntVal>
        </
    Define>
        <
    Define>
            <
    DefineName>ESPIONAGE_INTERCEPT_RECENT_MISSION</DefineName>
            <
    iDefineIntVal>15</iDefineIntVal>
        </
    Define>
        <
    Define>
            <
    DefineName>ESPIONAGE_SPY_REVEAL_IDENTITY_PERCENT</DefineName>
            <
    iDefineIntVal>25</iDefineIntVal>
        </
    Define>
        <
    Define>
            <
    DefineName>ESPIONAGE_SPY_MISSION_ESCAPE_MOD</DefineName>
            <
    iDefineIntVal>-50</iDefineIntVal>
        </
    Define>
    And for those lazy, I made it for you, with default BtS values ;)
     

    Attached Files:

  19. ston

    ston Chieftain

    Joined:
    Feb 4, 2009
    Messages:
    201
    Location:
    Westbury, UK
    The insistence of the computer to run a multitude of spy specialists in the late game. I find this wastes a lot of time having to continually switch them out for more suitable specialists.

    So, I came up with A Brilliant Plan (TM). I disabled espionage in the options when starting a new game. I got to the late game...and the computer started running spy specialists again :crazyeye:
     
  20. rah

    rah Warlord Supporter

    Joined:
    Sep 12, 2005
    Messages:
    7,700
    Location:
    Chicago
    The main issue is that the AI sacrifices Science for it.
    Whether this is good or bad is debatable. but I'm leaning that it's bad for the AIs.
     

Share This Page