Movies are an important part of the gaming experience, but have so far been rarely used in mods and the process of installing them has been flawed and incomplete. This tutorial is based on my own experimenting with movies and how to flawlessly install them to ensure maximum compatibility. I've simplified the process as much as I can, and am proud to say that I've managed to find a way still moderatly easy for modders to use.
Disclaimer: The .mve format is copyrighted by the no longer existing Interplay. If you are unsure or doubtful as to use the format with regards to the copyright laws in your country, it's better to be safe than sorry and don't use it at all.
Section 1: Programs needed
AVI to Interplay MVE converter
Section 2: The movie
The most complicated step is the one I won't cover in this tutorial. Creating a movie is not very easy, and I'm personally not an expert of any kind.
What you need, though, is a movie in the .avi-format, no larger than 640x480 pixels.
Section 3: Converting the movie to .mve format
Here, you will need the .avi to .mve-converter, found here. It's a relatively easy program to use, and it's not more complicated to use this program than it is to traify a .d-file with WeiDU.
Here's what to do:
1. Put the avi2mve.exe in any folder.
2. Take the .avi you wish to convert and put it in the same folder.
3. Open up the windows command-prompt, and enter the directory to where you have the avi2mve.exe. Here's how it works:
C:\Directory\avi2mve.exe movie.avi [foo.mve] [additional options]The things in [brackets] are optional and not needed. Let's break down the line:
C:\Directory\This is the directory where you have the avi2mve.exe
avi2mve.exeThis instructs Windows to run this specific program.
movie.aviThis tells the program which .avi-movie you want to convert.
[foo.mve]If you want the movie to have another filename instead of the same name as the .avi, this is where you enter the new filename, with the .mve-extension.
There is a few very useful optional options, found if you double-click the avi2mve.exe. The most useful in my opinion is [-size megs].
Let's have an example, then:
C:\Directory\avi2mve.exe movie.avi SC#mov1.mve -size 5This will take the movie.avi, convert it into a .mve-file called SC#mov1.mve with the maximum size of 5 megabytes.
4. In the same directory, you will now have your .mve, as well as a .pal. That is a palette-file, and not needed. You can safely delete it or neglect to have it with your .mve when you add it to the mod later on.
Other useful tips: If no size-limit is specified, the .mve will be a few megabytes larger than the .avi. Try to keep the sizes down, out of sympathy for all dial-up players.
Section 4: Using WeiDU to install the movie
We encounter a problem pretty fast when trying to make the movie appear ingame. Normally, you slap the files into the override when you install them, but that's not possible with movies - the game won't read them from anywhere else than a .bif. So, we need to create a .bif.
Normally, .bif-altering mods are practically incompitable with other mods of different kinds, if you've already biffed the files and provide a custom chitin.key. The method for biffing files at install (as used in CtB, for example) was very flawed and made it virtually impossible to uninstall the mod. So, seeing as I both wanted to keep down the size of the mod, as well as making it easy to install and, more importantly, to uninstall, I deviced a new way to biff files.
As you can't biff files with WeiDU from the .tp2, we need to work around this with .bat-files. This works the same way as when you want to decode .ogg-files to .wav-files; you create an install.bat and an uninstall.bat.
Here's how they look, install.bat first:
@echo off @ECHO Installing movies mkdir Foo\Backup\Chitin-Key-Backup-Do-Not-Delete-For-The-Love-Of-God copy chitin.key Foo\Backup\Chitin-Key-Backup-Do-Not-Delete-For-The-Love-Of-God mkdir SC#Movie copy Foo\Movies\*.mve SC#Movie copy setup-foo.exe foo.exe foo --make-biff SC#Movie del foo.exe rmdir SC#Movie /S /Q @ECHO Finished installing moviesLet's break it down, once again:
@echo off @ECHO Installing moviesThis echoes the string "Installing movies" in the command-prompt window
mkdir Foo\Backup\Chitin-Key-Backup-Do-Not-Delete-For-The-Love-Of-GodJust for the sake of taking precautions, let's make a backup for the chitin.key. We start that off by making a directory inside the Backup-folder of the mod.
copy chitin.key Foo\Backup\Chitin-Key-Backup-Do-Not-Delete-For-The-Love-Of-GodThen, we simply copy the chitin.key into that folder.
mkdir SC#MovieThen, to begin installing the movies, we create a new folder in the main BGII-directory. Don't worry, it won't be here for long, it's only temporary.
copy Foo\Movies\*.mve SC#MovieFoo\Movies\ is the directory where you have the mve-file(s) you wish to include in the mod. Here, we copy these files to the SC#Movie-folder.
copy setup-foo.exe foo.exeNext, we make a copy of the Setup-Foo.exe the player just clicked to install the mod called foo.exe.
foo --make-biff SC#MovieAs foo.exe is a copy of weidu.exe, we'll use it to biff the folder SC#Movie, using the WeiDU-command --make-biff. We can't use Setup-Foo.exe, since executing this file to do this instead would make the the mod-installation launch again. And we don't want that.
del foo.exeDelete the "extra" copy of WeiDU.
rmdir SC#Movie /S /QRemove the SC#Movie directory, and all the files in it. /S indicates that it'll delete all files inside the folder, and /Q makes sure it doesn't ask the user that.
@ECHO Finished installing moviesEcho the string "Finished installing movies".
Now, let's go over the uninstall.bat:
@echo off @ECHO Uninstalling movies copy setup-foo.exe foo.exe foo --remove-biff data\SC#Movie.bif del foo.exe del data\SC#Movie.bif /F /Q @ECHO Finished uninstalling moviesAnd we'll break this down, as well:
@echo off @ECHO Uninstalling moviesEchoes the string "Uninstalling movies" in the window.
copy setup-foo.exe foo.exeOnce again, we make a copy of Setup-Foo.exe, of the same reason as last time.
foo --remove-biff data\SC#Movie.bifAnd then we have foo.exe use the WeiDU-command --remove-biff for the SC#Movies.bif.
Note that this is one of the many functions Weimer has marked as "Don't use this", but we do it anyway.
del foo.exeDelete the extra WeiDU-file.
del data\SC#Movie.bif /F /QRemove the .bif from the data-folder. Since it's read-only, we use /F to force it to delete anyway. /Q is quiet-mode, to not have the .bat prompt the user.
@ECHO Finished uninstalling moviesEchoes the string "Finished uninstalling movies".
Now, treat these as any other install/uninstall.bat's, by putting them into the main folder of the mod (or even inlining them in the tp2) and adding the following to the .tp2:
COPY ~Foo/install.bat~ ~install.bat~ COPY + ~Foo/uninstall.bat~ ~uninstall.bat~ AT_INTERACTIVE_EXIT ~install.bat~ AT_UNINSTALL ~uninstall.bat~
Not that complicated, I hope?
Section 5: Scripting the movie to appear ingame
IESDP: 167 StartMovie(S:ResRef*)
So, the correct script would be:
IF True() THEN RESPONSE #100 StartMovie("SC#Movie") ENDAnything else? Don't think so, but never hesitate to ask in the help forums!
Â© Copyright Sebastian Conrad 2005.