The logs dont really help with unexplained crashes. You have to run a debug DLL which will then point you to the crash area, which isnt necessarily the problem area but will lead you there with a little sleuthing. Im occasionally willing to run a debug DLL on a sub-mod mod, but its hard to get motivated to hunt these mod-specific issues down when I have so little time to spend on MNAI itself.
That is what I figured. I hadn't had a crash with your DLLs in quite a while though. This crash was with fe79's dll instead of yours though, so maybe he can find an issue.
re: MPLog - that line is some old debugging info in regards to tech selection. Ill switch that section over to use BBAI logs instead.
re: Revolution logging - thats all handled in the Revolutions python code. Should be relatively easy (though possibly a little time-consuming) to switch it to display unit names rather than IDs. Not really on my task list, though. Most of those warnings are about civ-specific units and arent especially useful.
It looks like it would only require editing line 541 of RevUtils.py.
Code:
if( playerUnitType < 0 and cityUnitType < 0 ) :
[COLOR="Green"]## print "WARNING: Civ types %d and %d have no unit of class type %d"%(city.getCivilizationType(),pPlayer.getCivilizationType(),unitClass)#Magister[/COLOR]
[COLOR="Red"] if city.getCivilizationType() == pPlayer.getCivilizationType():
print "WARNING: Civ type %s has no unit of class type %s"%(gc.getCivilizationInfo(pPlayer.getCivilizationType()).getDescription(), gc.getUnitClassInfo(unitClass).getDescription())
else:
print "WARNING: Neither Civ type %s nor %s has any unit of class type %s"%(gc.getCivilizationInfo(city.getCivilizationType()).getDescription(), gc.getCivilizationInfo(pPlayer.getCivilizationType()).getDescription(), gc.getUnitClassInfo(unitClass).getDescription()
)[/COLOR]
continue
(I decided to make it a bit more complicated because it seemed pointless and a bit confusing to list both civ types when they were identical.)
Do the AIs have Settler units? If so, then they should be making units to group with the Settlers (unless they are at war - are the users playing with the Always War setting or Aggressive AI options?). If you look at the Settler units in debug mode, you can see if they are grouped or not, which would be useful info.
If they arent building Settlers, then likely something is happening in the python chooseProduction code. You have some extra code in there for your mod, correct?
Those players say that they have tried gifting the player units and using WorldBuilder to end all of their wars, to no avail.
I just checked one saved game that someone posted after mentioning the issue, I see that one of their settlers is in a group with 2 hunters and an archer while the other is the only unit in its group.
They are not nearly as far behind as I was expecting from the complaint though, so it may not be that big of a deal.
canBuild is checked before any build orders are pushed (or canTrain if were talking about units).
I don't think that canBuild or canTrain are used in FfH2, MNAI, or MagisterModmod. In PythonCallbackDefines.xml they are set to <iDefineIntVal>0</iDefineIntVal>.
Limits on what can be built or trained are all in cannotBuild or cannotTrain. It does not appear that pushOrder ever checks if things are blocked that way.
Nowhere in the python portion of my modmod is pushOrder ever used for anything that is blocked. I'm not so sure about the DLL.
MagisterModmod uses cannotTrain more then MNAI, but less than base FfH2. It does not have the various AI controls that Kael used before you improved the AI otherwise, but it contains additional blocks to prevent the Luonnatar and Cult of the Dragon units from being trained when the game options are activated to block them. It also is used to limit the Nightwatch and Radiant Guard units so that they can always be built by players with the appropriate state religion but can also be built by players of other religions but the appropriate council membership once the associated council resolutions have passed.
I used to include a block to stop early game unit spamming by preventing the training of any more tier 1 units once a player already had more than a certain number of that unit type per city. I commented this out a while back, after it started causing problems.
The issue I was remembering from a while back was caused by Auric's player AI trying to push for the production of a unit with UNITAI_ATTACK at a point when the only such unit was the basic tier 1 warrior of which he had too many. It kept trying to force another a warrior but it never got built, and in the meantime the player never accomplished anything else including researching the tech needed to make tier 2 units with that UNITAI available.
p.s. I just noticed that the city edit lacks the ability to edit the city's Revolution Index. I believe it had the ability before the WorldBuilder 4.0 merge, and that I forgot to carry it over. I'm also thinking that there is no good reason not to allow you to change the civilization type of a city even if its owner does not have the tolerant trait and thus would not be able to take advantage of it, since someone else with that trait could capture it. I just made those changes, plus made it so that they will be included in worldbuilder saves. I'm just about to get another version ready to upload for you, after I make sure that Platyping hasn't made some more stealth improvements. .