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):
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):
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.
And that's it.
Dale
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
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