Tutorial: Custom movies

Please login to contribute to the conversation.
I felt like writing a tutorial on putting custom movies/FMVs in SHAR, so you know what, I'll do just that!

Basic setup
You'll need a mod setup with the Custom Files hack required. If the movie file you want to use has a resolution of over 768x768, you'll also want to enable the Increased Video Resolution Support hack. Note that even with this hack there's a maximum resolution of around 6144x3072.

Converting the file
SHAR uses RAD Game Tools' Bink file format and video/audio encodings for movies. As such, we'll need to get our custom video into this format. Luckily, they offer a tool capable of this on their website. Link - the contents are contained within a 7-Zip archive and the password is "RAD".

Once installed, run the tool. You'll be able to use the main portion of the window to navigate to a directory and select a file. Once selected, click the "Bink It!" button located towards the bottom-left corner. Accepted file formats which are commonly used for video include Audio Video Interleave (AVI), QuickTime (MOV/QT), MP4, and Windows Media Video (WMV). Note that QuickTime needs to be installed in order to import MP4 files (at least as far as I know). I generally use WMV as a source.

You'll be asked to adjust some settings (though this is entirely optional but recommended) for the file conversion. Documentation on them can be found here. When ready, click "Bink" from the right sidebar and wait for the conversion to finish.

Implementing into SHAR
Place the output file into CustomFiles\movies, and rename the file extension from ".bik" to ".rmv". Depending on where you want the movie to play, you'll need to do different things.

The following movie files play at the listed event and do so hardcodedly. To replace them, rename the chosen file in the movies folder to the name of the one that you want to replace, or use a Custom Files path redirection.

vuglogo - Game boot.
foxlogo - Game boot.
gracie - Game boot.
radlogo - Game boot.
intro - Game boot.
fmv1A - Starting a new game.

It's possible to play a movie during a mission using a special objective. The MFK code is as follows:

	AddObjective("fmv");
		SetFMVInfo("X.rmv"); //Replace X with filename.
	CloseObjective();

Gags can also play movies. Add the following line in-amongst the code for the target gag (between GagBegin and GagEnd):

GagPlayFMV("X.rmv"); //Replace X with filename.

There's also a different version of this command used in Level 3 for the Itchy & Scratchy Movie gag, which likely has quite a bit of hardcode to it. Nonetheless, here's the vanilla code if someone wants to try using it (though with that hardcode there's also every chance it could be tied to some other elements that need to be present in the same level, not sure):

GagCheckMovie("teen", "lisa", "fmv8.rmv", "aztec"); //Characters involved, filename, dialogue name for reject?

That about wraps things up. Converting the video can prove a little challenging, I recommend playing with the settings a little and seeing what the results are (you can playback the files in the RAD Video Tools or with some other sources such as VLC Media Player).
This is suuuper helpful, a lot of this was hard to figure out! Lots to tinker with, I'd recommend using 540p video or smaller so your simple mod doesn't end being over 2GB by accident haha i leaned that lesson the hard way!