Custom Espionage Mission

blitzkrieg1980

Octobrist
Joined
Aug 29, 2006
Messages
4,899
Location
New Jersey, USA
I am trying to add an espionage mission that would affect diplo relations and war weariness (for a defined amount of turns). I understand that the CIV4EspionageMissionInfo.XML file needs to be altered (possibly in structure) and that's easy to find. However, I have searched Google many times and I cannot find where the XML gets processed and what methods/functions would get called to process the XML as well as the file(s) where methods/functions would need to be created are.

Put simply: how does XML get processed? What do I need to edit? I probably need the SDK, but does anyone know the files/classes/etc that would need to be edited to create a custom espionage mission? Thanks in advance.
 
You're right, you have to edit the DLL to make additions to XML files and have them take effect.

The classes responsible for representing XML files are in the CvInfos.h and CvInfos.cpp files, in your case it is CvEspionageMissionInfo. I have never added an espionage mission type before, so I cannot give you detailed instructions, but CvPlayer::getEspionageMissionCost() and its derivatives and CvPlayer::doEspionageMission() appear to do most of the work. You can find them in CvPlayer.cpp.
 
Top Bottom