I've had a several unexplained crashes when using worldbuilder, none of which left a trace in any log file. I believe all of them were caused by trying to change some value (like research points towards a certain technology in the World Builder Edit Control Player Data) by typing in a new number rather than using the up or down arrows. The first time it happened I was trying to give a player extra gold, but I confused the Gold category that controls the treasury with the one that controls how commerce is allocated. Making this value more than 100% seemed to be the problem. I did this again later though, and found the game just reduced it back to 100 and continued without incident. This kind of problem is often but not constantly reproducible.
Edit: Ok, I think I've discovered the difference between the case when it crashes and the case where everything is fine. If I type in a number and then press enter, then everything is fine. If I type in a number and then click somewhere outside the box without pressing enter first, then the game crashes.
I also noticed that when I go to Map Mode -> Standard Mode and try to change terrain types using any brush size other than 1x1, it does not seem to do anything.
(This is not exactly a bug, but I would like to complain about how Worldbuilder's Edit City Mode no longer lets you select buildings based on their icons. This is confusing in my modmod, as there are multiple different wonders called Wyrmhold which can be distinguished by art by not by name. I love having the ability to edit cities the new way, I just wish you had kept the old way of changing buildings too. You did after all keep the old way of changing a unit's promotions despite adding a new way.)
bAlwaysHostile units can still enter rival cities peacefully and keep the owner's own units from entering their cities without declaring war (unless I block it in python). Having such a unit in a rival AI's city seems to cause the AI to get stuck in an infinite look.
It seems like summons are now incapable of attacking enemy superforts. Is this intended behavior?
It also seems like this code that I added to CvGameUtils.py's def unitCannotMoveInto(self,argsList): in order to prevent bAlwaysHostile units from capturing superforts without stopped working with the new DLL, and I don't understand why.
Code:
if gc.getGame().isOption(GameOptionTypes.GAMEOPTION_ADVANCED_TACTICS):
if gc.getUnitInfo(pUnit.getUnitType()).isAlwaysHostile():
iImp = pPlot.getImprovementType()
if iImp != -1:
if gc.getImprovementInfo(iImp).isActsAsCity():
if pPlot.isOwned():
if not gc.getTeam(pPlot.getTeam()).isAtWar(pUnit.getTeam()):
return True
(Incidentally, I think it would be quite helpful if there was a pPlot.isSuperFort() function, similar to pPlot.isCity(), so that I would not have to so often use python to check whether the plot has an improvement and then check the improvement's improvement info.)
Edit: It seems that both of those problems are related. Apparently pPlot.isEnemyCity() was changed to count enemy superforts too.
bool CvPlot::isCity(bool bCheckImprovement, TeamTypes eForTeam) const now has parameters for checking suprforts, and these are used in isEnemyCity, but the python exposed bool CyPlot::isCity() has no such parameters.
My Ring of Warding code was applying to superforts. For some reason I do not understand, pCity.getNumBuilding(gc.getInfoTypeForString('BUILDING_RING_OF_WARDING')) seems to return true for cities that are not actually cities and thus cannot have any buildings.
I fixed both issues by changing the code to this:
I guess you figured out that it still has to meet other requirements, including any building requirements.
I knew that before I reported the bug. What I did not realize yet was that I had accidentally overwritten the new DLL with the old DLL when I merged your mod with mine. I has assumed it was right because the game still ran after changing all the schema files, and even included new features like the worldbuilder improvements.
I did find a bug where it only checks the nearest city. I'll fix it in 2.51 where it will check for any city.
OK. I missed adding it to the CyTeamInterface file. Will be fixed for 2.51
Thanks.
Any ETA for 2.51?
Yesterday's release of Magister Modmod contained a few bugs that were my own fault. I would like to know whether I should release a corrected version before or after moving to 2.51.