Adding Intro movies to mods

Dale

Mohawk Games Developer
Joined
Mar 14, 2002
Messages
7,601
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:
		<MovieArtInfo>
			<Type>ART_DEF_MOVIE_INTRO</Type>
			<Path>Assets/Art/Movies/Intros/intro.bik</Path>
		</MovieArtInfo>
		<MovieArtInfo>
			<Type>ART_DEF_MOVIE_2K_INTRO</Type>
			<Path>Assets/Art/Movies/Intros/intro.bik</Path>
		</MovieArtInfo>

And that's it. :)

Dale
 
It's exactly what i needed thx bro :)
 
I couldn't imagine it's so easy. Thank you, Dale!
 
In CvIntroMovieScreen.py we need to change one thing:
1. Change the following command to this (delete or comment out the existing code):
Should I replace this:
Code:
	def createLogoScreen(self):
		screen = CyGInterfaceScreen( "IntroMovieScreen", CvScreenEnums.INTRO_MOVIE_SCREEN )
		screen.setDimensions(screen.centerX(0), screen.centerY(0), 1024, 768)
		screen.setRenderInterfaceOnly(True)
		screen.showWindowBackground( False )
With this:
Code:
	def createLogoScreen(self):
                return
?
 
Should I replace this:
Code:
	def createLogoScreen(self):
		screen = CyGInterfaceScreen( "IntroMovieScreen", CvScreenEnums.INTRO_MOVIE_SCREEN )
		screen.setDimensions(screen.centerX(0), screen.centerY(0), 1024, 768)
		screen.setRenderInterfaceOnly(True)
		screen.showWindowBackground( False )
With this:
Code:
	def createLogoScreen(self):
                return
?

Yes, that's correct. :) The whole function is removed and replaced with the return statement.

As for the custom event manager, when implementing python in Civ4 you need to create your own event manager. This is what I'm refering to when I state "CustomEventManager.py". EG: In my Age of Discovery mod, this file is called AoDEventManager.py.

Dale
 
I saw that intro movie is in Dale's RtW - maybe you can figure it that there what was changed in bts ;)
 
For some reason none of the movies in my civ game work .... i don't know why ... they've been doing this for a while ... any suggestions?

Also, will it work if i just copy the original event manager into my mod and add the method at the bottom?
 
notepad will work
but something better notepad-like is recommended (i use pspad)
 
I hate to ressurect a dead thread, but it is the closest one to what I am looking for.
In the intro movie, can music be included in the bik or do I have to define it separatly
 
Thanks, I didn't know if I could do that because in civ there are separate definitions for movies and sound although that may only apply to the religion movies. Do you know if they are handled differently?
 
Is there anyway to enable intro movies RIGHT AFTER mod loads and RIGHT BEFORE the mod's main menu? As I know, it is disabled as the default setting.
 
Without hacking the exe I don't believe it is possible. At least, I don't know of any mods that do that.
 
Top Bottom