Zlatko
CIW
Hello! I have a problem for including next war archeology in my private mod. The different arcologies don't stack correctly and i don't find the solution. Could anyone help me please? Here is a screen shot. Thanks!
Hi Bullist, as i understand you want arcologies like in Next War, if you want that, you must do next:
Use this code from CvGameUtils.py:
Code:
def cannotConstruct(self,argsList):
pCity = argsList[0]
eBuilding = argsList[1]
bContinue = argsList[2]
bTestVisible = argsList[3]
bIgnoreCost = argsList[4]
[B][COLOR="Red"]# player can't build an arcology if they have shielding or advanced shielding
if eBuilding == gc.getInfoTypeForString("BUILDING_ARCOLOGY"):
if pCity.getNumRealBuilding(gc.getInfoTypeForString("BUILDING_ARCOLOGY_SHIELDING")) or pCity.getNumRealBuilding(gc.getInfoTypeForString("BUILDING_DEFLECTOR_SHIELDING")):
return True
# player can't build shielding if they have advanced
if eBuilding == gc.getInfoTypeForString("BUILDING_ARCOLOGY_SHIELDING"):
if pCity.getNumRealBuilding(gc.getInfoTypeForString("BUILDING_DEFLECTOR_SHIELDING")):
return True
return False[/COLOR][/B]
and from CvEventManager.py:
Code:
def onBuildingBuilt(self, argsList):
'Building Completed'
pCity, iBuildingType = argsList
game = gc.getGame()
if ((not gc.getGame().isNetworkMultiPlayer()) and (pCity.getOwner() == gc.getGame().getActivePlayer()) and isWorldWonderClass(gc.getBuildingInfo(iBuildingType).getBuildingClassType())):
# If this is a wonder...
popupInfo = CyPopupInfo()
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
popupInfo.setData1(iBuildingType)
popupInfo.setData2(pCity.getID())
popupInfo.setData3(0)
popupInfo.setText(u"showWonderMovie")
popupInfo.addPopup(pCity.getOwner())
CvAdvisorUtils.buildingBuiltFeats(pCity, iBuildingType)
[B][COLOR="Red"]if iBuildingType == CvUtil.findInfoTypeNum(gc.getBuildingInfo, gc.getNumBuildingInfos(), "BUILDING_ARCOLOGY_SHIELDING"):
pCity.setNumRealBuilding(CvUtil.findInfoTypeNum(gc.getBuildingInfo, gc.getNumBuildingInfos(), "BUILDING_ARCOLOGY"), False)
elif iBuildingType == CvUtil.findInfoTypeNum(gc.getBuildingInfo, gc.getNumBuildingInfos(), "BUILDING_DEFLECTOR_SHIELDING"):
pCity.setNumRealBuilding(CvUtil.findInfoTypeNum(gc.getBuildingInfo, gc.getNumBuildingInfos(), "BUILDING_ARCOLOGY_SHIELDING"), False)[/COLOR][/B]
if (not self.__LOG_BUILDING):
return
CvUtil.pyPrint('%s was finished by Player %d Civilization %s'
%(PyInfo.BuildingInfo(iBuildingType).getDescription(), pCity.getOwner(), gc.getPlayer(pCity.getOwner()).getCivilizationDescription(0)))
and you must in PythonCallbackDefines.xml do this:
Code:
[B][COLOR="Red"] <Define>
<DefineName>USE_CANNOT_CONSTRUCT_CALLBACK</DefineName>
<iDefineIntVal>1</iDefineIntVal>
</Define>[/COLOR][/B]
and can you upload your cottage/town texture from image it's look very nice, thanks