INTROThose of you that are interested in sound modding will know that SupCom/Forged Alliance uses the XACT sound engine, which has caused some problems as it is difficult to mod.
Having experimented with adding sounds I came across one problem in particular. The main limitation was that it was not possible to control the volume of a sound depending on how far away you are. This is fine for UI sounds which to not attenuate over distance but becomes a problem for sounds like unit weapons and explosions.
In this thread I will show you how to overcome this limitation and more, getting your sounds using the same effects that the stock sounds are using.
NOTE: This is NOT a tutorial on how to use XACT. If you're looking for a basic tutorial you should see:
http://msdn2.microsoft.com/en-us/library/bb172335.aspxTOOLSIn order to add new sounds to the game properly you will need at least two things
- The DirectX SDK (October 2006 for SupCom, November 2007 for Forged Alliance)
- The original project files for SupCom or Forged Alliance
Download the October 2006 SDK hereDownload the November 2007 SDK hereDownload the original project files here -
Read the "CAUTION" section carefully when using.These files were very kindly provided by o, big thanks to him for making this possible!
These project files are the XACT projects that were used to build the banks that ship with the game.
The source audio files are NOT included so you cannot rebuild the original wave banks or get audio out of the game with these files. It should be noted that I have slightly modified these files for convenience, so that when compiled they no longer build a project header or cue list, and the build paths were changed back to the default folder.
In the zip you will find one project for SupCom and one for FA. Pick the one appropriate to your needs.
CAUTION - IMPORTANTIf you want to use the effects shown in these files with your sounds you MUST use one of these files as a base, and you should NOT change, add or remove anything under Variables, RPC presets, DSP presets or Categories.
The reason for this is that many things are referenced by internal IDs which are hidden from you. As they are, the internal IDs in the projects match up exactly with the game. Changes you make to anything that goes into the global settings file will not carry over to the game. If you begin to modify these things you could accidentally change its internal ID without knowing. If you do this, presets and things that you attach to sounds will no longer match up to what is in the game any more.
Ideally you should never be modifying anything other than sound banks and wave banks.
For example:
- Say there's an RPC preset you want to use. The game uses an ID of 5 to reference it.
- In your project file it also has an ID of 5. However, you start to shuffle the presets around and remove one.
- Unknown to you, you have removed one with a lower ID than 5, and all the presets above that shift back an ID to fill the gap.
- The desired preset now has an ID of 4 in XACT, but it is still 5 in the game. It appears nothing is wrong and you compile your sound bank.
- Your sound bank is read by the game, it uses the preset at ID 4. A DIFFERENT preset to the one you wanted, which is at ID 5.
When this happens, bad, baaad things start happening as things are mismatched all over the place.
STARTINGYou will find it useful to keep an extra copy of the original projects around as they are a fantastic reference for how things work, so the first thing you will want to do is make a copy of the file to work with, preferably placed in a folder by itself like how I have packaged them. (Subfolders will be created by XACT)
In your new copy you'll need to delete all the existing sound banks and wave banks.
Now create new wave banks and sound banks as you see fit for your sounds. After you are done you can begin tying your sounds to RPC presets.
RPC PRESETSRPC presets are effects that you can apply to your sound, such as reducing volume over distance (attenuation).
You can attach RPC presets by opening your sound bank, right clicking on a sound (not a cue) and selecting "Attach/Detach RPC(s)" and you can also mass add/remove sounds by right clicking on an RPC preset in the tree and choosing "Attach/Detach Sound(s)". Drag and drop also works, whether it's RPC preset(s) to sound or sound(s) to RPC preset.
There are many presets and I cannot explain them all, you will have to explore them yourself. It is easiest to find similar sounds in the original file and see what effects are applied. Here are the presets typically used on common sounds.
For unit sounds (moving, engine noise, etc)
Angle_Attenuation
Attenuation
Duck
For weapon firing (not impact) sounds
Angle_Attenuation
Attenuation Weapons
Duck
For explosions and impact sounds
Angle_Attenuation
Attenuation Destroy
Duck
Unit select and most interface sounds do not use any effects.
CATEGORIESYou'll also notice there are categories for sounds. They mostly only adjust volume but the occasional category will also add a fade in/out or some other tweak. I like to assign categories to my sounds so they fit better with whatever is already in game.
You can assign a category by selecting a sound and looking in the properties panel and changing the Category item.
Here is a brief description of what goes in each category as I have worked out.
Default - Default
FMV - Sound that goes with videos
Interface - The sounds made when you press buttons and stuff.
....
Unit Select - The sound made when you click on a unit.
Op_Briefing - Briefings from the campaign.
VO - Voiceovers, contains categories for the different languages.
....
XX - Various language categories
World - Overall category for sounds made by game objects
....
Units - Overall category for sounds made by units. (not weapons, not UI selection)
........
UnitsXXX - Subcategories for units by faction and unit type
........
ActiveLoopsXXX - Constant looping sounds (working sound made by mexes, gens, etc, not construction)
........
Construction_Loops - Constant looping sounds for construction effects.
....
Ambient - Stuff like trees burning
....
Weapon - Weapon firing effects, not weapon impact effects.
....
Destroy - All weapon impact effects and explosions.
....
Rumble - For the rumbling sound you get when zoomed out.
FINISHINGOnce you've finished customising your sounds, compile by pressing F7. After it is done, retrieve the .xsb and .xwb files from the build folder (typically the subfolder "Win" from where ever the project is saved) and copy them to the "sounds" folder in Supreme Commander. Do NOT copy over the SupCom.xgs file as you will overwrite the original global settings, and that is bad. From there you can reference them just like how any other sound is referenced. Add a reference from a blueprint or similar and go test!
FURTHER INFOXACT on the MSDN -
http://msdn2.microsoft.com/en-us/library/bb174772.aspxI will be glad to answer any questions you might have after reading this.
Feedback and suggestions for improvement are most welcome!
Changes:
18th Feb 2008
- Rewrote "CAUTION" section to make it clearer.
- Added some scary red text next to the project files download link to make people read the CAUTION section.
15th Feb 2008
- Initial post