Resource icon

Covert Operations V5

Summary of Changes (V5):

- Removed the possibility of denouncements from unknown Civs.

- Fixed the "Covert Ops Menu" problem that when you used the Escape key to exit the "Espionage Overview UI" it would corrupt the entire UI. Using the ESC key is now safe.

- Changed the ToolTip when you hover over a Mission in the "Covert Ops Menu" – it now factors in relative Espionage Postures in adjusting the "Odds of Mission Success" and "Odds of International Response." The odds show will be much closer to reality than the generic chances shown before.

- Ideologies now impact Covert Ops. Civs with Autocracy perform better than normal, Civs with Freedom perform worse, while Civs with Order (or no Ideology) perform normally.

- Having certain Social Policies can improve or harm Covert Ops performance: Aesthetics, Republic, Ethics, Cultural Diplomacy, Treasure Fleets, and Humanism lower Covert Ops performance. Citizenship, Military Caste, and Professional Army improve Covert Ops performance.

- The function that selects the target Civ for AI Covert Ops now also considers game score. The function now sometimes will select targets based on higher score.

- The function that selects the target Civ for AI Covert Ops now will not allow Civs on the same team to be attacked by other Civs on that team.

- The function that selects the target city for Covert Ops now factors in 'visibility' –the attacking Civ must be able to "see" the city in order to attack it. However, the target Civ's capital is always available to be attacked, regardless of attacking Civ visibility.

- Added the ability to remove notifications of an available Covert Op by changing a setting in the "Enable/Disable Covert Op Popup."

- Nerfed the chance for 'Permanent War' as a response to a Covert Op in half (now is 2%).

- When looking at a specific Spy who is assigned in a foreign city, the ToolTip in the left-side panel contains basic information about the city and owning Civ – similar to some of the data in Reconnaissance Reports.

- The cost of the 'Conduct Reconnaissance' mission is greatly reduced, as is the possibility of an international response.

- Conducted further testing to ensure compatibility with the "SMAN's World at War" main mod.

- Cleaned up a few typos and other code issues.
V4 --- Latest version of the mod. Lots of changes:

-----------------------------------------------------------------

Added a new UI that allows players to easily enable/disable Covert Ops.

Added a new UI that allows players to select specific buildings in a city for the "Sabotage Building" Covert Op. They may choose a specific or "random" building. The odds of success for a specific building are half as much as for the random building. If the city has no normal/non-wonder buildings, this mission will be disabled for that city.

Completely rewrote the "target civ/international community response" routines – new version should be much more stable, reliable.

Added functions to connect the results of this mod into the game's Diplomacy system. Target civ reactions to being attacked by Cos will alter their opinion of the attacking civ. These changes occur to both major civs and City States.

Changed the "You have the possibility to launch a Covert Op" Notification button. Now, when you click on the Notification button/icon, it directly opens the "Espionage Overview" UI.

Cleaned up AI "select target city" and "select mission" functions – removing legacy artifacts and resolve some minor discrepancies. New versions are more streamlined and reliable.

Added City States to the list of target cities for the AI to attack.

The AI mission now cost is now 1/3 the price of what the human player pays, down from 50%. This should assist the AI in attempting higher level missions.

Added checks for AI missions that prevents deducting gold if the mission turns out to be infeasible: i.e. if the planned mission as "Assassinate Great Person," and no Great Persons are near the city, the AI will not be charged when the mission automatically fails.

Fixed an error calculating damage for the "Sabotage Unit" mission.

Nerfed "Spread Rumors" and "Spread Propaganda" success chance. These were supposed to be somewhat less impacting than they actually are, so there is a need to make them less successful.

Buffed the success chance for most other missions – during play testing, it just seemed like the benefits for a successful mission didn't outweigh the costs/risks, primarily due to low success chances. Increasing the success chances, while keeping the costs/risks the same provides for a better "risk vs. benefit" analysis.

