"Covert Operations" Mod Collaboration Thread

sman1975

Emperor
Joined
Aug 27, 2016
Messages
1,370
Location
Dallas, TX
Hello, I'm thinking about working on a mod that adds a class of units throughout the tech tree that are built to conduct espionage operations against an enemy civilization.

Full disclosure: this mod is basically a "lite" version of Tomatekh's "Great Spy" mod:

http://steamcommunity.com/sharedfiles/filedetails/?id=883589180

This mod will keep many of the missions contained in the Great Spy mod, but eliminate the "Intelligence" resource.

Other differences: this class of Smooth Operators will evolve as the civ progresses through the tech tree, gaining capabilities over time. The units will be "civilian" so they may stack with other units, but also have no intrinsic combat capabilities.

The next two posts will show the units in the class, as well as the types of missions they can perform.

Subsequent posts will be used to help further define how these units work, what promotions they have, and any other adjustments required to get them to work.

It goes without (and now with) saying: thanks for this mod go entirely to Tomatekh and all the great work he did on the mod that serves as the model for this one. In almost every way, this mod is simply kneeling on the shoulders of giants...
 
These are the units in the proposed class. The names and techs are starting points for discussion, as are everything else in the table.

upload_2017-12-21_10-46-34.jpeg
 
These are the proposed missions, largely based on Tomatekh's original vision. Any/all of these may be changed as the mod evolves.

upload_2017-12-21_11-3-8.jpeg
 
Last edited:
The "Process" of how the units operate will be something like this:

1. They will be "produced" like normal units - not purchasable. May need required (existing or new) buildings to train.

2. They may move in foreign territory like Great Prophets can.

3. They must be next to a city to perform their mission; in case of the "Pillage" mission, they must be on an improvement.

4. Three checks are then made for each mission attempted:
4a. Did the operation succeed? If so, then apply the results according to the notes in the Missions table.
4b. Did the operator survive? If so, "teleport" the operator unit to near their capital city. If not, destroy the unit.
4c. Did the operation cause an international incident? If so, determine if the target civ "denounces" the attacking civ or actually declares war. If DoW, then all allied AND friendly civs "might" DoW as well

5. International Incidents: The target civ has the option to Denounce or DoW, based on criteria TBD. Allied and Friendly civs also have the option to do nothing, Denounce or DoW - also based on criteria TBD.

-----

Open to any suggestions how to adjust/improve this process.
 
Wow! :D I am excited for this mod. I think these units should be harder to obtain or else they would make the "normal" spy obsolete. I think you should build your mod with JFD's Cities In Development mod. That mod has lots of new "yields" that might come in handy, especially the health mechanic in that mod, you can enable your unit to spread plague. The counter to this will be the unit should be limited and hard to obtain. I know its alot to ask but please make it compatible with Vox Populi.
 
Thanks, Mr. Conor. I haven't quite made up my mind on how best to proceed on some of these issues. One of my main reasons for working on a "lite" version of the Great Spy mod is I think that mod adds a bit too much complexity to normal game play. I'd prefer this mod to be a minor addition that doesn't take a separate game manual to learn how to use. Basically, the KISS principle.

One of the things I was thinking about was to force them to spawn like Great Generals do - sort of a result of a process, instead of production/purchase. Or award the unit at random intervals during the game - or tied to certain buildings/techs/policies.

But, even if we stick with the basics and produce the unit normally, there are some things that will/should keep players from going to this well too often. For one thing, the units should be quite expensive to produce. Also, there is a good chance they will fail at their mission. There is also a good chance they will be destroyed after their mission. There is also a good chance their mission, whether successful or not, will cause a war against the aggressor civ that a bunch of other civs would join. All of these should have some inhibiting factor on their use, I think.

The plague is part of the Great Spy mod, tied to spreading to cities that have trade routes with the attacked city - a mechanic I actually like quite a bit, especially if it causes an International Incident as well. Will probably save this mission for V2 (using my typical "crawl-walk-run" approach to modding).

Regarding compatibility: the beautiful thing about Tomatkh's design is that it doesn't replace the game's 'UnitPanel.lua' file like so many other mods do (believe VP does, and wouldn't be surprise if CiD does too). This would make it automatically incompatible. As would using non-standard yields like CiD. If I keep it simple (KISS) it will help compatibility quite a bit.

