I'm getting these errors (in my Canada DoC mod):
Spoiler :
Traceback (most recent call last):
File "BugEventManager", line 400, in _handleDefaultEvent
File "CvRFCEventHandler", line 184, in onCityAcquired
File "Stability", line 72, in onCityAcquired
AttributeError: 'NoneType' object has no attribute 'changeConqueredCities'
Traceback (most recent call last):
File "BugEventManager", line 400, in _handleDefaultEvent
File "CvRFCEventHandler", line 823, in onChangeWar
File "Stability", line 109, in onChangeWar
File "StoredData", line 253, in removeWarStatus
KeyError: 37
Traceback (most recent call last):
File "BugEventManager", line 400, in _handleDefaultEvent
File "CvRFCEventHandler", line 823, in onChangeWar
File "Stability", line 109, in onChangeWar
File "StoredData", line 253, in removeWarStatus
KeyError: 36
I'm confused because lWarStatus should automatically increment to iNumPlayers right?
I feel like I still have a problem maintaining the WarStatus objects in general, so that might not actually be related to your modmod.
getColonyPlayer() in RFCUtils.py.Is there already a method for checking colonial owner in the code (I would assume it would be from the Argentina and Brazil spawns), and if so, where is it?
if (self.getGoal(iTatar, 2) == -1):
iTotalLand = gc.getMap().getLandPlots()
iIslamicLand = 0
for iLoopPlayer in range(con.iNumPlayers):
if gc.getPlayer(iLoopPlayer).isAlive() and gc.getPlayer(iLoopPlayer).getStateReligion() == con.iIslam:
iIslamicLand += gc.getPlayer(iLoopPlayer).getTotalLand()
fLandPercent = 100.0 * iIslamicLand / iTotalLand
if (fLandPercent >= 30.0)
self.setGoal(iTatar, 2, 1)
#------------------TATAR UP----------------------
if (iOwner == iTatar) and (pWinningUnit.getUnitType() == con.iHorseArcher or pWinningUnit.getUnitType() == con.iKnight or pWinningUnit.getUnitType() == con.iTatarNoyan or pWinningUnit.getUnitType() == con.iCavalry or pWinningUnit.getUnitType() == con.iMongolKeshik):
if cLosingUnit.getDomainType() == gc.getInfoTypeForString("DOMAIN_LAND"):
iGold = cLosingUnit.getProductionCost() / 3
gc.getPlayer(iOwner).changeGold(iGold)
sAdjective = gc.getPlayer(pLosingUnit.getOwner()).getCivilizationAdjectiveKey()
CyInterface().addMessage(iOwner, False, con.iDuration, CyTranslator().getText("TXT_KEY_TATAR_YOKE_UP", (iGold, sAdjective, pLosingUnit.getNameKey())), "", 0, "", ColorTypes(con.iWhite), -1, -1, True, True)
Your code lacks a colon in the last if clause. Please mod with Python exceptions enabled, you would have seen this by yourself then.I'm getting these problems.
1. I tried to borrow some code from Catholic URV. But it doesn't work. Did do something wrong?
Code:if (self.getGoal(iTatar, 2) == -1): iTotalLand = gc.getMap().getLandPlots() iIslamicLand = 0 for iLoopPlayer in range(con.iNumPlayers): if gc.getPlayer(iLoopPlayer).isAlive() and gc.getPlayer(iLoopPlayer).getStateReligion() == con.iIslam: iIslamicLand += gc.getPlayer(iLoopPlayer).getTotalLand() fLandPercent = 100.0 * iIslamicLand / iTotalLand if (fLandPercent >= 30.0) self.setGoal(iTatar, 2, 1)
Are you sure the constants actually match the XML? Open the Python console and print GC.getInfoTypeForString([the Noyan XML tag]) and con.iTatarNoyan.2. I also borrowed the code of Viking UP. Every cavalry unit can earn gold after a victorious battle as intended, except new UU. I'm sure there is a "iTatarNoyan" constant in Consts.py. Why?
Code:#------------------TATAR UP---------------------- if (iOwner == iTatar) and (pWinningUnit.getUnitType() == con.iHorseArcher or pWinningUnit.getUnitType() == con.iKnight or pWinningUnit.getUnitType() == con.iTatarNoyan or pWinningUnit.getUnitType() == con.iCavalry or pWinningUnit.getUnitType() == con.iMongolKeshik): if cLosingUnit.getDomainType() == gc.getInfoTypeForString("DOMAIN_LAND"): iGold = cLosingUnit.getProductionCost() / 3 gc.getPlayer(iOwner).changeGold(iGold) sAdjective = gc.getPlayer(pLosingUnit.getOwner()).getCivilizationAdjectiveKey() CyInterface().addMessage(iOwner, False, con.iDuration, CyTranslator().getText("TXT_KEY_TATAR_YOKE_UP", (iGold, sAdjective, pLosingUnit.getNameKey())), "", 0, "", ColorTypes(con.iWhite), -1, -1, True, True)
Your code lacks a colon in the last if clause. Please mod with Python exceptions enabled, you would have seen this by yourself then.
Are you sure the constants actually match the XML? Open the Python console and print GC.getInfoTypeForString([the Noyan XML tag]) and con.iTatarNoyan.
Thank you very much.
Actually I have set Python exceptions enabled, but doesn't understand what it said. It's a colon![]()
Does that make it a..... modmodmodule?Since my modmodmod is a module and makes only graphical changes
Are you using the same paths for the flags as before?
Then that's causing the incompatibility. Paths to the flag decals are stored inside the savegame file, if the flags at these locations are deleted you are likely to get a crash.No, I use new paths inside the module.
Then that's causing the incompatibility. Paths to the flag decals are stored inside the savegame file, if the flags at these locations are deleted you are likely to get a crash.