End of Espionage

PieceOfMind

Drill IV Defender
Retired Moderator
Joined
Jan 15, 2006
Messages
9,319
Location
Australia
End of Espionage Mod:ar15::espionage:
---------------------
For BtS 3.19

Download here: http://forums.civfanatics.com/downloads.php?do=file&id=13540

Written by PieceOfMind 28/10/09

Description:
I was tempted to call this "Better No Espionage"...:mischief:

This is a mod which changes the game by basically reverting everything related to espionage back to how it was in Warlords (that is, when espionage wasn't a feature of the game!).

In BtS the game designers for some reason decided to implement a No Espionage option not by removing espionage related features as you might expect but by simply converting all espionage points into culture and all great spy points into GP neutral points. As a result, they also decided to raise the thresholds for Legendary culture because you could get a lot of culture from espionage buildings (An intelligence agency alone produced a minimum of 12 culture).

End of Espionage Mod undoes these absurd rule changes.:nono: You can no longer hire spy specialists to help avoid polluting the GP pool, for example. The intelligence agency and security bureau are simply disabled in the game.

This mod is intended to be used with the game option No Espionage enabled. As such, No Espionage is set by default in the xml.

Unfortunately it is very difficult to limit the gameplay changes to only those games when this option is checked. For example, there was no simple way to make the intelligence agency and security bureau only available in No Espionage games, so they had to be removed. These two buildings will not be available if you play without the No Espionage setting.

The AI's evaluation of espionage buildings (e.g. courthouse and jail) has been corrected so that it does not mistakenly think it will be getting culture or any espionage benefit by building them. Any value placed on the jail and courthouse will be purely for their non-espionage benefits.

This mod is MP-compatible. The ability to use this in MP is one of the main reasons I wanted to make this mod.

It should not be difficult to merge this with other mods if you wish to do so.







Version History:
----------------
v0.1
----------------


SDK modifications: (Can search for the string "End Of Espionage Mod" for any and all changes made)
------------------
-Espionage is no longer converted into culture in the city (CvCity.cpp) (1 change)
-AI no longer values the espionage points of buildings when it is wanting to get more culture in its building choices. Also doesn't value the effect of espionage percentage modifiers. (CvCityAI.cpp) (3 changes)
-Culture thresholds are no longer doubled under the No Espionage setting. (CvGame.cpp) (1 change)
-No longer need to show espionage that gets converted to culture in the City screen when you hover over the culture breakdown. (CvGameTextMgr.cpp) (1 change)
-Espionage points for the player are no longer converted to culture (CvPlayer.cpp) (1 change)


(5 files)
CvCity.cpp
CvCityAI.cpp
CvGame.cpp
CvGameTextMgr.cpp
CvPlayer.cpp



XML modifications:
------------------
-No Espionage is enabled by default in the XML.
-Espionage points removed from courthouse, jail
-Espionage modifier removed from jail
-Courthouse and jail no longer allow spy specialists
-Jail iAsset reduced to 1 from 3 (same as it was before BtS)
-Forbidden Palace give +1 towards great merchant instead of +1 towards great spy.
-Great wall gives +1 towards great engineer isntead of +2 towards great spy. This is what it was in Warlords.
-Cost of great wall increased to 250 from 150, as it was in Warlords.
-West Point gives +1 towards great engineer instead of +1 towards great spy.
-Kremlin is now +2 towards great merchant instead of +2 towards great spy.
-Kremlin no longer give spy specialist slots.
-Pentagon gives +2 towards great engineer instead of +2 towards great spy

(2 files)
Assets\XML\Buildings\CIV4BuildingInfos.xml
Assets\XML\GameInfo\CIV4GameOptionInfos.xml





Notes:
------

Since BUILDINGFOCUS_ESPIONAGE being used at all depends on the no espionage setting being enabled, it can be safely assumed that anywhere this appears in the code it will be false if No Espionage is enabled.


To do:
+What effect, if any, does FLAVOR_ESPIONAGE have on buildings if No Espionage is enabled?
 
Could you also merge this with PIG?

Should be able to. I might do that with the next PIG version, releasing this as a separate download along with it.

But for now, I was hoping I might get some comments on whether anything else needs to be changed. It's very possible I've missed something that needs to be done, as I haven't actually played through a game with this mod yet.

As an example, before BtS you used to be able to get vision of cities by owning the shrine of a religion that was in the city. Should this be re-introduced or was it too powerful? It was kinda removed since espionage replaced it.
 
For this modcomp to really be useful, you're going to need to find a way to reimplement the core BtS features such as the intelligence agency when No Espionage is not checked. I'd think the best way to go about this is to put in a check for isNotBuildable in the SDK, and if the only effects of the building are espionage related to return true (all non espionage related integer and boolean XML tags return zero). Since you almost have it all set up, I think this wouldn't be too hard. Granted I don't know how to run a check over a buildings XML atributes and look for non zero returns, but it has to be possible, and such a setup would fix this modcomp, ie make it useful for merging into other mods, such as RevDCM.
 
For this modcomp to really be useful, you're going to need to find a way to reimplement the core BtS features such as the intelligence agency when No Espionage is not checked. I'd think the best way to go about this is to put in a check for isNotBuildable in the SDK, and if the only effects of the building are espionage related to return true (all non espionage related integer and boolean XML tags return zero). Since you almost have it all set up, I think this wouldn't be too hard. Granted I don't know how to run a check over a buildings XML atributes and look for non zero returns, but it has to be possible, and such a setup would fix this modcomp, ie make it useful for merging into other mods, such as RevDCM.

I agree.

I am not expecting many people to want to use this mod in its current form, though I was thinking about hosting a MP game with this...

Most of your suggestion shouldn't be too hard I agree, but I really lack the experience with doing that sort of thing.

What I had thought of doing was making another XML tag for every building, or possibly a new tag in each building list for every value that can be different in a No Espionage game, and find all the places in the SDK that refer to those esp-related aspects of buildings and put in a bunch of if functions. I hope that made sense, :lol:.
 
Yeah, that would be simpler. Actually I need to put in a gameoption tag that makes units untrainable as well. It will be pretty straight forward, just haven't done it because I need an array to check for trainable civics for the unit before the gameoption tag is useful (and I can't figure out how to set up such an array). The isNotTrainable and isNotBuildable functions in CvCity are pretty much identical though, for all practical purposes; so yeah, setting up a <szGameOptionNotBuildable> tag will be pretty trivial. If you want I can do this for you, since I'm interested in getting this modcomp fully functional so I can persuade jdog and glider to merge it into RevDCM anyway. Of course if you'd rather do it, feel free, I probably wouldn't get around to it for a couple days if you want me to add that tag to BuildingInfos.
 