So, as I don't use VP or CiD, I'd really appreciate your help when it comes time to test this mod. I could probably build some test cases but as I don't know how to properly use those other mods, the test really wouldn't be looking at many of the features those mods provide. Someone familiar with them really would know how to push my mod around to make sure it's not only compatible, but also stable/complimentary with those other mods.

Will let you know when that time comes. Currently, I'm working on getting the UI/interface features in place - which I'm almost done with. I'm hoping to have the first 2 units (Vagrant/Arsonist) working in the next few days. At that point, I'll stop development, and ask for some help testing the design for stability, playability, and yes compatibility with a few other choice mods. If the design holds up, it really would be fairly straightforward to add the other units/missions, as the framework would already be in place.
 
Its great to see some modders still actively developing mods for civ 5 considering alot of modders have already jumpship to civ 6...... or maybe its just I am too clueless to realize the activity of this great community:lol:
 
Thanks. I've played Civ 6 quite a bit, but to be honest, I think I prefer 5. Just never got into the cartoony graphics for some reason. There are things I like about 6's design, but about anything I like there can be modded here... Last time I checked (several weeks ago), there were still a lot more 5 players than 6. Not sure if that's still true, but it would say a lot, I think, about what people really like.

I've got the interface working - basically a "Covert Operator" type unit can pop open a mission select window - and choose from 12 different missions. It looks pretty good and should be compatible with just about everything.

Next steps are to put working code into the first 3 missions (Poison Water, Spread Rumors, and Pillage). The code is written, but not completely integrated into the working version of the mod. After this, testing will be required.

At that point, I'd like to hand the mod over to you so you can test drive the first two units to see how you like the overall set up of the mod - and get feedback on how to make it better. I'm expecting a highly iterative process, as we work through the 12 missions and 8 units.
 
Status update. About all the framework code is done - meaning the experimental mod is working, but with only one unit (out of a class of 8) and 3 missions (out of 11 total) functional. Adding the missing pieces is fairly quick, though, now that all the rest of the mod is in place and working. Hope to have the first version available for testing in the next 3-4 days (with all units, and all missions).

Some "teaser" photos to show you how it's working - and solicit feedback if you see anything needing changing - while it's still relatively early... I'm especially interested in help adjusting the proposed mission results numbers in post #3. I don't want to make completing these missions too easy, but I'm also worried about making them so hard that no one will use them at all. Setting these numbers at the "right" level will be the hardest part of the entire mod!
 

Attachments

  • upload_2017-12-23_12-24-11.jpeg
    upload_2017-12-23_12-24-11.jpeg
    740.8 KB · Views: 502
  • upload_2017-12-23_12-24-25.jpeg
    upload_2017-12-23_12-24-25.jpeg
    743.9 KB · Views: 480
  • upload_2017-12-23_12-24-46.jpeg
    upload_2017-12-23_12-24-46.jpeg
    784.2 KB · Views: 485
  • upload_2017-12-23_12-25-13.jpeg
    upload_2017-12-23_12-25-13.jpeg
    423.6 KB · Views: 487
  • upload_2017-12-23_12-25-27.jpeg
    upload_2017-12-23_12-25-27.jpeg
    685.4 KB · Views: 432
  • upload_2017-12-23_12-25-40.jpeg
    upload_2017-12-23_12-25-40.jpeg
    730.3 KB · Views: 433
  • upload_2017-12-23_12-46-41.jpeg
    upload_2017-12-23_12-46-41.jpeg
    490.8 KB · Views: 466
Last edited:
Status update. About all the framework code is done - meaning the experimental mod is working, but with only one unit (out of a class of 8) and 3 missions (out of 11 total) functional. Adding the missing pieces is fairly quick, though, now that all the rest of the mod is in place and working. Hope to have the first version available for testing in the next 3-4 days (with all units, and all missions).

Some "teaser" photos to show you how it's working - and solicit feedback if you see anything needing changing - while it's still relatively early... I'm especially interested in help adjusting the proposed mission results numbers in post #3. I don't want to make completing these missions too easy, but I'm also worried about making them so hard that no one will use them at all. Setting these numbers at the "right" level will be the hardest part of the entire mod!

