NOTICE: Please do not disapprove this submission, as some of you may think that this is a double-post. This is not a double post as it was originally posted correctly, but messed up and went under FPSB, which didn't have CNC3. So Terminatrix asked me to repost all the submissions, and she will accordingly trash the ones in FPSB.
Tutorial by NightHawk.
Tools Needed: An XML Editor (Notepad works just fine), an audio converter (if your music is not in MP3 format already).
This is the first in a series of tutorials that will show you how to modify the music in C&C3.
This tutorial will show you how to modify the music played on the main menu. Later, we will look at changing the skirmish screen , credits and loadscreen music; and adding new tracks that will be played ingame.
The SDK does give you a rather basic tutorial on modifying music, and it does provide you with the basics you need, but for some people that may not be enough.
Anyway, on with the tutorial. Music in C&C3 is composed of MP3 files. If you've merely existed for the past few years, you'll know what that is. MPEG-1 Audio Layer 3 is now one of the core standards of sound, and the music industry in particular, yielding high quality sound with low disk space costs.
It should be noted that, although I recommend, and am going to base this tutorial on, the MP3 format, you can also use WAV files for your music. I wouldn't recommend this however, as WAV files take up large amounts of disk space compared to MP3s. Conversion to MP3 is quite simple, especially if you have Windows XP Media Centre Edition, it comes with a built in converter (it's what I used to convert the music file I used here to MP3 format from WAV). If you don't have MCE, there are a number of free converters available on the Internet, just use Google.
In C&C3, there are several key factors which you must adhere to when choosing your MP3s:
* They must be mono or stereo, no surround sound here.
* There will be a small gap if it is a looping track, so make sure that your MP3 file starts and ends with silence.
* They take 1% of the CPU to play, so several at once may cause trouble with lower-spec computers.
* There is a hardcoded limit of 13 MP3 files playing at once.
* They should only be used for large files that actually need the format, such as mission speech, music or ambient streams.
By now you should have chosen your MP3 file, or you can use the one I've provided at the bottom. With that out of the way, let's move on to the tutorial itself - changing the main menu music.
Changing the Main Menu music:
Firstly, we need to create a new XML file to contain our sound edits. In this example, we will create a file called 'NewSound.xml' within the 'data' directory of your mod's file structure. It must be included in mod.xml and mod_l.xml like any other mod file, and contain the same headers as any other mod file. That is not covered in this tutorial, it's common sense.
If you don't want to create a file from scratch, you can copy the 'SoundMod.xml' file from the SampleMod. I would recommend this, it saves a lot of hassle.
Now, you need to create an entry for your new main menu music. If you've copied SoundMod.xml, change the existing entry.
Here is an example, taken from the SampleMod's SoundMod.xml file:
The 'id' is a unique identifier for your track. Both id fields shown above need to be unique. The 'File' denotes the path of your music track, relative to the MOD SDK directory. In this case, AUDIO:MedalofHonor.mp3 denotes 'MOD SDK\Audio\MedalofHonor.mp3'. Your audio files DO NOT go within your mod's own directory structure.
Volume, as you might guess, controls the volume that your track will be played at. Don't make it too loud, or too quiet. The SampleMod has this set to 60, I would keep it at that. Ignore the inheritFrom and entries, they don't need to be edited.
The field denotes what track will be played. This file does not actually exist, but is instead a fake that stops the track from being drowned out by the main menu movie. I'd advise that you change the name, but don't remove it.
You should now have a finished Main Menu music entry. My example is below: