- Created on Tuesday, 03 June 2008 19:14
Getting custom music into Unreal Tournament 200x or most any other Unreal Engine 2 titles is incredibly simple. The two step process involves compressing the music into ogg vorbis and then writing the filename into one of the properties windows inside UEd. There are exceptions but overall Unreal Engine 2 titles are some of the friendliest platforms for musicians to contribute to.
Unreal Tournament 200x (2003 and 2004) support importing a single piece of music that will loop as long as the map it is associated with is running. It is possible to add support for dynamic music but implementing such a system or writing music for it is beyond the scope of this tutorial. Dynamic music will be covered in Unreal Engine 3 tutorials. Music in Unreal Engine 2 is a simple concept to understand; it plays endlessly. I'd recommend reading up on the Looping Music Tutorial to prepare your music which in this case will not be divided into sections but looped in it's entirety. Once you've rendered a good loop of your song it's time to compress it to the engine's native audio format.
Ogg vorbis is a free and open alternative to MP3 which I bet you didn't know was patented. The pros and cons can be argued up and down but the truth is besides never incurring the risk of having to pay up (afaik iD paid to use mp3 in quake3) when your product hits retail, ogg vorbis has been proven to produce better audio quality at equally lower bitrates than mp3. One can argue that high speed internet and larger capacity hard drives leave no excuse to encode at the best possible settings, but you still have a responsibility to make the best compromise between finding the lowest bitrate and maintaining an acceptable sound quality. For private use feel free to make it as high as possible but I personally feel it's selfish to distribute a custom song that's filesize is larger than that of the map it's associated with.
To perform the encoding I recommend oggdropXPD . It's a simple feature-rich, easy to use (could such a thing exist?) encoder that presents you with a small square window. To select the compression quality just right-click on the window and select Encoding Options. I'd recommend sticking with the options in Quality Mode. A Quality Setting of 4 to 6 should prove well for most audio. You may also setup tags by right-clicking, or enter them via WinAmp after the file has been encoded. Now to encode your audio just drag and drop your wav onto that square. A few seconds later you'll have your compressed audio. Take the resulting .ogg and drop it into \UT200x\Music\ so it can be played in game.
As a note oggdropXPD can also encode multi-channel audio (5.1, 7.1 surround, etc..) if you feed it a wav with multiple audio channels. Unfortunately Unreal Engine 2 cannot decode (play) them.
Once you've got your ogg you're basically done unless you're charged with adding the music to a map yourself or perhaps it's your own map you want to customize. Let's go ahead and start UnrealEd and load the map that is going to have music added to it. The only thing of concern is a single text field that can be found by going to View / Level Properties. Expand the Audio tab and here it is. The section titled Song is where you'll be typing in the name of the music file you encoded, but without the ogg extension. Say your music file is awsomemusicfile.ogg you would only type in awsomemusicfile. After that save the map, you're done.
Pay mind that changing music this way in maps that came with the game or that you downloaded will cause what's called a version mismatch if played online. This is because your map is a different version and not compatible with others. So if you must change music remember to save the map as a different filename.
If you'd like to tell me how wrong I am or that by some mistake you actually found this tutorial useful, let me know here .