if bTrade:
for i in range(con.iScotlandYard - con.iHeroicEpic + 1):
iNationalWonder = i + con.iHeroicEpic
if city.hasBuilding(iNationalWonder):
city.setHasRealBuilding(iNationalWonder, False)
if (bTrade):
for i in range (con.iNumBuildings):
iNationalWonder = i
if (city.hasBuilding(iNationalWonder)):
if (isNationalWonderClass(gc.getBuildingInfo(iNationalWonder).getBuildingClassType())):
city.setHasRealBuilding((iNationalWonder), False)
I don't even know how that works right now ... when a normal civ that has some monasteries discovers SM, can it still use these monasteries to train missionaries?They do are behind. If you subtract SM give them corporation or steel. Else just give mexico city a prebuilt catholic monastery, it is the easiest solution. Historically speaking, there should be a lot of monasteries to Mexico back then.
The code is probably a bit too simplistic there, yes.There seems to be problems when switching civs in turns where two appear at the same time. I was playing as Phoenicia, in turn 122 popups offering to switch to Ethiopia and Tamils appear, the one for Ethiopia on top. No matter which one I select Yes to, it will always be Ethiopia the civ I end up switching to.
I'm attaching the save of the turn before in case you have any ideas.
I know these switches must be quite complicated... there seems to be an issue with them, in that any gameplay options from the options menu will behave as if not active after the switch. I use wait till end of turn, quick moves, and quick combat, but after the switch I have to go to options, untick them, close, open options again and retick them.
I recall BBAI has a key shortcut for changing the player's civ (Ctrl-Shift-X perhaps?) which worked quite well (as in, it didn't have that issue), maybe it could be worth looking into.
Thanks, that's helpful.Another technical issue. When a city collapses to independents or is traded, there's some code to remove conflicting buildings, but it doesn't do a very good job of it. Palaces will remain, some wonders in RFC which were national wonders in vanilla will be destroyed. If the city later flips to a new civ, the surplus palace can mess up their capital's location. The code is in CvRFCEventHandler.py, onCityAcquired:Spoiler :
if bTrade:
for i in range(con.iScotlandYard - con.iHeroicEpic + 1):
iNationalWonder = i + con.iHeroicEpic
if city.hasBuilding(iNationalWonder):
city.setHasRealBuilding(iNationalWonder, False)
back when I did some work on RFC RAND, I changed that to:Spoiler :
if (bTrade):
for i in range (con.iNumBuildings):
iNationalWonder = i
if (city.hasBuilding(iNationalWonder)):
if (isNationalWonderClass(gc.getBuildingInfo(iNationalWonder).getBuildingClassType())):
city.setHasRealBuilding((iNationalWonder), False)
I don't even know how that works right now ... when a normal civ that has some monasteries discovers SM, can it still use these monasteries to train missionaries?
if ((eEra > GC.getNumEraInfos() / 2) && !CvString(getLateArtDefineTag(i, eStyle)).empty())
{
return ARTFILEMGR.getUnitArtInfo(getLateArtDefineTag(i, eStyle));
}
else if ((eEra > GC.getNumEraInfos() / 4) && !CvString(getMiddleArtDefineTag(i, eStyle)).empty())
{
return ARTFILEMGR.getUnitArtInfo(getMiddleArtDefineTag(i, eStyle));
}
else
{
return ARTFILEMGR.getUnitArtInfo(getEarlyArtDefineTag(i, eStyle));
}
Traceback (most recent call last):
File "BugEventManager", line 400, in _handleDefaultEvent
File "CvRFCEventHandler", line 303, in onCityRazed
File "Stability", line 75, in onCityRazed
AttributeError: 'module' object has no attribute 'iMongols'
Well I have no idea where would that be handled (python?), but it got me thinking, Colombia is set as a Maya respawn, whose third UHV goal was to be the first to discover Astronomy, could it be that the code mixes up the two somehow when Colombia spawns and you switch to them?BTW, Colombia failed their third UHV goal as soon as I switched to them, not sure what's going on there
Traceback (most recent call last):
File "CvScreensInterface", line 390, in showVictoryScreen
File "CvVictoryScreen", line 208, in interfaceScreen
File "CvVictoryScreen", line 1356, in showVictoryConditionScreen
TypeError: getCivilizationShortDescription() takes exactly 1 argument (2 given)
ERR: Python function showVictoryScreen failed, module CvScreensInterface
def selectRandomCityTargetCiv(self, iCiv):
if (gc.getPlayer(iCiv).isAlive()):
cityList = []
for pyCity in PyPlayer(iCiv).getCityList():
if (pyCity.GetCy()):
[b]if ( pyCity.GetCy().isDisorder() or pyCity.GetCy().foodDifference(False) < 0):
return pyCity.GetCy()[/b]
cityList.append(pyCity.GetCy())
if (len(cityList)):
iCity = gc.getGame().getSorenRandNum(len(cityList), 'random city')
return cityList[iCity]
return False
def selectRandomCityTargetCiv(self, iCiv):
if (gc.getPlayer(iCiv).isAlive()):
cityList = []
for pyCity in PyPlayer(iCiv).getCityList():
if (pyCity.GetCy()):
[b] if ((not pyCity.GetCy().isDisorder()) and pyCity.GetCy().foodDifference(False) > 0):
cityList.append(pyCity.GetCy())[/b]
if (len(cityList)):
iCity = gc.getGame().getSorenRandNum(len(cityList), 'random city')
return cityList[iCity]
return False
Another minor bug on victory screen. This happened when i was playing Japan and got 2 UHV goals done. There is also some error (maybe the same maybe different, not sure, don't have it logged or saved) when you won religious victory.
Code:Traceback (most recent call last): File "CvScreensInterface", line 390, in showVictoryScreen File "CvVictoryScreen", line 208, in interfaceScreen File "CvVictoryScreen", line 1356, in showVictoryConditionScreen TypeError: getCivilizationShortDescription() takes exactly 1 argument (2 given) ERR: Python function showVictoryScreen failed, module CvScreensInterface
Dealt with all of these.So, Gauss' name was corrected in the latest commit... now it's 'Carl Friedrich Gauá'
I see the names of the GP were placed directly in their names list instead of using a text file, and I guess the name you were going for was 'Gauß' , so it should be 'Carl Friedrich Gau# & 223;' without spaces (automatic parser...)
EDIT: while I'm at it, may I suggest changes to Spanish GP names to conform to our orthography and my OCD? (I don't really have OCD, I'm just a PITA)
Prophets: Juan de Sep#& 250;lveda, Francisco Su# & 225;rez, Bartolom# & 233; de las Casas, Jun# & 237;pero Serra
Artists: Velazquez is better known as Diego Vel# & 225;zquez
Scientists: Gherard de Cremona --> Gerardo de Cremona
Merchants: Fernando Magallanes --> Fernando de Magallanes, though his Portuguese name is Fern# & 227;o de Magalh# & 227;es. Also, Cristoforo Colombo is his real name since he was most likely Genovesi, though at school all kids learn about Crist# & 243;bal Col# & 243;n
Engineers: Alberto Palacio --> Alberto de Palacio y Elissague
Generals: Hernando Cortes --> Hern# & 225;n Cort# & 233;s, Alvaro de Bazan --> # & 193;lvaro de Baz# & 225;n BUT WAIT THERE'S MORE Ambrosio Sp& # 237;nola Doria, though you could keep the Genovesi name Ambrogio Spinola Doria
More with names... after the Prussian spawn, I noticed that Germany is being referred to as 'Austria' in all instances where it should read as 'Austrian', as if the name was used instead of the adjective. In that line, Vikings keep being named such even though their capital is Stockholm in my latest game. I see there's some names in their dynamic names text file for being referred as 'Scandinavians', this seems well inclusive enough of all their area, perhaps it could be the default adjective after the Viking era for them?
And to end this post, the immigration code seems wrong. It seems to prioritize targeting cities that will not have enough food to support the new population, instead of the ones they do. As America, all my immigrants are flocking to the same tundra city and dying off constantly. I think the problem is in UniquePowers.py, selectRandomCityTargetCiv:Doesn't the part in bold mean that if a city in disorder or with a food deficit is found, the function returns it directly and stops making a list with the others?Code:def selectRandomCityTargetCiv(self, iCiv): if (gc.getPlayer(iCiv).isAlive()): cityList = [] for pyCity in PyPlayer(iCiv).getCityList(): if (pyCity.GetCy()): [b]if ( pyCity.GetCy().isDisorder() or pyCity.GetCy().foodDifference(False) < 0): return pyCity.GetCy()[/b] cityList.append(pyCity.GetCy()) if (len(cityList)): iCity = gc.getGame().getSorenRandNum(len(cityList), 'random city') return cityList[iCity] return False
In RFC RAND I changed to:and it seemed to work fine.Code:def selectRandomCityTargetCiv(self, iCiv): if (gc.getPlayer(iCiv).isAlive()): cityList = [] for pyCity in PyPlayer(iCiv).getCityList(): if (pyCity.GetCy()): [b] if ((not pyCity.GetCy().isDisorder()) and pyCity.GetCy().foodDifference(False) > 0): cityList.append(pyCity.GetCy())[/b] if (len(cityList)): iCity = gc.getGame().getSorenRandNum(len(cityList), 'random city') return cityList[iCity] return False