Yeah, that would be simpler. Actually I need to put in a gameoption tag that makes units untrainable as well. It will be pretty straight forward, just haven't done it because I need an array to check for trainable civics for the unit before the gameoption tag is useful (and I can't figure out how to set up such an array). The isNotTrainable and isNotBuildable functions in CvCity are pretty much identical though, for all practical purposes; so yeah, setting up a <szGameOptionNotBuildable> tag will be pretty trivial. If you want I can do this for you, since I'm interested in getting this modcomp fully functional so I can persuade jdog and glider to merge it into RevDCM anyway. Of course if you'd rather do it, feel free, I probably wouldn't get around to it for a couple days if you want me to add that tag to BuildingInfos.

Go for it. I've no problem with you changing this however you like or even completely rewriting it (as you probably will need to do).

If you want to make a modcomp out of it though (or help make a modcomp out of it), would it depend on RevDCM? I'd assume no but I'm just checking.

Here are the main things that would need to be handled differently depending on whether No Espionage is enabled or not.

  • Building can be built (e.g. intelligence agency, sec bureau)
  • Whether an espionge modifier would be displayed in any help texts (e.g. for jail and Nationhood civic). The alternative is to have a way to remove these modifiers when NoEsp enabled.
  • Whether an espionage point bonus (e.g. courthouse) would be displayed in help texts.
  • Cost of some buildings (i.e. great wall)
  • Great person type for some buildings (e.g. pentagon, forbidden palace)
  • Specialist slots provided by a wonder or building. Alternatively, find a way to ban all spy specialists and remove spy specialists from any help texts.
  • Number of great people points for wonders (great wall)
  • iAsset value (jail)

I'm sure you get the idea.

I'm glad you think this will be trivial. :D


This might be a good time to mention/remind that there are many places in the code that refer to the gameoption_no_espionage but only some of them needed to be changed to produce the desired behaviour for the No Espionage setting.

All of the XML changes are fixed regardless of whether esp enabled or not.
 
I guess I'm not understanding. I was under the impression your modcomp does all this:
  • Building can be built (e.g. intelligence agency, sec bureau)
  • Whether an espionge modifier would be displayed in any help texts (e.g. for jail and Nationhood civic). The alternative is to have a way to remove these modifiers when NoEsp enabled.
  • Whether an espionage point bonus (e.g. courthouse) would be displayed in help texts.
  • Cost of some buildings (i.e. great wall)
  • Great person type for some buildings (e.g. pentagon, forbidden palace)
  • Specialist slots provided by a wonder or building. Alternatively, find a way to ban all spy specialists and remove spy specialists from any help texts.
  • Number of great people points for wonders (great wall)
  • iAsset value (jail)

My understanding was I just need to add a szGameOptionCanNotBuild and szGameOptionCanNotTrain tag in BuildingInfos and UnitInfos respectively. If this modcomp doesn't do the things in your list then I'm curious about it's function. Unfortunately if it's not at this state then I am niether willing nor capable of doing it. Like I said I just thought everything was done, you just couldn't get the buildings not to be built with the gameoption on, and that was the only thing missing.
 
My understanding was I just need to add a szGameOptionCanNotBuild and szGameOptionCanNotTrain tag in BuildingInfos and UnitInfos respectively.

Do you have any idea how useful that would be!? I can't believe no one has ever made that before. So many game options I never made because of that very problem...
 
I need those anyway. I will add those tags to the RevDCM source sometime tomorrow, and upload them into the Specific Code Suggestions thread. Honestly though it wol't be hard, it's just adding a string tag to the XML, and then adding a If gameoption, return true line in CvCity's canNotTrain function.
 
I guess I'm not understanding. I was under the impression your modcomp does all this:
  • Building can be built (e.g. intelligence agency, sec bureau)
  • Whether an espionge modifier would be displayed in any help texts (e.g. for jail and Nationhood civic). The alternative is to have a way to remove these modifiers when NoEsp enabled.
  • Whether an espionage point bonus (e.g. courthouse) would be displayed in help texts.
  • Cost of some buildings (i.e. great wall)
  • Great person type for some buildings (e.g. pentagon, forbidden palace)
  • Specialist slots provided by a wonder or building. Alternatively, find a way to ban all spy specialists and remove spy specialists from any help texts.
  • Number of great people points for wonders (great wall)
  • iAsset value (jail)

My understanding was I just need to add a szGameOptionCanNotBuild and szGameOptionCanNotTrain tag in BuildingInfos and UnitInfos respectively. If this modcomp doesn't do the things in your list then I'm curious about it's function. Unfortunately if it's not at this state then I am niether willing nor capable of doing it. Like I said I just thought everything was done, you just couldn't get the buildings not to be built with the gameoption on, and that was the only thing missing.

Sorry, I wasn't very clear.

These things are all changed in the XML regardless of whether No Espionage is enabled or not:
-Espionage points removed from courthouse, jail
-Espionage modifier removed from jail
-Courthouse and jail no longer allow spy specialists
-Jail iAsset reduced to 1 from 3 (same as it was before BtS)
-Forbidden Palace give +1 towards great merchant instead of +1 towards great spy.
-Great wall gives +1 towards great engineer isntead of +2 towards great spy. This is what it was in Warlords.
-Cost of great wall increased to 250 from 150, as it was in Warlords.
-West Point gives +1 towards great engineer instead of +1 towards great spy.
-Kremlin is now +2 towards great merchant instead of +2 towards great spy.
-Kremlin no longer give spy specialist slots.
-Pentagon gives +2 towards great engineer instead of +2 towards great spy

All of the SDK changes, on the other hand, only affect the game when No Espionage is enabled.

It's not just a matter of making things like the security bureau and intelligence agencies banned from being built under No Espionage, that would take a very simple change as you said. It's about making changes to all those other buildings etc. only happen when No Espionage is enabled. If you want the great wall to give great engineer points when No Espionage is enabled and give great spy points when it isn't enabled, then you can't just rely on what has been done so far in this mod.