Buffed the chances of identifying Covert Ops attackers. Added a minimum chance of 33%, up from 0% previously.

Adjusted the message when the AI mission "Assassinate Great Person" fails due to lack of targets.

Added a check of a Leader's Loyalty stat to impact the likelihood of an attack when there is a Declaration of Friendship between the attacker and the prospective target.

Buffed the formulae for the human player to identify civs launching Covert Ops

AI Mission scheduling: cleaned up/streamlined formulae for more consistent results in scheduling missions.

Reversed the Declaration of War function, so that the Covert Ops "attacker" gets warmonger penalty, not the defending civ.

Changed the text key displayed when opening Espionage Overview before spies are enabled. It now refers to the starting Era as "Classical" not "Renaissance."

Added displaying of the Espionage Posture value to the "CO Mission Select" menu, and to the Spy Viewing panel within the Espionage Overview UI.

FIRs: updated the code, so the human player must have met either the attacking or defending civ to get the report; fixed the "future FIR" problems so the mod no longer displays the incorrect game turn in the message.

Added a "garbage collection" function to AI mission table, so it updates/closes out missions that fail to launch for whatever reason.
The latest version of the mod - with many, many changes (see below).

Am planning on releasing a V4 in a couple of weeks. With sooooo many changes on V3, there's lots of opportunities for hotfixing coming up, so I'm planning on a much smaller V4 to fix anything I broke here. V4 will also have a popup menu that allows for much easier enabling/disabling missions.

-------------------------------------------------------------------------------------

V3 Changes:

Cleaned up/simplified mission removal process. It is now possible to make a small, simple text change in the Globals file that will safely remove an unwanted mission from the game.

Added several popup menu pre-checks. The "You Can Launch a CO" notification now only appears if the human player actually has at least 1 valid mission that can be legally conducted. Before, you would get the Notification, even if all your spies were moving and unable to actually conduct a mission.

Menu Pre-Checks: Missions that cannot possibly succeed are removed from the menu so they cannot be chosen. For example, if there are no Great Persons around a target city, you will not see the "Assassinate Great Person" mission on the menu. If there are no target civ units near the city, the "Sabotage Unit" will not appear. If there are no improvements, then "Pillage Improvement" will not appear. If the attacking civ has no spare Uranium, then the "Nuclear Suitcase" mission will not appear, etc.

Nerfed mission success chances and lowered frequency of AI mission launches.

Added the "Nuclear Suitcase" mission. New mission damages city defenses, units, and leaves fallout – both on the ground and in the political environment. A civ must have 1 free Uranium resource to conduct the mission.

Added a check to the AI Target Selection routine that cuts the chance roughly in half of a civ becoming the target of an attack if they have a DOF with the attacking civ. Making friends with other civs will definitely lower your chances of being attacked with Covert Ops by them!

Added difficulty-based AI mission success adjustment, so that at higher difficulties, the AI has a greater chance of CO mission success. At King, there is now +2% increased chance of success; at Emperor +4, at Immortal +6, and at Deity +8.

Buffed Agent Rank impact to Espionage Posture.

Fixed formula error in Steal Gold mission so it would get the correct amount of gold.

Increased chance of perma-war, decrease chance of allied denounce/DoW.

Fixed an error in the "Sabotage Production" mission that did not remove the correct amount of production for National Wonders.

Modified AI mission selection function to allow a wider variety of mission choices when AI is low on Gold; expanded possible random missions so later eras would see more advanced missions.

Adjusted the AI mission scheduling routine, so they would not schedule missions too early in the game.

Added improved international response messages when the human player is the target civ; increased the chances of getting more details about the attack and attacking civ.

Changed AT Target Selection function so that it now also considers known civs with the highest score as an additional criterion in deciding who to attack.

Changed "Poison Wells" and "Spread Plague" missions so they remove all excess food from the city. Buffed upper limit to population loss.

Increased the occurrence of Foreign Intel Reports (FIR) – and increased chances of getting more details in those reports.

