<Nexus>
Traveler of the Multiverse
Oh, thank you so much! That worked!Just looking at the code, there is still iPlayerX in the addMessage call. FeatureInfo also isn't defined here. Untested attempt at a correction:Could still have other syntax errors (PythonErr.log would say where and what) or might have no apparent effect, in which case either placeWonderBuilding isn't called or the popup isn't processed as intended; either way, print statements (in placeWonderBuilding or in CvWonderBuildingScreen.py) should shed more light.Spoiler :Python:# Trigger the wonder movie popup popupInfo = CyPopupInfo() popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN) popupInfo.setData1(iFeature) popupInfo.setData3(3) popupInfo.setText(u"showWonderMovie") popupInfo.addPopup(pCity.getOwner()) FeatureInfo = gc.getFeatureInfo(iFeature) CyInterface().addMessage( pCity.getOwner(), # recipient True, 10, # force immediate delivery, display duration CyTranslator().getText("TXT_KEY_WONDERDISCOVERED_YOU", (FeatureInfo.getDescription(),)), '', 0, FeatureInfo.getButton(), ColorTypes(11), # sound, indicator button and color pPlot.getX(), pPlot.getY(), # coordinates True, True) # offscreen/ onscreen arrows




Now my next goal is twofold:
1) Find out how to make the wonder built only when it's inside the city's culture because now it can be outside:
Just looking around how to continue: Should I use cultureExpansion or onCultureExpansion or cultureDistance or getCultureRangeCities or isCultureRangeCity or isWithinCultureRange ?
I'm trying to find some relevant code with those above to start with but nothing yet...
2) In CoM cities can work tiles up to the 3rd ring, so when a city reaches a Natural Wonder on the 3rd tile that should also be built.
As I understand this is the responsible code for defining the area:
Python:
def placeWonderBuilding(self, pCity):
for i in xrange(21):
pPlot = pCity.getCityIndexPlot(i)
iFeature = pPlot.getFeatureType()
if iFeature == -1:
continue