LordViriato
Chieftain
- Joined
- Apr 26, 2011
- Messages
- 9
Hi everybody,
I have been thinking the way to simulate the city frontier and I think I have found one (I like this).
You have to follow the next steps:
1. You have to save the file AreaBorder.dds attached here into "Caveman2Cosmos\Assets\art\Terrain\PlotTextures". The difference with the original file is that I delete the hatched area (When you select the city in the game you will see the border only. You won't see the hatched area anymore).
2. Add the next code into the file RoMEventManager.py:
View attachment AreaBorder.7z
Bye!!!
I have been thinking the way to simulate the city frontier and I think I have found one (I like this).
You have to follow the next steps:
1. You have to save the file AreaBorder.dds attached here into "Caveman2Cosmos\Assets\art\Terrain\PlotTextures". The difference with the original file is that I delete the hatched area (When you select the city in the game you will see the border only. You won't see the hatched area anymore).
2. Add the next code into the file RoMEventManager.py:
Code:
def onBeginPlayerTurn(self, argsList):
#Start City frontiers
color = 1
layer = 8
for layerparaborrar in range(8, 500):
CyEngine().clearAreaBorderPlots (layerparaborrar)
layer = 8
for numero in range(0,gc.getMAX_CIV_PLAYERS()) :
pPlayer2 = gc.getPlayer(numero)
for iCity in range(pPlayer2.getNumCities()):
pCity2 = pPlayer2.getCity(iCity)
#CvUtil.pyPrint('Display Ciudad: %s' %(pCity2.getName()))
pPlot = CyMap( ).plot( pCity2.getX( ), pCity2.getY( ) )
eTeam = pPlayer2.getTeam()
layer = layer + 1
if pCity2.getName() != "":
for i in range(gc.getNUM_CITY_PLOTS()):
#self.dirty = False
pPlot2 = pCity2.getCityIndexPlot(i)
#if pPlot2.isActiveVisible(True) and (pPlot2.isWater() == False or pPlot2.isLake() == True) and (pPlot2.getWorkingCity().getName() == pPlot.getWorkingCity().getName() or pPlot2.getWorkingCity().getName() == None):
if (pPlot2.isWater() == False or pPlot2.isLake() == True) and (pPlot2.getWorkingCity().getName() == pPlot.getWorkingCity().getName() or pPlot2.getWorkingCity().getName() == ""):
if pPlot2.getOwner() == pCity2.getOwner():
#CyEngine().fillAreaBorderPlot(pPlot2.getX( ), pPlot2.getY( ), NiColorA(float(0.00), float(1.00), float(0.00), 0.30), layer)
CyEngine().fillAreaBorderPlotAlt(pPlot2.getX( ), pPlot2.getY( ), layer, "COLOR_BLACK", 0.50)
#End City frontiers
View attachment AreaBorder.7z
Bye!!!