Zlatko
CIW
Whether this will work without red codes?
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)
[COLOR="DarkOrange"]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]
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)))
Can one AI be set to VALUE AN AREA like a land bridge crossing the Water?
and force another AI to fight and/or take a particular city?
Hi,
I want to modify NextWar mod. Can anyone teach me how to add futuristic city sets (to replace modern era city sets when future arrives)?
Thanks to those who'll respond.
Faye.
I'd try setOccupationTimer in the CyCity class.
The answer is in cannotConstruct in CvGameUtils in Next War mod
def cannotConstruct(self,argsList):
pCity = argsList[0]
eBuilding = argsList[1]
bContinue = argsList[2]
bTestVisible = argsList[3]
bIgnoreCost = argsList[4]
# 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
CvGameCoreDLL.dll!CvArtFileMgr::ltstr::operator()(const char * s1=0x0012fbe0, const char * s2=0x2a4c6260) Line 90 + 0xd bytes C++
> CvGameCoreDLL.dll!std::_Tree<std::_Tmap_traits<char const *,CvArtInfoUnit *,CvArtFileMgr::ltstr,std::allocator<std::pair<char const * const,CvArtInfoUnit *> >,0> >::iterator::iterator(std::_Tree_nod<std::_Tmap_traits<char const *,CvArtInfoUnit *,CvArtFileMgr::ltstr,std::allocator<std::pair<char const * const,CvArtInfoUnit *> >,0> >::_Node * _Pnode=0x00000001) Line 313 C++
+ this (0x00432eb0 "VñVè",0x005fdb30 {m_szShaderNIF={...} m_szShadowNIF={...} m_szShadowAttach={...} ...}) std::_Tree<std::_Tmap_traits<char const *,CvArtInfoUnit *,CvArtFileMgr::ltstr,std::allocator<std::pair<char const * const,CvArtInfoUnit *> >,0> >::iterator * const
+ this (0x00432eb0 "VñVè",0x005fdb30 {m_szShaderNIF={...} m_szShadowNIF={...} m_szShadowAttach={...} ...}) std::_Tree<std::_Tmap_traits<char const *,CvArtInfoUnit *,CvArtFileMgr::ltstr,std::allocator<std::pair<char const * const,CvArtInfoUnit *> >,0> >::iterator * const
+ _Pnode 0x00000001 {_Left=??? _Parent=??? _Right=??? ...} std::_Tree_nod<std::_Tmap_traits<char const *,CvArtInfoUnit *,CvArtFileMgr::ltstr,std::allocator<std::pair<char const * const,CvArtInfoUnit *> >,0> >::_Node *
It turns out that it was a ',' at the start of the units button reference, I thinki this was an issue because I removed the original atlas reference, so I thik it was seeing the ',' trying to run an atlas reference, finding none and crashing...This looks vaguely familiar...
In the case I dealt with I think it was associated with using the value "None" instead of "NONE" in an art reference: a movie definition for a building. It turned out that in the CvBuildingInfo::getMovieInfo() there is specific handling for the "NONE" value and it is case sensitive, so "None" was a problem.