Super Spies (BTS 3.19)

Hello to everyone!

This is my first absolute post in civfanatics and of course it is related to spies...
I am relative new to civ4, but one of my preferred way to play it is through the concept expressed in this post:

http://www.civfanatics.com/civ4/strategy/suleiman_espionage.php

.. and of course with this mod!

While playing I have noticed a tedious issue with the 'Gather Intel' automation which provoke a loss of focus when selecting a unit if:

  1. At least one spy is currently in 'Gather Intel'
  2. All other units have finished their actions
  3. You want to select a fortified unit

Then, after 1 second the selected unit is automatically deselected.

I did not see any post complaining about this in the forum, so I was wandering if someone else is experiencing this anomaly.
After a comparison between the Super Spies 1.8 sources and the original Advanced Automation patch (I assume) provided by Afforess at this link, I have managed to come up with these (possibly) missing lines of codes:

Code:
--- CvSelectionGroupOriginal.cpp	2012-08-19 03:33:59.000000000 +0200
+++ CvSelectionGroup.cpp	2013-04-30 12:09:33.048757321 +0200
@@ -1178,7 +1178,8 @@
 /* Advanced Automations                                                                         */
 /************************************************************************************************/
 		case MISSION_ESPIONAGE_SLEEP:
-
+			bDelete = true;
+			break;
 /************************************************************************************************/
 /* Afforess	                     END                                                            */
 /************************************************************************************************/


I try to recompile the DLL introducing the following modification and eventually this anomaly was not anymore present.

In attachment I have provided the modified DLL, in case it is helpfull for someone else.
Thanks again for this wonderfull mod!


Thanks! Great work. I will put it in a future merge.
 
Happy it was usefull

I am currently playing Super Spies merged with:


Since, my personal opinion, works quite nice toghether.
I am still beta testing it and I was considering to upload it in the download section in case someone want to try it.

Thanks for your work!
 

Attachments

  • ColdWar.7z
    6.2 MB · Views: 95
I'm currently cleaning up the super spies promotion mechanism. I always found it hard to make new promos/mod the promos because it used existing tags whose names were not assoc with the promo function. In addition, the tags were all over the place in the C++ and I found it difficult to decipher often.

I've basically created new tags for all the promotions and I'm working on implementing them (such as isSpyLoyalty, SpyPreperationChange, SpyUnrestChange, etc.).

I've also added embryodead's SOI mission cost gametext fixes for the promotion. I've tested the spy prisoner mechanism and it works. I've altered the C++ so that you only get the 1/2 mission cost discount when using the double agent against the originalciv.

In addition, I've coded in the C++ a building check for the dunewars missions. The missions won't desplay if you've already created one of the espionage buildings in a target city.
 
v1.9 is up:

------Version 1.9-----
-Spy Captured from Total War
-Captured Spy Gameoption
-1/2 Captured Spy Mission cost only for Original Civ
-Mission Cost for Prisoners text-later
-Extra Espionage against player if captured-later
-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
 
Can you also add optio to interrogation captured spy from Total War?
 
In basic civ 4 enemy spy on when captured is automatically hang. In Total War it becomes your spy and it have mission/button torture spy. After click you receive some espionage points against native owner of spy and spy can die during torture.
 
THat option is sort of weird IMO in total war. You have a double agent who can perform missions and also you can interrogate/torture them at any time for more espionage. I figure that any double agent would automatically provide you max espionage and want to ad some upon capture in another update.

That's why I took out the interrogation part. It seemed to complicate things.
 
I am in the process of rebuilding my kitchen sink mod on top of K-Mod rather than BBAI and am working through all the mods that I layer on top. I had used the older SuperSpies mod and this one seems to be a much improved version.

One thing I have spotted is that CvBuildingInfo::isPrereqPower() will always return false. There is no XML tag definition in the BuildingInfo schema and CvBuildingInfo::read(CvXMLLoadUtility* pXML) does not attempt to read it either.

CvPlayerAI::AI_espionageVal uses this to determine the value of the DisablePower mission:
PHP:
	if (bMalicious && GC.getEspionageMissionInfo(eMission).isDisablePower())
	{
		if (NULL != pPlot)
		{
			CvCity* pCity = pPlot->getPlotCity();

			if (NULL != pCity)
			{
				int iTempValue = 0;
				for (int iI = 0; iI < GC.getNumBuildingInfos(); iI++)
				{
					if (pCity->getNumRealBuilding((BuildingTypes)iI) > 0)
					{
						if (GC.getBuildingInfo((BuildingTypes)iI).isPrereqPower())
						{
							iTempValue += 20;
						}
						for (int iJ = 0; iJ < NUM_YIELD_TYPES; iJ++)
						{
							iTempValue += GC.getBuildingInfo((BuildingTypes)iI).getPowerYieldModifier(iJ);
						}
					}
				}
				iValue += iTempValue;
			}
		}
	}
The fact that no buildings will ever return true here means that it doesn't have a negative impact, but as part of the code is on there it would be nice for modders to be able to use the mission to disable powered buildings.

There is a case for saying that this would be an overpowering mission if all powered buildings were temporarily blocked so this may be a deliberate decision, but I didn't see it mentioned in the thread.
 
Yes, the first assert is because I changed the name of the mission, but did not change the name of the espionage mission in the C++. I'll have to fix it and release it. I was planning on releaseing v1.92 anyways. Thanks.
 
Top Bottom