Added a test to AI Mission Execution function, so that now an attacking civ must be alive at time of launch, not just at time of scheduling.

Increased the Palace, Police Station, National Intelligence Agency impact on Espionage Posture.

Added a stat collecting/reporting function to assist in better setting mission success, international response, and other criteria.

Added a random adjustment to the "Combat Ops Propensity" values for each leader – which should provide some variety in leader behavior between games.

Fixed several formatting issues with the popup windows, which were squeezing text placement at the top of the messages and cropping text from the bottom of the popup.

Changed the Conduct Recon mission reports so that no "number of nuclear units" report will occur before the target civ reaches the Atomic Era.

Cleaned up code/globals, removing non-used legacy code.
Quick fixes, mostly. Other changes:

- Fixed a few typos; a few more to go…
- Allowed Diplomats who are "Schmoozing" to conduct COs
- Changed the minimum mission cost from 10 Gold to 0 – so you can steal gold if you're broke
- Changed the name of the "Poison Water" mission to "Poison Wells"
- Fixed an error that caused CO mission Notifications to appear too early
- Increased chances for getting foreign CO reports
- Increased specificity thresholds so more/better information would be included in both RUMINT warnings about attacks against your civ, but also foreign CO reports
- Added high score as an additional criterion for AI Target Civ Selection
- Fixed errors in the AI Target Civ Selection function to get better, more consistent results
This is the "unitless" version of the mod, so if you're enjoying the units, take care when downloading this so it doesn't overwrite.

Steam link: http://steamcommunity.com/sharedfiles/filedetails/?id=1293662755
This latest version is (what I think) the final version of the BETA - ready for testing.

I'll collect feedback for the next couple of weeks, then integrate all changes into the Final BETA to release both here and on Steam.

Changes on this version:
- Refined AI covert ops functions to get them working better/more reliably.
- Added the overrides.sql file, which allows players to easily remove buildings/units from the game, albeit with some warning
- Reworked/renamed several art files so they would not cause any conflict with other mods that may use similarly-named files
- Switched the "Provocateur" and "Radical" units - the stats are the same, but the artwork and unit name switched. The old Provocateur just looked more like a Radical to me.
- Cleaned up some of the UI code, e.g. entering the city view screen now hides the Cover Ops backgrounds while in the city view, then restores them upon exit
- Cleaned up several functions, formulae, etc., adding additional test/traps to improve code stability
Latest version.

Major change: Addition of the AI Covert Mission function.
Incremental developments, no major changes to existing functionality. Summary of changes:
- Several, uh, "typos" corrected in this version
- Cleaning up the code to prepare for adding AI Covert Ops
- Adding in more traps and safety checks
- Added a more "fiery" version of the Arsonist unit

One thing to watch for while testing: I've seen a few odd instances where the Covert Ops Launch button temporarily stops working. I'm having difficulty reproducing the problem on a consistent basis. Perhaps I've built too many versions of the mod during testing without clearing the cache.

(Technical discussion: the pUnit pointer is nil in line 15 in file '01_Mission_Launch_Button.lua' - which causes the callback to fail, so the Mission Popup never launches. The next turn, the pointers all seem to work correctly.)

Only semi-consistent cause I think I've found is the button goes inop after a previous unit is banished back to the friendly capital after a mission. When I try to press the Launch Button, nothing happens. Sometimes. On an inconsistent basis. Next turn, all units work fine.

Perhaps it's on my end - but if you see something like this please let me know. It's something I haven't seen at all before, so I'm hoping it's nothing.

EDIT: I found the error. One of those instances where I had working code and saw a line or two that I thought could use a little "improving" - and in a way that could NOT POSSIBLY cause an issue.... Man, I've got to stop doing that! ;)

Still - it's only a minor problem affecting a covert op unit after a different unit has to flee to the capital - and the problem goes away when you select a different unit then come back to the unit. Sorry about that!
Top Bottom