Looking good! Are those custom models?
 
The test model is a custom one, done by Hangman:

https://forums.civfanatics.com/resources/chimu-general.22951/

The other seven units will come from various models already in the game (i.e. a repurposed Merchant of Venice, one of the Modern Artists, etc.) - assuming I can get them to work properly (low risk actually). Should start working on those in the next few days.

Very distracted these days - with the holidays and quite a few visiting family over the next couple of weeks. Am having a hard time getting to my "job" lately... :D
 
Update: have completed work on missions # 2 through 14, and all are working fairly well, and the mod seems stable:

upload_2017-12-27_17-40-45.jpeg

Started work on mission #1, conduct recon. There are 38 different types of reports that are possible. The shot below shows the types of reports - which will be either "local" (focused on the city the Operative is reconning) or "Global" (which concern data at the target civilization level). The second column of numbers represents the chance of this report being generated (when the function generates a random number between 1 and 100).

upload_2017-12-27_17-43-43.jpeg

The reports are influenced by a couple of issues: there is a random "quality" number set to the data in the report, which will alter it's actual numbers. The four quality settings are "Almost Certain", "Probable", "Possible", and "Rumor."

These quality settings will adjust the data + or - 10%, 15%, 20%, and 25% respectively.

There is a 15% chance the report will be "Almost Possible" or "Rumor." There is a 30% chance a report would be "Probable" or "Possible."

For example, an Operative conducts a successful recon mission that reports a city's happiness (local mission #6). The actual local city happiness is 10.

If the function determines the quality of the report is "Possible" - the final report will issue a statement like this:

Agent M. Holmes has received report that the local happiness in St. Petersburg is 12. The quality of this report is assessed to be 'Possible.'

Or, a different version of the same quality of report could read:

Agent M. Holmes has received report that the local happiness in St. Petersburg is 8. The quality of this report is assessed to be 'Possible.'

Hope to have some screenshots of some of these tomorrow. Most of these reports are simple db queries so they should be put into place quickly.

Still need to add a few units, but that shouldn't take very long either.

Still would really appreciate some feedback on the "chance" columns on the first picture - from play testing it seems they are already too severe - with respect to survival and incidents. I wanted them to represent an incentive to be quite selective in using Operatives, but as they are now, they are probably much to inhibiting. It's one of the key questions I'll be asking during testing: where should these numbers be?
 
Here is a screen shot of the "conduct recon" mission. There are 38 possible reports (10 about the adjacent city, 28 about the target civ). I have about 3 of the reports working, but the code is built in a scalar approach, so adding the new reports should go quickly. Appreciate any feedback on the format. Thanks.
upload_2017-12-28_10-27-29.png
 
Work continues - mostly improving performance of the code and creating different version of the report windows - to see what looks/works the best. Latest version:
upload_2017-12-28_17-29-27.jpeg

All of the 11 "local" reports are finished. Hope to finish the "global" reports in the next day or two.
 
Quick update - sorry no screenshots - too late... :sleep:

But, all of the 14 missions are working, including mission #1 (conduct recon). And the conduct recon reports (12 local, and 29 global) are completed as well. So the majority of the work (and the most risky) is completed, and unit tested.

The remaining main tasks are to add the other 7 units (not much of an issue), and add a "simulated" version of these missions that the AI can use.

I've tried to force the AI to use civilian type units wisely, but no matter how much direction you give them , the AI will just fritter them away and gain nothing in the process. As this represents a significant human player advantage, I am planning on adding occasional "events" - similar to how Spies in the basic game steal tech. You'll receive a notification of some sorts, possibly nebulous, warning of some kind of vague activity in an area near you. A few turns later, if the AI's mission is successful, certain adjustments to your stats will be made (e.g. loss of gold/culture/research or golden age progress, etc). If you're lucky or have lots of the correct buildings/techs, you'll be able to determine who conducted a covert op against you. You can then decide if you want to denounce, declare war, or fergetaboutit.... Can discuss this later, after the "human friendly" version is released for testing.

