1. Dismiss Notice
  2. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  3. Main site is finally re-opened! We migrated it to a new CMS and gave it a new layout as well.
    Dismiss Notice
  4. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice
  5. Downloads database has been migrated and re-opened! Check it out and post in Site Feedback if any issue. We have done URL re-write so that old links will continue to work.
    Dismiss Notice
  6. A new Civ6 theme forum style is now available and it's made the default forum style! Check it out and comment here.
    Dismiss Notice
  7. We have successfully migrated the forum from vBulletin to Xenforo! Please take a look around and report any issue you see in Site Feedback.
    Dismiss Notice

Super Spies (BTS 3.19)

Discussion in 'Civ4 - Modpacks' started by stolenrays, Sep 7, 2011.

  1. stolenrays

    stolenrays Chieftain

    Aug 2, 2009
    This is a port of Super Spies for BTS 3.19. Source code files are included for modders to merge. Source code is commented with Super_Spies or Tsheep. Thanks to Vincentz who collaborated with me to figure out how to extract the source code from RevDCM.

    :espionage:SUPER SPIES v2.0 for Beyond the Sword v3.19:espionage:

    Super Spies adds seven new promotion lines and another single promotion to spies and allows them to gain experience from successful missions. Espionage buildings are now expanded to grant spies extra experience and cities can convert production into espionage points. Finally, two new espionage missions are added, allowing spies to bribe workers and assassinate great specialists.

    -Spies escape to nearest city instead of the capital w/Custom GameOption
    -Spies have a chance to be turned into a double agent with capture w/Custom GameOption
    -Double Agents have 50% reduction in mission cost toward previous civ
    -15 New Promotion Lines
    -Promotions Affect All Spy Mission
    -Spies don't start with the use of enemy roads
    -16 New Spy Missions
    -Improved Spy AI
    -Sleep for Espionage Mission
    -Automated Counterespionage Mission
    -3 Buildings provide Spy XP or a Promotion
    -Espionage Process for Cities
    -3 New Spy Attribute Modifiers

    ------:espionage:THE PROMOTIONS:espionage:------
    -Alchemist (I-III): Increases the bonus from poisoning missions and can irradiate tiles.
    -Deception (I-III): Allows the spy to avoid discovery
    -Escape Artist (I-II): Allows the spy to escape, even after being caught.
    -Improviser (I-V): Gives the spy free preparation bonuses.
    -Security (I-III): Increases the spy's odds to catch enemy spies and increases visibility.
    -Instigator (I-III): More unrest from Unhappiness missions and can increase Revolt time.
    -Logistics (I-III): Increases the spy's movement and can unlock the use of enemy roads.
    -Loyalty: The spy never reveals their nationality or cannot be captured.
    -Treachery (I-III): % Assassination Chance Bonus
    -Conspiracy (I-III): % diplo penalty of Cause Incident (merge with Instigator)
    -Instigation (I-III): % duration of Incite Anarchy
    -Seduction (I-III): % diplo bonus of Political Marriage
    -Intrigue (I-III): % duration of Create Building Missions

    -----:espionage:OPTIONS FOR CITIES:espionage:-----
    -Intelligence Agency: Provides new spies with +2 XP.
    -Security Bureau: Spies start with Informant I promotion.
    -Scotland Yard: Provides new spies with +3 XP.
    -Espionage Process: Allows conversion of production into :espionage: points (available with Paper)

    -----:espionage:NEW MISSIONS:espionage:----
    -Assassinate: The spy attempts to kill a settled great specialist in the target city.
    -Bribe Worker: The spy attempts to bribe a worker.
    -Nuke City-Causes a Nuclear Bomb to detonate in the city. If caught, the victim nation may declare war on you.
    -Disable Power: Destroys Power Supply temporarily
    -War Wearniness: Increases war weariness
    -Bribe city: The spy attempts to annex a target city.
    -Sabotage research: Sabotages research in a target civ
    -Remove religion: Removes a chosen religion in a target city
    -Remove corporation: Removes a chosen corporation in a target city
    -Spread Lies: Creates Misinformation building (-20% production, +4 unhappy for 5 turns)
    -Exert Influence: Creates External Influence building (-75% culture for 5 turns)
    -Cause Incident: -2 diplo modifier between target civ and the civ of your choice
    -Political Marriage: +1 diplo modifier between target civ and you
    -Incite Anarchy: Puts target player into Anarchy for 2 turns)
    -Seduce Leaders: Creates Seduced Leaders building (-50% culture, -10% production for 5 turns)
    -Establish Den of Spies: Creates a Den of Spies in target city (-2 production, -4 happiness for 10 turns).

    -Better Global Espionage Use - AIs will now prioritize their espionage targets by focusing on tech leaders and enemies rather than simply having an ever escalating EP war with everyone.
    -Counter Espionage- AIs will now use counter espionage units against enemies and those who have proven they cannot be trusted (those whose spies they've caught). This is a large change from vanilla where they were never used at all.
    -Better Mission Choice - AIs will now prioritize tech thievery while avoiding petty needless strikes against people they don't even care about.
    -CoiunterEspionage Automation
    -Auto mission for counter espionage against enemies.

    -Mainly to Trojan Sheep who invented and did most of the work of this mod component and glider1 who took over and integrated it into the BTS scheme of espionage missions. Also thanks to deanej, who did the the "convert into espionage" in the first place. I only did some clean-up to make the Super Spies mod standalone again.
    -Also many thanks to Dresden, solver and co. who worked on the unofficial patch, along with the RevDCM Team, Afforess, & the Dune Wars Team.

    -------For Modmakers-------
    -Unit Modifiers:
    SpyEvasionModifier--% defense against detection ("detection evasion")
    SpyEscapeModifier -% defense against detection after captured ("detection evasion")
    SpyInterfectModifer -% spy detection bonus

    -Promotion Modifiers:
    Spoiler :

    iSpyPreparationModifier-% bonus from preperation
    iSpyPoisonModifier-% increase of unhealthiness
    iSpyRevoltChange-% increase of revolt & Anarchy length
    iSpyUnhappyChange-% increase of Unhappiness
    iSpyDiploBonusChange- % diplo bonus
    iSpyDiploPenaltyChange- % diplo penalty
    iSpyDurationChange- % longer duration of building effect on target city
    iSpyAssassinationModifier -% increase chance of Assasination
    bSpyLoyalty- never reveals nationality, prevents -1 diplomatic penalty upon capture
    bSpyRadiation-Affected tiles can be irradiated
    iSpyInterceptChange- % spy detection bonus, 5x% counter-espionage bonus
    iSpyEvasionChange- % defense against detection ("detection evasion")
    iSpyEscapeChange- % to survive upon mission failure
    SpyBribeWorkerChange-% Mission Cost Reduction
    SpyNukeCityChange-% to survive upon mission failure
    SpyDisablePowerChange-% Turns Bonus
    SpyWarWearinessChange-% War Weariness Bonus
    SpyBribeCityChange-% Mission Cost Reduction
    SpyResearchSabotageChange-% Mission Cost Reduction
    SpyReligionRemovalChange-% Mission Cost Reduction
    SpyCorporationRemovalChange-% Mission Cost Reduction
    SpyStealTreasuryChange-% Gold Bonus
    SpyBuyTechChange-% Mission Cost Reduction
    SpySwitchCivicChange-% Mission Cost Reduction
    SpySwitchReligionChange-% Mission Cost Reduction
    SpyDestroyProjectChange-% Mission Cost Reduction
    SpyDestroyPoductionChange-% Mission Cost Reduction
    SpyCultureChange-% Culture Bonus
    SpyDestroyBuildingChange-% Mission Cost Reduction
    SpyDestroyImprovementChange-% Mission Cost Reduction

    -Commenting as david allen/advanced espionage/afforess/Super_Spies, Super Spies, TSheep, Dune Wars

    ----Future Plans----
    -Move Double Agent text higher in gametextmanager

    ---Version History---
    Spoiler :

    -Can delete double agents
    -Vassal's spies no longer caught in master's territory change before
    -Removed spy SAM C++
    -Added Help text for all espionage missions.
    -Removed C++ promotion spy exceptions
    -Disable Power Turns is a global defines
    -Added Amount or Turns in Mission Help Texts (War Weariness)
    -Highlight attitude modifiers in Mission Help Texts
    -Added city name to help text
    -Added new line for some help Texts
    -Added icons for Mission Help Texts
    -Removed Spync and replaced with just option
    -Promos affect other missions:
    Spoiler :

    -Bribe Worker: (SpyBribeWorkerChange)
    -Nuke City- (SpyNukeCityChange)
    -Disable Power: (SpyDisablePowerChange)
    -War Weariness: (SpyWarWearinessChange)
    -Bribe city: (SpyBribeCityChange)
    -Sabotage research: (SpyResearchSabotageChange)
    -Remove religion: (SpyReligionRemovalChange)
    -Remove corporation: (SpyCorporationRemovalChange)
    -Steal Treasury: (SpyStealTreasuryChange)
    -Buy Tech: (SpyBuyTechChange)
    -Switch Civic: (SpySwitchCivicChange)
    -Switch religion: (SpySwitchReligionChange)
    -Destroy Project: (SpyDestroyProjectChange)
    -Remove Production: (SpyDestroyPoductionChange)
    -Destroy Project: (SpyCultureChange)
    -Destroy Building: (SpyDestroyBuildingChange)
    -Destroy Improvement: (SpyDestroyImprovementChange)

    -Disable Power mission fix (from Arachid)
    -Remove maniupulated us from Memories
    -GameOption for all memories
    -Some AND text display changes
    -Removed old promotion modifiers

    -Version 1.92
    -Mission Cost for Prisoners for Unit in GameTexManager.cpp
    -Mission texts missing of ESPIONAGEMISSION_DEN_SPIES
    -Extra Espionage against player if captured

    -Version 1.91
    -CvPlayer CTD fix for bribe worker mission

    -Version 1.9
    -Spy Captured from Total War
    -Captured Spy Gameoption
    -1/2 Captured Spy Mission cost only for Original Civ
    -CvUnit.cpp additions from C2C
    -SOI Spy Additions (assasination promotion, Better spy escape)
    -New Promotion AI
    -Removed BBAI
    -Better Promo xml texts in code/sdk
    -remove uneeded globals
    -Nuke Mission working
    -Removed tbnukefix
    -Fix for Sleep mission problems (automate expionage finished)
    -building missions only appear if no building present in city
    -Den of spies not permenant
    -Better Commenting-All commenting now as Super Spies
    -Loyalty Promotion allows spies to never be captured
    -Treachery Promotion give spy assassination bonus chance
    -Spy duration bonuses moved to seperate promotions
    -Mission duration lowered to 5 turns
    -Den of Spies is termprariy for 10 turns

    Version 1.8
    -ROM:AND Mission Additions (Nuke City-not working, Disable Power, War Wearniness, Bribe city, Sabotage research, Remove religion, Remove corporation)
    -Dune Wars Mission Additions(Spread Lies, Exert Influence, Cause Incident, Political Marriage, Incite Anarchy, Seduce Leaders, Establish Den of Spies)
    -Cannot Annex Capital from Dune Wars
    -Fixed Assasinate CTD from RevDCM
    -Misc RevDCM Additions
    -Assasinate/Bribe AI from RevDCM
    -Tech Value Weight from RevDCM
    -Missions don’t appear unless have money from RevDCM.
    -City flip penalty
    -Gold sound from stealing treasury. Switch religion sound, player anarchy message/sound, buy city modifier (From Afforess)
    -Pedias, Strategy, & Help Text for new Missions/Buildings
    -Corrected Security Bureau/Scotland Yard XP for Spies
    -New Spy Promo Art
    -New Spy Promotion Effects
    -Commenting as david allen/advanced espionage/afforess

    Version 1.7
    -Added CounterEspionage Automation from RevDCM

    Version 1.6
    -Custom Gameoption for MOD
    -Corrected spy messages
    -Sleep for espionage

    Version 1.5
    -Added Lemon's Spy MOD
    -Added Afforess's Improvement MOD from AND
    Version 1.4
    -Updated to BTS 3.19
    Version 1.31
    -Original Standalone for 3.17

    Download Super Spies

    Attached Files:

  2. glider1

    glider1 Chieftain

    May 29, 2006
    Where animals hop not run
    Thanks for doing that and acknowledging all involved. It was a great mod and became a lot of fun over the years. A couple of points:

    1) The assassinate and bribe missions can be carried out by the AI, but are exploitable because the AI code is not particularly strong and people have complained that the missions are negative game play. I put them in essentially as an example of the basic mechanics of how espionage missions work as an instructional aid, and hopefully are commented. They can be turned off in the XML.

    2) Might be worth doing a search of the RevolutionDCM forum, because people had a few ideas for super spies that never happened. I think from memory, Phungus420 tidied up the spy promotion code to make it completely compatible with how the rest of the promotion system works, because at one stage it was not so.

    3) Might be worth linking to the original super spies thread as well because at one stage Tsheep turned up to find what had happened to his mod, was pleased, offered a comment on that forum and disappeared never to return to my knowledge.

    4) In the latest release of RevDCM, there was a very important unit automation I coded for spies I personally think. It gave the player the ability to automate counter espionage missions so that this did not have to be micromanaged if the player didn't want. The AI is far from perfect but more often than not, the tedium of having to manually counter espionage every ten turns is well worth skipping, for the sake of automated counter espionage spies that operate a litte sub-optimally. In order to extract that automation, you would have to understand the unit automation system that is standard in BTS and that Afforess extended as did I. But again, it is essentially all commented under the category of automation or the like. There is a game play issue where if you try to automate the spy in the new world, the spy conducts counter espionage, then is instantly transported back to the old world capital, and I think at that point begins trying to find sources in the old world only, leaving the new world alone.

    5) Enjoy whatever happens with super spies. I personally thought that espionage in BTS was a lot of fun.

  3. stolenrays

    stolenrays Chieftain

    Aug 2, 2009
    I appreciate the input, prasie, and I'm happy to share this with everyone because I think it is a really good mod. I've seen people asking for a 3.19 standalone version so I figured people would want it for their mods.

    In a future input I was thinking of adding the missions from Dune Wars and A new Dawn if I can extract the code successfully.

    Merging unit automations has given me a CTD the two times I have tried to merge it with my mod in progress, but not super spies. It would be a good addition.
  4. keldath

    keldath LivE LonG AnD PrOsPeR

    Dec 20, 2005
    finally some1 took the initiative to do this.

    great work my friend!
  5. stolenrays

    stolenrays Chieftain

    Aug 2, 2009
  6. stolenrays

    stolenrays Chieftain

    Aug 2, 2009
    Maybe somebody can take a look at my attached unworking mod. I've tried to add many of the missions (sleep, food, nuke, etc.) from a new dawn, but the game ctd when pressing play a new game or cutom game, etc. I included the source files as well.

    The new source code is commented as afforess.
  7. mtr12

    mtr12 Chieftain

    Nov 23, 2008
    One of the best mods I've played. I use the version merged with RevDCM.
  8. Red Key

    Red Key Modder

    Sep 24, 2011
    Great work stolenrays! This is exactly what I need for a mod I'm planning. I was considering using RevDCM with everything but Super Spies turned off, but this will be much cleaner. All I really wanted was Better BTS AI and Super Spies. Hopefully I will actually get around to making my mod soon.
  9. stolenrays

    stolenrays Chieftain

    Aug 2, 2009
  10. Red Key

    Red Key Modder

    Sep 24, 2011
    Well the one I was referring to is only in the planning stage, but it will be a fantasy mod loosely based on the game Age of Wonders. Before I seriously start working on that I need to get my Super Forts mod to a complete version because that will also be merged into the fantasy mod.
  11. LeBashar

    LeBashar Chieftain

    Feb 1, 2012
    Is here a way to add in this modcomp a choice for make spy after a mission not return in the capital city but in the closest frontier city ?
  12. stolenrays

    stolenrays Chieftain

    Aug 2, 2009
  13. LeBashar

    LeBashar Chieftain

    Feb 1, 2012
    I have use this mod, with no other sdk mods, and the assassinate mission seem don't work :
    - it ask me what unit in the city I want to kill (and not what great people)
    - the game crash if I select any unit
  14. stolenrays

    stolenrays Chieftain

    Aug 2, 2009
    The assasinate mission removes a specialist from a city, not a great person actually I believe. I'll check it out again, but I thought it worked when I tested it before release.
  15. stolenrays

    stolenrays Chieftain

    Aug 2, 2009
    I've uploaded a new version of the mod.
    It adds two things
    1. Added Lemon's Spy MOD
      -Successful spy missions take a spy back to the nearest city if applicable.
    2. Added Afforess's Improvement MOD from AND
      -Successful spy missions not in a city don't cause a spy to escape anywhere.

    It took a while to figure out the coding, but I was able to merge these two together.
  16. stolenrays

    stolenrays Chieftain

    Aug 2, 2009
  17. stolenrays

    stolenrays Chieftain

    Aug 2, 2009
  18. stolenrays

    stolenrays Chieftain

    Aug 2, 2009
  19. stolenrays

    stolenrays Chieftain

    Aug 2, 2009
  20. stolenrays

    stolenrays Chieftain

    Aug 2, 2009
    You are correct. It is also only supposed to assasinate a settled great person. I'll have to Debug it and probably use some RevDCM source code.

Share This Page