Announcement

Collapse
No announcement yet.

Adding Intro movies to mods

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding Intro movies to mods

    Tutorial: How to add an intro movie to a mod

    This tutorial will run through the process of adding an intro movie to a mod. The movie will play full screen after loading the mod, but before the "Dawn of Man" screen.

    To add an intro movie we will need the following in our mod:
    1. \assets\python\screens\CvIntroMovieScreen.py
    2. \assets\python\CustomEventManager.py
    3. \assets\art\movies\intros\Movie.bik
    4. \assets\xml\art\CIV4ArtDefines_Movie.xml

    CvIntroMovieScreen.py

    Firstly, using this tutorial it will produce one screen to play an intro movie on. There's the possibility of more, but this tutorial doesn't cover it. Play around with it and I'm sure you'll get it.

    In CvIntroMovieScreen.py we need to change one thing:
    1. Change the following command to this (delete or comment out the existing code):
    Code:
    	def createLogoScreen(self):
                    return
    This eliminates the legal logo screen. As it was displayed when starting Civ4 it's not needed.

    CustomEventManager.py

    I am assuming you already have your own python event manager and it's working correctly.
    1. Add the following (this code will end up displaying the movie and then the DoM screen. If you don't want the DoM screen do not add that bit of code):
    Code:
    import CvIntroMovieScreen
    ..
    ..
    ..
    	def onGameStart(self, argsList):
                    # display mod's intro movie
                    introMovie = CvIntroMovieScreen.CvIntroMovieScreen()
            	introMovie.interfaceScreen()
            	
    		# display DoM message
    		for iPlayer in range(gc.getMAX_PLAYERS()):
    			player = gc.getPlayer(iPlayer)
    			if (player.isAlive() and player.isHuman()):
    				popupInfo = CyPopupInfo()
    				popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
    				popupInfo.setText(u"showDawnOfMan")
    				popupInfo.addPopup(iPlayer)
    Movie

    The movie has to be in Bink (bik) format. Use Rad Game Tools to create your movie. This tutorial does not cover the use, refers to that apps help files. http://www.radgametools.com

    CIV4ArtDefines_Movie.xml

    1. This is the easy bit. Point both intro movie tags in this file to your custom movie.
    Code:
    		
    			ART_DEF_MOVIE_INTRO
    			Assets/Art/Movies/Intros/intro.bik
    		
    		
    			ART_DEF_MOVIE_2K_INTRO
    			Assets/Art/Movies/Intros/intro.bik
    		
    And that's it.

    Dale
Working...
X