Example of relationship between Cpp-Python-XML

planetfall

Emperor
Joined
Jan 18, 2002
Messages
1,483
Location
California
It must be Friday. I'm not getting the connectors between Cpp-python-XML.

For example:
void CvCity::doCulture(){...
gDLL->getPythonIFace()->callFunction(PYGameModule, "doCulture", argsList.makeFunctionArgs(), &lResult);
..}

void CvCity::doPlotCulture(bool bUpdate){...
gDLL->getPythonIFace()->callFunction(PYGameModule, "doPlotCulture", argsList.makeFunctionArgs(), &lResult);
...}


One of the culture xml files is CIV4CultureLevelInfo.xml where you can change the thresholds.

So where does python connect. And which python scripts?
CvDefines.h
#define PYGameModule "CvGameInterface"

Nevermind, figured it out. Posting with new heading for reference by others struggling with this.
<C4 dir>\Assets\Python\EntryPoints\CvGameInterface.py
 
FYI2.

XP, open command window
cd to python directory
directory names longer than 8 chars will be <6chars>~1
run doscommand to get strings, so to find Culture command is

findstr "Culture" *

NB: string ***IS*** case sensitive !!!
 
Back
Top Bottom