1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Wondermovies

Discussion in 'Civ4 - Graphics Modpacks' started by Arian, Jun 5, 2008.

  1. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
    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.
     
  2. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
  3. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
  4. johny smith

    johny smith Deity

    Joined:
    Mar 10, 2007
    Messages:
    2,273
    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.
     
  5. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
  6. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
  7. ripple01

    ripple01 Emperor

    Joined:
    Mar 7, 2006
    Messages:
    1,253
    Location:
    New York City
    nm..........
     
  8. ripple01

    ripple01 Emperor

    Joined:
    Mar 7, 2006
    Messages:
    1,253
    Location:
    New York City
    Double post, sorry...
     
  9. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
    Please look a couple of posts back and it's all there ;)

    OOPS!! :lol:
     
  10. C.Roland

    C.Roland FFH Art team member

    Joined:
    Nov 26, 2005
    Messages:
    2,112
    Location:
    Quebec
  11. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
    @C.Roland:
    I've seen this Magellan-movie before in some mods but thanks anyway!
     
  12. Wolfshanze

    Wolfshanze CFC Historian

    Joined:
    Nov 12, 2001
    Messages:
    5,689
    Location:
    Florida
    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)))
    	
     
  13. Wolfshanze

    Wolfshanze CFC Historian

    Joined:
    Nov 12, 2001
    Messages:
    5,689
    Location:
    Florida
    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?
     
  14. johny smith

    johny smith Deity

    Joined:
    Mar 10, 2007
    Messages:
    2,273
  15. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
    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.
     
  16. Wolfshanze

    Wolfshanze CFC Historian

    Joined:
    Nov 12, 2001
    Messages:
    5,689
    Location:
    Florida
    If you got your python to work, don't suppose you could upload it or paste that section here (in code/spoiler format).
     
  17. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands

    Python code of Event/ForbiddenPalace attached:
    Hope it helps...
     

    Attached Files:

  18. Wolfshanze

    Wolfshanze CFC Historian

    Joined:
    Nov 12, 2001
    Messages:
    5,689
    Location:
    Florida
    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.
     
  19. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
    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 :)
     
  20. Wolfshanze

    Wolfshanze CFC Historian

    Joined:
    Nov 12, 2001
    Messages:
    5,689
    Location:
    Florida
    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.


    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.
     

Share This Page