I've been playing some FFH2 (+MNAI) lately for the first time in a while, and hit two very minor issues that threw Python exceptions (which is the main reason I'm reporting them) that I couldn't find referenced anywhere.
In a game as the Khazad, I was at war with the Luchuirp, who were in the process of having their priests Inquisition their cities. I'm afraid I didn't save the exact Python exception, but I am pretty sure it's being caused by e.g. the following line (this is in reqInquisition but there's a similar call in spellInquisition):
Code:
if (StateBelief != gc.getPlayer(pCity.getOwner()).getStateReligion()):
If the city's ownership changes suddenly while Inquisition is being casted (I think), a Python exception is generated because (for a moment) the city has no owner. The exact message I was getting is "NoneType has no attribute getStateReligion()". So I think that was was happening here... I don't think this is actually a problem because Inquisition should fail when the city is conquered, but it should fail less noisily.
Second: this probably has existed for a while, but I couldn't find any trace of it.
Because the signature of the calculate(Total)BestNatureYield method(s)
changed some time ago from passing a TeamType to passing a PlayerType, two Firaxis mapscripts from vanilla, Archipelago and Islands, will be broken when attempting to call these method(s) in assignStartingPlots.
I fired up Archipelago out of curiosity, because it's been so long I couldn't remember what the generic Civ mapscripts really looked like, and was surprised that I hit a Python error.
The initial error generated was:
Code:
Traceback (most recent call last):
File "Archipelago", line 342, in assignStartingPlots
ArgumentError: Python argument types in
CyPlot.calculateBestNatureYield(CyPlot, CvPythonExtensions.YieldTypes, CvPythonExtensions.TeamTypes)
did not match C++ signature:
calculateBestNatureYield(class CyPlot {lvalue}, enum YieldTypes, enum PlayerTypes)
ERR: Python function assignStartingPlots failed, module Archipelago
Unfortunately the only way I can think to fix this is that MNAI should ship modified copies of Archipelago and Islands with the function call corrected.
I'm happy to open bugs / pull requests against the bitbucket repository for both of these, if you want.