The consequences of No Espionage are kinda far reaching.

By the way, this is what I said in the OP: (with a typo I just fixed...)
Unfortunately it is very difficult to limit the gameplay changes to only those games when this option is checked. For example, there was no simple way to make the intelligence agency and security bureau only available in No Espionage games, so they had to be removed. These two buildings will not be available if you play without the No Espionage setting.

It gets confusing with all of the double negatives...
 
:bump:

I need those anyway. I will add those tags to the RevDCM source sometime tomorrow, and upload them into the Specific Code Suggestions thread. Honestly though it wol't be hard, it's just adding a string tag to the XML, and then adding a If gameoption, return true line in CvCity's canNotTrain function.

Any progress on such a thing?

I'm still keen to make this mod work with others if possible. At a total of 21 downloads so far I don't think many people care to play it as a standalone mod. :lol:

I'm still wondering what to do about the visibility to cities for owners of a religious holy city. I think it was a good thing to have removed anyway even though it slightly nerfed the value of founding a religion. I suppose it'd be best to leave it be.
 
Those tags got added to RevDCM 2.62. They work perfectly, and there is a NotGameOption and PrereqGameOption tag for both buildings and units.
 
Those tags got added to RevDCM 2.62. They work perfectly, and there is a NotGameOption and PrereqGameOption tag for both buildings and units.

Coolios.

I'm not very good with this part of modding at the moment, but would any of this new functionality allow the possiblity of, for example, a great wall that provides spy points when NoEsp is enabled but Great engineer points when not enabled? Also changing the build cost depending on the game option etc.

My guess would be that your changes allow that only by creating two copies of the building and disabling/enablging them based on a game setting. This would be a perfectly adequate way to go about the modification IMO. I haven't got my modding tools with me right now but I'm looking forward to figuring out how this'll work. If I'm on the right track then let me know maybe. :)

Cheers
 
Coolios.

I'm not very good with this part of modding at the moment, but would any of this new functionality allow the possiblity of, for example, a great wall that provides spy points when NoEsp is enabled but Great engineer points when not enabled? Also changing the build cost depending on the game option etc.

My guess would be that your changes allow that only by creating two copies of the building and disabling/enablging them based on a game setting. This would be a perfectly adequate way to go about the modification IMO. I haven't got my modding tools with me right now but I'm looking forward to figuring out how this'll work. If I'm on the right track then let me know maybe. :)

Cheers

Sounds like it would work. They would be two separate buildings, but you could point them to the same descriptions, just have one require the No Espionage option, one require it NOT to have the No Espionage Option. You might want to mess with the civilopedia to filter one of them out though, both buildings will show in their, which would be confusing to the player. ;)
 
Sounds like it would work. They would be two separate buildings, but you could point them to the same descriptions, just have one require the No Espionage option, one require it NOT to have the No Espionage Option. You might want to mess with the civilopedia to filter one of them out though, both buildings will show in their, which would be confusing to the player. ;)

Thansk Afforess. I'll let you know how I go when I have a look, especially if I have any questions.
 
On the off chance anyone is still watching this thread...
How do I install this thing. I tried dropping the "end of espionage" directory in C:\Program Files\Steam\steamapps\common\sid meier's civilization iv beyond the sword\Mods
that didn't do anything.
then I tried
C:\Documents and Settings\...\My Documents\My Games\beyond the sword
since that was where I saw a BUG Mod directory (bug came with it's own installer).
Neither seemed to work :(

DK
 
Can you try putting it in

C:\Documents and Settings\...\My Documents\My Games\beyond the sword\mods?


I must have missed that one... but it was empty, I put it in there, still didn't work.
Maybe I should check if my method of confirming it is working is right...
I put it in the dir, start a new game, with "no espionage" on. Then look at the tech tree and check the courthouse, if it give espionage points I assume it didn't work. Does that sound right?

DK
 
To use this mod you need to load it like you would load most other mods and then you also need to check the No Espionage box when you start the game.

To load a mod, from the main menu go to Advanced -> Load a mod -> (name of mod)

If the mod is loaded correctly, it should show its name up in the corner of the screen at the title (main menu) screen.
 
Back
Top Bottom