.

Lord Olleus said:
I have found this rather specific bug while modding v1.61 of the SDK. I used the function gDLL->getPythonIFace()->callFunction(PYSpellsInterface, "onCastSpell", pyArgs.makeFunctionArgs(), &lResult) and was suprised to find that the game could not find CvSpellsInterface.py (which I had defined in CvDefines.h). After some testing I worked out that this was because I was using my CustomFolders. As soon as I coppied this into a stand alone mod in Program files/firaxis/Civ4/Mods, it started working.

In other words gDLL->getPythonIFace()->callFunction() does not search the CustomAssets Folder.
This is also cause of some Python function that relys on it like CvOptionScreen.
In CyGTabCtl, call like
CyGTabCtrl.attachCheckBox("CheckBoxName", szWidgetName, szOptionDesc, callbackIFace, szCallbackFunction, szWidgetName, bValue) does not work with callbackIFace in CustomAssets.
It worked well in v1.52

When player clicked the checkbox it will not call the szCallbackFunction
if callbackIFace argument is not "CvOptionsScreenCallbackInterface", e.g. like "MyCallbackInterface".
 
Back
Top Bottom