ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Adding A Song: Difference between revisions

From ModEnc
Jump to navigation Jump to search
TAK02 (talk | contribs)
m I had a WAV in-/outside an expandmd MIX, and at least XWIS YR EXE and Ares don't care about WAV name length (less than 6 for Sound=DIE or more than 8 characters for Sound=ENEMIESTOBEFEARED). Please dbl-chk this with retail EXEs.
TAK02 (talk | contribs)
→‎Step Two:: metadata
Line 31: Line 31:
Go to "'''File'''">"'''Export'''">"'''Export as WAV'''"
Go to "'''File'''">"'''Export'''">"'''Export as WAV'''"
=== Step Two: ===
=== Step Two: ===
Under "'''Save as type'''", the "'''signed 16-bit PCM'''" option should the default selection. Else set it manually.
Under "'''Save as type'''", the "'''signed 16-bit PCM'''" option should the default selection. Else set it manually. When you hit Save the " Edit Metadata Tags "window opens.


Do note that the "Metadata Tags" all need to be empty so XCC Mixer reads the WAV as Format 0001, the WAV format the game uses.
All tags need to be empty so XCC Mixer reads the WAV as Format 0001, the WAV format the game uses.


If XCC lists the format as something else like 0011 (assuming XCC can identify the file as a WAV), the game might not read the WAV at all.
If XCC lists the format as something else like 0011 (assuming XCC can identify the file as a WAV), the game might not read the WAV at all.

Revision as of 14:42, 4 May 2021

Adding a New Song to RA2 (By Kane 148)

Tools Needed: XCC Mixer, XCC Mix Editor, XCC IMA ADPCM WAV Writer Plug-In , Red Alert 2, Winamp or Windows Sound Recorder, MP3 song (Winamp) or Wave song (Sound Recorder)

Step One:

First, open Winamp and press Ctrl + P to go the Preferences menu. Go to the Output Plugins, and select the XCC IMA ADPCM WAV Writer Plug-In plugin. Go to configure, and select your RA2 directory (usually C:\Westwood\RA2\) as the output directory. Now select "Close", and play the song that you wish to add. It will play real fast, and you will hear no sound, but that means that it is converting the file. When it’s done, change back to your normal output plugin, and close Winamp.

Alternatively, you can use Windows Sound Recorder (in XP) to do this. Convert the file to .WAV before you begin, then open it in Sound Recorder. Save it in the RA2 directory with the options Format:PCM, Attributes: 22.050kHz, 16 bit, mono. This does the same thing as Winamp in the description above.

Please note that Windows Vista's Sound Recorder is unable to do this, but XP's can be copy-pasted (it is named sndrec.exe and is in the C:\windows\system32\ directory).

Step Two:

Now go to your RA2 directory using Windows Explorer, and rename the WAV (if necessary) so that the filename is made of numbers and letters (no spaces).

Step Three:

Now open XCC Mixer and go to the Launch menu. Select XCC Theme Writer > Red Alert 2. A box will pop up in a few seconds that says "X themes have been written to theme.ini" (X= the number of tracks). Now click "ok".

Step Four:

Go to the Launch menu in XCC Mixer and select XCC String Table Editor > Red Alert 2. Look in the bar on the left and select "THEME". Now find the tag for the song you added. It should be named "THEME:xxxx" (xxxx=the filename of the WAV you added). Click on it once, and then click the Edit button. In the big box it should say the track's filename. Now change that to be whatever you want the song to be called in the Music Tracks list in Red Alert 2. (example: if the filename is killer.wav, the tag will be THEME:KILLER, and you should change "killer" in the big edit box to be the song's title). Now click "Ok" to close the edit box, and click the "Ok" button near the bottom of the screen. You will be taken back to XCC Mixer.

Step Five:

Now go to the Launch menu in XCC Mixer and select XCC Mix Editor. Now click "New" to create a new MIX file. Name it expandxx.mix (xx= 1-99), and save it in your RA2 directory. Now click "Insert", and select the WAV file that’s in your RA2 directory. Click "Open" to add it to the MIX file. Now click "Save", "Compact", and "Close" in that order. You can now close XCC Mixer and Mix Editor. All you have left to do is to delete the WAV file from your RA2 directory, since it is now inside the MIX file.

The track should now play normally in Red Alert 2! You can also add multiple tracks by preforming the steps on multiple songs.

Alternative way using Audacity

Please note this assumes you're doing only a replace (or override) of one of the game's original themes. If you wish to add a completely new theme, analyzing the theme(md).ini file is mandatory (or just follow the tutorial above starting at step three).

Step One:

Go to "File">"Export">"Export as WAV"

Step Two:

Under "Save as type", the "signed 16-bit PCM" option should the default selection. Else set it manually. When you hit Save the " Edit Metadata Tags "window opens.

All tags need to be empty so XCC Mixer reads the WAV as Format 0001, the WAV format the game uses.

If XCC lists the format as something else like 0011 (assuming XCC can identify the file as a WAV), the game might not read the WAV at all.

Don't forget to name it properly (only numbers and/or letters) and save to the game's directory/folder. To test whether or not it worked, save the WAV under the name "grinder" for RA2 (this assumes you're using vanilla theme.ini, or at least one that doesn't change the menu's theme).

You'll always hear proper stereo if it's in the WAV file, regardless of menu or in-game.

Add music to Yuri's Revenge 2020 (yes, there are still people playing) (by Weavors)

Step 1 - All you need is XCC Mixer 1.47 - Go on Google type "Convert Mp3 to WAV" (without quotation mark) - Optional settings :

   + bit resolution : 16bit
   + sampling rate : 22050 Hz
   + audio channels : Mono

Step 2 - Open up XCC mixer, File > Open, open ra2md.mix, in it you will see a lot of other MIXs, double click on localmd.mix, in it you will find a "thememd.ini" (it's really hard to see so... good luck), in thememd.ini you will see a list of tracks, if you have add sound or an units into the game before, I really don't have to explain it to you, how ever if you are new:

         + Under [Themes] there is number=idname (example: 21=BrainFreeze) this is the declare system in red alert 2 engine, where essentially when you want something need to "appear" in game you have to list it down bellow 
         + NOW IF YOU ARE NEW TO MODDING, DO NOT, REPEAT DO NOT ADD NEW TRACK, instead change the names song in the Step 1, take for example there is a "10=;200Meters" under [theme], now in INI file ";" will make the engine ignore it, delete the ";" then change the name of the song from Step 1 into "200Meters" without quotation, 

Step 3 - Drag and drop the track in Step 1 that you just change it name into 200meters into game folder (no need to drag and drop it into thememd.mix) - Go in game, play Skirmish, in control menu, select sound and check if your track is there (because that's the only way i know that to check if it's worked or not) Good luck Commanders May the world will vibe with your new tracks