Zlatko
CIW
Skaven Cuirassier (LEFT), Cavalry (DOWN-RIGHT) and WW1 Cavalry (UP-RIGHT)
Image - http://s15.postimg.org/wyzm2jmcp/skaven_mount.png

Image - http://s15.postimg.org/wyzm2jmcp/skaven_mount.png
It is more about what is written in CvEventManager.
Check line 485 and 828 or whatever is in your onBeginPlayerTurn and onUnitBuilt
def configure(logging=None, noLogEvents=None):
"""Sets the global event manager's logging options."""
if g_eventManager:
g_eventManager.setLogging(logging)
g_eventManager.setNoLogEvents(noLogEvents)
else:
BugUtil.error("BugEventManager - BugEventManager not setup before configure()")
It is more about what is written in CvEventManager.
Check line 485 and 828 or whatever is in your onBeginPlayerTurn and onUnitBuilt
## Topkapi Palace Start ##
pPlayer = gc.getPlayer(iPlayer)
iTeam = pPlayer.getTeam()
pTeam = gc.getTeam(iTeam)
b_Topkapi = gc.getInfoTypeForString("BUILDING_TOPKAPI_PALACE")
obsoleteTech = gc.getBuildingInfo(b_Topkapi).getObsoleteTech()
if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == false or obsoleteTech == -1 ):
for iCity in range(pPlayer.getNumCities()):
ppCity = pPlayer.getCity(iCity)
if ppCity.getNumActiveBuilding(b_Topkapi) == true:
for iPlayer in range(gc.getMAX_PLAYERS()):
ppPlayer = gc.getPlayer(iPlayer)
if ( (ppPlayer.isAlive()==true) and (ppPlayer.isBarbarian()==false) ):
if ( gc.getTeam(ppPlayer.getTeam()).isVassal(iTeam) == true ):
iGold = ppPlayer.getGold( )
if ppPlayer.getGold( ) >= 5000:
ppPlayer.changeGold( 50 )
if ppPlayer.getGold( ) < 5000:
if ppPlayer.getGold( ) >= 100:
ppPlayer.changeGold( iGold//50 )
else:
ppPlayer.changeGold( 2 )
ppPlayer.changeCombatExperience( +1 )
## Topkapi Palace End ##
## Topkapi Palace Start ##
pCity = argsList[0]
pUnit = argsList[1]
pPlayer = gc.getPlayer(pUnit.getOwner())
iUnitType = pUnit.getUnitType()
b_BUILDING_TOPKAPI = gc.getInfoTypeForString("BUILDING_TOPKAPI_PALACE")
obsoleteTech = gc.getBuildingInfo(b_BUILDING_TOPKAPI).getObsoleteTech()
if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == false or obsoleteTech == -1 ):
topkapi = false
for iCity in range(pPlayer.getNumCities()):
if topkapi == false:
ppCity = pPlayer.getCity(iCity)
if ppCity.getNumActiveBuilding(b_BUILDING_TOPKAPI) == true:
topkapi = true
if ( topkapi == true ):
iTeam = pPlayer.getTeam()
pTeam = gc.getTeam(iTeam)
l_vassalUB = []
for iPlayer in range(gc.getMAX_PLAYERS()):
ppPlayer = gc.getPlayer(iPlayer)
if ( (ppPlayer.isAlive()==true) and (ppPlayer.isBarbarian()==false) ):
if ( gc.getTeam(ppPlayer.getTeam()).isVassal(iTeam) == true ):
civ_type = gc.getPlayer(iPlayer).getCivilizationType()
for iUnit in range(gc.getNumUnitClassInfos()):
iUniqueUnit = gc.getCivilizationInfo(civ_type).getCivilizationUnits(iUnit);
iDefaultUnit = gc.getUnitClassInfo(iUnit).getDefaultUnitIndex();
if (iDefaultUnit > -1 and iUniqueUnit > -1 and iDefaultUnit != iUniqueUnit):
if ( iUnitType == iDefaultUnit ):
l_vassalUB.append(iUniqueUnit)
if ( len(l_vassalUB) >= 1 ):
self.iVassalUUChance = self.getRandomNumber( 4 )
if self.iVassalUUChance == 0:
chance = CyGame().getSorenRandNum(len(l_vassalUB), "Random for UB")
iX = pUnit.getX()
iY = pUnit.getY()
pNewUnit = pPlayer.initUnit( l_vassalUB[chance], iX, iY, UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION )
pNewUnit.convert(pUnit)
## Topkapi Palace End ##
Yeah you need to provide a begin line and and end line so anyone looking at your problem as above knows what you have there, ALL CvEventManagers are NOT alike, infact in C2C, we dont even use the CvEventManager. ie" (see below Make sure you put it in a code tag also, thx.)
This is JUST an "example" not real
Code:def configure(logging=None, noLogEvents=None): """Sets the global event manager's logging options.""" if g_eventManager: g_eventManager.setLogging(logging) g_eventManager.setNoLogEvents(noLogEvents) else: BugUtil.error("BugEventManager - BugEventManager not setup before configure()")
Zlatko,
i guess your error has something to do with some building maybe - or some code that have "obseletetech" xml tag - maybe you are missing a "NONE" and you have something like this :
></ instead of >NONE</
Might as well be that there's a simple check for existence is missing at some point.
<Strategy></Strategy>
<ConstructSound></ConstructSound>
<HotKey></HotKey>
<ProductionTraits></ProductionTraits>
<BonusHappinessChanges></BonusHappinessChanges>
<BonusProductionModifiers></BonusProductionModifiers>
<FreePromotion></FreePromotion>
<UnitCombatFreeExperiences></UnitCombatFreeExperiences>
<DomainProductionModifiers></DomainProductionModifiers>
<PrereqBuildingClasses></PrereqBuildingClasses>
<SpecialistCounts></SpecialistCounts>
<SpecialistYieldChanges></SpecialistYieldChanges>
<Help></Help>
<Bonus></Bonus>
<FreeBonus></FreeBonus>
you must add proper tags to all of them - compare to other buildings, and fill them all.
its making you have errors for sure.
look for this in more files.
The first thing you should look at is do you in fact have a building with a Type tag that is exactly BUILDING_TOPKAPI_PALACE?
You can't very well look up the obsolete tech value for a building type that does not exist.
HEY,
the problem you see is only in the xml.
somewhere in you mod , you have a bad xml tag - either something is missing, or written wrongfully.
maybe debug dll code can help you more - either that or you better start removing things one by one till the errors goes away and youll find the problem.
its hard work![]()
my turn are never finish.