def checkTurn(self, iGameTurn):
[b] #The Turk: Add Castle to indie/barb Damascus:
if iGameTurn == getTurnForYear(1096):
if gc.getMap().plot(22,43).getPlotCity().getOwner() >= [COLOR="Red"]con.[/COLOR]iNumPlayers:
gc.getMap().plot(22,43).getPlotCity().setHasNumRealBuilding([COLOR="Red"]con.[/COLOR]iCastle, 1)[/B]
#The Turk: Add Castle to indie/barb Damascus:
if iGameTurn == getTurnForYear(1096):
pCity = gc.getMap().plot(22,43).getPlotCity()
if pCity.getOwner() >= con.iNumPlayers:
pCity.setHasNumRealBuilding(con.iCastle, 1)
#The Turk: Add Castle to indie/barb Damascus:
if iGameTurn == getTurnForYear(1096):
pPlot = gc.getMap().plot(22,43)
[B] if pPlot.isCity():[/B]
pCity = pPlot.getPlotCity()
if pCity.getOwner() >= con.iNumPlayers:
pCity.setHasNumRealBuilding(con.iCastle, 1)
You have so much to learn about Python and how it is used with CivIV, so I suggest you get started. Once you get some of the basics in, this will be so much less painful for you!VOID setNumRealBuilding (BuildingType iIndex, INT iNewValue)
(BuildingID, iNum) - Sets number of buildings in this city of BuildingID type
The spawn zone is also know as the Core Area, and its coordinates are defined in the Consts.py file. Its basically a rectangular shaped area defined by these values, but IIRC there is also an array of tiles that are excepted from the area. These would be defined directly below the Core Area values. So you add the coordinates of Warzaw (as a tuple) in the German slot in the data structure.How do i exclude warsaw from the german flip zone
I tried it but it didnt work out, any suggestion? (just so u know im trying to this in DOC mod)The spawn zone is also know as the Core Area, and its coordinates are defined in the Consts.py file. Its basically a rectangular shaped area defined by these values, but IIRC there is also an array of tiles that are excepted from the area. These would be defined directly below the Core Area values. So you add the coordinates of Warzaw (as a tuple) in the German slot in the data structure
if (iGameTurn >= getTurnForYear(-1200) and iGameTurn <= getTurnForYear(-1000)):
tSeaPlot = self.findSeaPlots((70, 39), 3, iBarbarian)
if (tSeaPlot):
pBarbarian.initUnit(con.iGalley, tSeaPlot[0], tSeaPlot[1], UnitAITypes.UNITAI_SETTLER_SEA, DirectionTypes.DIRECTION_SOUTH)
utils.makeUnit(con.iSpearman, iBarbarian, tSeaPlot, 1)
utils.makeUnit(con.iAxeman, iBarbarian, tSeaPlot, 1)
Consider yourself lucky, because it's possible in Python. Rhye does the capital switch together with the rename, so I suggest you simply look at his implementation in CityNameManager.onCityAcquired() - or simply search for "Istanbul" in that file. In practice, you don't have to do it in the city name manager, any instance of onCityAcquired() will do, e.g. in CvEventHandler.py.How can I make it so a Civ changes it's capital on city acquired? (Like Turkey)
I've been messing with RFC a ton and changed Rome to being Italy. However on spawn they kiledl Roma which has 2 wonders (Including the very important AP) so my solution was to spawn them at Messina. Now unfortunately Rome is no longer their capital even on respawns. I kinda need a fix that hopefully could be done in python rather then C++.
Consider yourself lucky, because it's possible in Python. Rhye does the capital switch together with the rename, so I suggest you simply look at his implementation in CityNameManager.onCityAcquired() - or simply search for "Istanbul" in that file. In practice, you don't have to do it in the city name manager, any instance of onCityAcquired() will do, e.g. in CvEventHandler.py.
As embryodead said, you lose the "Has" bit. Because the exception says just that - there is no method by that name belonging to the CyCity class. Look for yourself.
You have so much to learn about Python and how it is used with CivIV, so I suggest you get started. Once you get some of the basics in, this will be so much less painful for you!