Wondermovies

Don't panic, Wolf :)

I've gone through this also and I found the solution in GIR's post about the Forbidden Palace. That national wonder triggered a movie while others did not. Well, the trick is in the Python!!

Look in the CvEventManager.py for this entry:

Code:
def onBuildingBuilt(self, argsList):

If yours looks like this:

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())

then add the following lines for each national wonder movie you want to display:

Code:
if ( iBuildingType==gc.getInfoTypeForString("BUILDING_NATIONAL_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())

This works fine for me. Good luck!

Thanks to GIR for the code.
 
PHP:
<MovieArtInfo>
		<Type>ART_DEF_MOVIE_SISTINE_CHAPEL</Type>
		<Path>Assets/Art/Movies/Wonders/SistineChapel.bik</Path>
</MovieArtInfo>

Well I noticed in the CIV4ArtDefines_Movie.xml that for some reason only the Taoist Shrine has the <KFM> tag in my xml. Don't know if that would effect it or not.
 
I think possibly some Python code is required to work. Someone (forgot the name, sorry) did a Forbidden Palace wonder movie that required Python code in order to view the movie. Or it could possibly be an easy change in the SDK...

Cheers,
ripple01

Please look a couple of posts back and it's all there ;)

OOPS!! :lol:
 
Don't panic, Wolf :)

I've gone through this also and I found the solution in GIR's post about the Forbidden Palace. That national wonder triggered a movie while others did not. Well, the trick is in the Python!!

Look in the CvEventManager.py for this entry:

Spoiler :
Code:
def onBuildingBuilt(self, argsList):

If yours looks like this:

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())

then add the following lines for each national wonder movie you want to display:

Code:
if ( iBuildingType==gc.getInfoTypeForString("BUILDING_NATIONAL_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())

This works fine for me. Good luck!

Thanks to GIR for the code.

I'm a noob at Python... and I'm surely not doing it right.

Okay, obviously I'm not doing my Python correctly... exactly where/what/how do I put this in... I tried the following and tested the following National Wonders in-game and got nothing...

Spoiler :
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())

if ( iBuildingType==gc.getInfoTypeForString("BUILDING_ACADEMY") ):
			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())

if ( iBuildingType==gc.getInfoTypeForString("BUILDING_GLOBE_THEATRE") ):
			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())

if ( iBuildingType==gc.getInfoTypeForString("BUILDING_HERMITAGE") ):
			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())

if ( iBuildingType==gc.getInfoTypeForString("BUILDING_HEROIC_EPIC") ):
			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())

if ( iBuildingType==gc.getInfoTypeForString("BUILDING_IRON_WORKS") ):
			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())

if ( iBuildingType==gc.getInfoTypeForString("BUILDING_MILITARY_ACADEMY") ):
			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)

		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)))
 
If you want a 3d animated wonder movie for a naval wonders like Magellan's voyage, I did this a long time ago that suit well the purpose. Is taken from Sid Meier's Pirates !

http://membres.lycos.fr/coteleger/main/aide/
Is there a way to trigger a movie just for circumnavigating the globe (getting the +1 to naval movement)... probably a Python trick, but can it be done?
 
I am a noob in Python too. I just copy and paste the code, then trial and error!!
However your code seems alright and should work :confused:

I suggest asking your question in this thread by Zebra9:

http://forums.civfanatics.com/showthread.php?t=224038

Zebra can definitely help you better with Python than I can.
If you got your python to work, don't suppose you could upload it or paste that section here (in code/spoiler format).
 
Python code of Event/ForbiddenPalace attached:
Hope it helps...

Okay thanks... but now I'm confused... I thought I only need modify the CvEventManger.py, but you enclosed four differant python files (I realize one or more are custom)...

Dang, this is getting complicated just to add movies for the default BtS National Wonders.
 
They all exist in my mod and it works just fine. Is your CvCustomEventManager the same as mine?

BTW I took the liberty to pose your idea of a movie displaying after circum...etc. the world in Zebra's thread. Hope you don't mind :)
 
They all exist in my mod and it works just fine. Is your CvCustomEventManager the same as mine?
Okay... I got it figured out (thanks to your files you posted)... the problem was as simple as a couple of tabs... the start to some of my lines weren't tabbed properly. I matched them to yours and it made all the difference in the world... believe it or not... some mere tabbing was all that was needed.


BTW I took the liberty to pose your idea of a movie displaying after circum...etc. the world in Zebra's thread. Hope you don't mind :)
Definitely not a problem... I would LOVE to get some sort of reward for circumnavigating the globe... I was thinking of using the "Magellan's Voyage" movie, but if you have something better in-mind, I'm all for it.
 
Top Bottom