Those 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.aspxTOOLS
In 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 AllianceDownload 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 - IMPORTANT
If 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.
- 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.STARTING
You 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 PRESETS
RPC 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)
For weapon firing (not impact) sounds
For explosions and impact sounds
Unit select and most interface sounds do not use any effects.CATEGORIES
You'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
- Sound that goes with videosInterface
- The sounds made when you press buttons and stuff.
- The sound made when you click on a unit.Op_Briefing
- Briefings from the campaign.VO
- Voiceovers, contains categories for the different languages.
- Various language categoriesWorld
- Overall category for sounds made by game objects
- Overall category for sounds made by units. (not weapons, not UI selection)
- Subcategories for units by faction and unit type
- Constant looping sounds (working sound made by mexes, gens, etc, not construction)
- Constant looping sounds for construction effects.
- Stuff like trees burning
- Weapon firing effects, not weapon impact effects.
- All weapon impact effects and explosions.
- For the rumbling sound you get when zoomed out.FINISHING
Once 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 INFO
XACT on the MSDN - http://msdn2.microsoft.com/en-us/library/bb174772.aspx
I will be glad to answer any questions you might have after reading this.
Feedback and suggestions for improvement are most welcome!
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