There are quite a few items remaining on my punch list to complete before release for testing (V.0). Some may not be completed before V.0 escapes, er, I mean is released... Will have a better report tomorrow. Cheers!
 
A fairly productive day. Here are some screenshots, with some discussions following in the next post.

upload_2017-12-30_17-29-33.jpeg upload_2017-12-30_17-29-50.jpeg upload_2017-12-30_17-30-3.jpeg upload_2017-12-30_17-30-19.jpeg upload_2017-12-30_17-30-33.jpeg upload_2017-12-30_17-30-45.jpeg upload_2017-12-30_17-30-58.jpeg upload_2017-12-30_17-31-12.jpeg

All missions are completed, tested, and appear to work well. All recon reports completed and tested, also working well.
 
Most of the punch list is finished. Today focused on :

* Added routines/logic to improve mission results (mission success, operator survival, and chance of international incident) - based on Covert Operator level. Basically, later appearing units should perform earlier missions better than earlier units.
* Adjusted the "escape plan" of Operatives - basically, the higher the level, the better chance they have of remaining in the area after an operation. Saves a lot of time moving Operatives back to target cities over and over again.
* Worked a lot on the "international incident" results. Basically, if you're already at war, then there isn't an international reaction if you launch a Covert Operation against that civ. It's expected, no?
* Simplified and improved much of the code, removing many of the test features, preparing it for actual release.
* The possible "Incidents" has been better defined/programmed/tested.

The possible incident responses are:
(1) Target Civ does nothing [20% chance]
(2) Target Civ launch protest [no real game effects, 20%]
(3) Target Civ Denounces [15%]
(4) Target Civ and any civ it has a DOF with has a 66% chance to denounce [15%]
(5) Target Civ declares war [10%]
(6) Taget Civ and any civ if has a DOF has a 66% chance to declare war [10%]
(7) Target Civ declares Permanent DOW [5%]
(8) Taget Civ and its DOF's have 33% chance of DOW. Any civ who has denounced the aggressor (i.e. human) player has a 22% chance DOW. All other civs known to the aggressor have a 10% chance to DOW. [5%]

Also, on responses #2-8, there is a (50% - any Excess Happiness) chance, with a floor of 20%, that the citizens in the aggressor (i.e. human) capital will enter resistance for a few turns, depending on the response.

Work still left to do in V0 (the version I'll release for initial testing. Not rated BETA, more EXPERIMENTAL):
* A bit of effort is required to add more protective logic into the mod. More checks for nil variables, more traps for unexpected issues, dead civs, proper enumeration/constants management, etc.
* Some work is needed to isolate major player cities/targets from city states. Most of the mod treats them as equals, but this isn't really true and shouldn't be. More than a few restrictions need to be added so that only a small subset of capabilities can be launched against city states.
* The final 7 units in the class need to be added
* Some improvements need to be added to the UI controls, so they work more intuitively
* Some data are needed to round out the Civilopedia, other text fields. Goal is to add everything there and not need a separate game manual
* Optional: add a unit naming function to add names/color to the units.


Planned upgrades for V1 (V1 is the initial BETA version - the next version will be V2, after much testing, tweaking of V1). V2 should include:
* AI Function: the "biggie." This is the function that "simulates" the AI having the same capabilities as the human player in the mod. Will discuss this in a separate post.
* Add a "Check Diplomacy" button to the Mission Popup (the one with the menu of operations to choose). The button will give a few lines of data about the target civ: who are they at war with, who are friends, etc.
* Buildings (new): Add a few buildings that will improve Operative mission results, and/or limit enemy Operative results. Perhaps add them as prerequisites for building the Operative units
* Buildings (existing): Alter a few buildings so they may have similar benefits as the new buildings in the previous point.
* Add any suggested recon reports, e.g. Visibility of X tiles around a city, Number of Spies Assigned/Unassigned to a civ, etc.

The work remaining would really require about a week of solid work/testing. Unfortunately, I'll be in and out the next week or so, and will have limited time to make progress. So, hopefully, in the next couple of weeks I can get V0 ready to test. Based on how stable it is and the magnitude of changes required, go final with V1 a week or so after that.
 
Last edited:
Top Bottom