SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding Tutorials => Topic started by: Phobos on December 19, 2012, 09:31:55 PM

Title: The Ultimate Sound Modding Tutorial [WIP]
Post by: Phobos on December 19, 2012, 09:31:55 PM
Approximate Tutorial Completion: 33%

I. Sound Modding Resources
II. Sound Munging
III. Building custom music and sound region streams
IV. Building custom voiceover streams
V. Building custom in game sound effects
VI. FAQ


I. Sound Modding Resources
Sound.lvl modding can be difficult in SWBF1, mostly because of the lack of documentation and resources available to modders. Fear not however, this tutorial is specifically designed to make sound munging as easy for you to understand as possible. I will try to cover as much ground as I can, however I am still learning more about sound modding, and will continue to add to this thread as I figure out more about it.

There are a few resources you will want to have to begin. First is the sound config assets included in BFBuilder. They contain most of the reqs, snd, stm, and other files you will need to learn how sound configuration files are structured. There is also a premunged soundconfig available on fred's website, but it's not very useful. Note that do to copyright issues, none of the stock WAV files are available in BFBuilder, although some modders have been able to extract or re-record them through other methods.

You will also need an audio editor to convert and reformat audio files. I use audacity which is freeware and can be downloaded here:
http://audacity.sourceforge.net/download/
Audacity may also require you to download lame_enc.dll in order to import mp3 files you can find this on google.

I think these are updated batch files for BF2 sound munging, not sure if they work in BF1 or not.
https://sites.google.com/site/swbf2modtoolsdocumentation/ZeroFiledump/soundmungefixes.zip

Psych0fred wrote five different sound text tutorials which I suggest you start reading after this. I will try to consolidate and explain the information contained in them for this tutorial.

Here are some links worth reading.
Quote
Fred's 5 sound tutorials:
http://secretsociety.com/forum/downloads/Sound%20Engine%20Guide.txt
http://secretsociety.com/forum/downloads/SoundDoc%20-%20Music.txt
http://secretsociety.com/forum/downloads/SoundDoc-YA.txt
http://secretsociety.com/forum/downloads/soundhooks.txt
http://secretsociety.com/forum/downloads/soundreadme.txt

Maveritchell's ambient music tutorial
http://www.gametoast.com/forums/viewtopic.php?f=27&t=12236

Stock BF1 sound extracting discussion
http://gametoast.com/forums/viewtopic.php?f=64&t=28297

GGCTuk's custom audio tutorial
http://www.gametoast.com/forums/viewtopic.php?f=1&t=17164

Marth8880's sound research FAQ
http://www.gametoast.com/forums/viewtopic.php?f=27&t=28101

I am also working on three different sound.lvl builders currently. They will be available for download when the LVL Toolbox V5 (http://www.swbfgamers.com/index.php?topic=5680.0) is released. One will be for music and region soundstreams, another for voiceovers, and another for in game sound effects. I am about 25% finished with them atm.

II. Sound Munging

*Currently I can only get sound to munge on 32-bit PC. I am working on a solution for 64-bit sound munging and will post any updates here. See this thread (http://www.swbfgamers.com/index.php?topic=5753.0) for more info.

When you munge a sound LVL, it takes the configuration files and converts them to a different format, listed below. It also combines the WAV files with the STM (or ST4) to create the STR file. 

munged => source
lvl => req file names
bnk => sfx, ffx, and asfx files
config => snd, mus and tsr files
str => stm and st4 files


All of the above listed configuration source files are edited using notepad so I recommend setting file association to open them.

REQ/SND
All sound.lvls need at least one req and one SND file to define the sound properties. The REQ(s) basically specifies which files are going to be munged into the LVL (except the WAVs which the STM specifies). The SND is used for every type of sound: streams, VOs, and effects. SND files are by far the most advanced, complex sound files you will mod, and I recommend reading psych0fred's tutorials for more in-depth information about SND configuration, as most of the settings I do not fully understand yet.

FFX/SFX/ASFX
SFX and ASFX are used for in-game ODF sound effects, which are stored in a "bnk" file that can be called upon directly or munged into a sound LVL. FFX is used for sounds called by FX files stored in the common.lvl. Their structure is much like the STM files as their main purpose is to index WAV files (and assign ID tags to them if you choose to here).

MUS/TSR
The MUS file is used for in-game streaming music/ambience for the entire map, and you can specify different streams for each faction in the mission LUA if you want. TSR files are used for sound regions - as defined in zeroeditor by sound spheres - in specific worlds, and are streamed globally for all factions (example cantina bar music).

STM/ST4
STM files are used to index the majority of streams in game, ST4 is used rarely for defining quadruple channel output bus audio files. The STM file specifies which WAV files to munge (including their sub-directory pathing, which by default is 'streams' or 'effects'), and can also apply the ID tag to be called on via the LUA (the SND can also apply this using "segments", more on that later).

WAV
WAV files must also be formatted a certain way depending on what you are going to use them for. The sample rate is always 16bit no matter what, the other values are noted below:

VO Wav Format - 22khz, 16 bit, mono
Music Wav Format 44khz or 48khz, 16 bit, stereo
Sound Effects Wav Format - 44khz, 16 bit, mono


I have not tested compressed WAV files yet but I will soon. Also I have discovered if you call upon a WAV file not present in the streams or effects folder through the STM, the sound.lvl will not munge

Quote from: psych0fred
SND = Sound config file define sound properties referenced by luas, ODFs and particle effects
FFX = Foley effects config file used for connecting events in code to sound properties
SFX = Sound effects files list the paths to sound samples which are munged into a given sound bank
ASFX = Additional sound effects files, same as sfx but added for mods to supplement existing banks on PC*
MUS = Music config files define additional properties for triggering music sound streams
TSR = Sound trigger region config files define properties for triggering sounds in sound regions
STM = Stream files list the paths to stream files
ST4 = Stream files list paths to pairs of quadraphphonic stream files
WAV = Binary wav files are differing formats for VO streams, Music streams, and sound effects


III. Building custom music and sound region streams:
Under construction should have this section updated soon.

IV. Building custom voiceover streams:
Under construction
note: shell_interface.lua calls on the LVL then the STR.

V. Building custom in game sound effects:
Under construction

VI. FAQ

1. Can mp3s be used?
- Not directly, but you can easily convert mp3s or any other audio format to WAV files. If you can, try to use the highest quality mp3 you have, for example CBR320 or VBR0 instead of CBR128, or it will create an inflated bitrate that sounds inferior to lossless sound. FLAC works great because it is compressed lossless format. The sound munger applies some compression but I'm not sure how it affects the bitrate once munged.

2. How do I add a pre-compiled music sound.lvl to my mod map?
- You have to edit the mission LUA to call on it. There are 3 parts of code you must add. First is the ReadDataFile, then OpenAudioStream, and then the SetAmbientMusic, which calls on the ID tags of the wav files specified by either the SND or STR. If you don't know the names of the stream IDs you can look in the munged mission.lvl for the mod they are used in.

Example:

To be continued

Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Unit 33 on December 19, 2012, 11:01:09 PM
Thanks a lot for this Phobos!
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: RepComm on September 20, 2013, 08:29:09 PM
I do not mean to poke or prod in any way what so ever, but is this still being worked on at all?
- I seem to be figuring it out by myself, but it would definitely help if this was complete  :shrug:
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Phobos on September 20, 2013, 08:31:19 PM
Quote from: -RepublicCommando- on September 20, 2013, 08:29:09 PM
I do not mean to poke or prod in any way what so ever, but is this still being worked on at all?
- I seem to be figuring it out by myself, but it would definitely help if this was complete  :shrug:
I am working on other modding projects atm, but if you need help with anything in particular i might be able to expand the tutorial a bit.
- When trying to add custom weapon sounds for snake's mod I ran into a bug that wouldn't munge the sound lvl.
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: {PLA} Van STING on September 20, 2013, 11:57:24 PM
http://www.native-instruments.com/en/products/komplete/bundles/komplete-players/

free synthesizer program, can be used for music or sound effects. I think you will need a DAW for running reaktor through guitar rig 5, for a wider range of sounds.  I have the full version which I use for music. My brother is making a game and he needed a sound for one of his weapons, so I used Reaktor 5 and made a sound for his laser gun thing. 
I'm pretty sure all of these free VST's in the link bellow need a DAW to run (synthesizers and effects)
http://www.musicradar.com/us/tuition/tech/the-27-best-free-vst-plug-ins-in-the-world-today-277953

Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: tirpider on September 21, 2013, 01:38:12 AM
Doesn't Audacity (free) have a built in VST host?

-edit...
nevermind.. I read "Native Instruments" and $ started going through my head. Didn't read the free part.

Very cool find. I may tinker with it if I ever get my new PC.
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Ginev on September 21, 2013, 02:10:24 AM
Personally for me i dont need this tut cuz i found all this things myself and know how to add almost every type of sound but i have only one question.Can i have guns sounds that are stereo?Because stereo type i think is better than mono.
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Phobos on September 21, 2013, 02:58:24 AM
Quote from: Ginev on September 21, 2013, 02:10:24 AM
Personally for me i dont need this tut cuz i found all this things myself and know how to add almost every type of sound but i have only one question.Can i have guns sounds that are stereo?Because stereo type i think is better than mono.
good for you but some modders do need tutorials to figure things out
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Ginev on September 21, 2013, 04:05:58 AM
Yes yes.Actually i will read everything just in case i don't know something :D
About the question i post i hope someone have answer.Ohh and one more think.The only sounds that don't know how to add are footsteps.
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Phobos on September 21, 2013, 04:36:31 AM
i cant get weapon sound effects to munge in stereo either
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: RepComm on September 21, 2013, 05:54:06 AM
Quote from: Phobos on September 21, 2013, 04:36:31 AM
i cant get weapon sound effects to munge in stereo either
Seeing as the weapon and misc other effects always stream from one specific point (an objects x, y and z) it would be strange to have a left and right effect variable setup.. How on earth would that be configured under the hood? :P I know from other small engines, that stereo doesn't really add much effect when using something thats practically mono in the first place, its more just the quality of your sound that matters.
Its kind of annoying when you accidently convert it a tad bit wrong, and never end up knowing what is the problem is.
----
But enough of my rambling, I have a program I always use and it's freeware as well:
http://www.nch.com.au/wavepad/index.html
As fate would have it, I cannot find a version on their site that has all the features it used to..(without paying for it, atleast)
I still have a setup.exe for it, and a stand-alone .exe that runs just fine under Vista and my Windows7 PC.
I might consider uploading it, if anyone cares. Its a brilliant program.
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Led on September 21, 2013, 07:15:59 AM
Quote from: -RepublicCommando- on September 21, 2013, 05:54:06 AM

----
But enough of my rambling, I have a program I always use and it's freeware as well:
http://www.nch.com.au/wavepad/index.html
As fate would have it, I cannot find a version on their site that has all the features it used to..(without paying for it, atleast)
I still have a setup.exe for it, and a stand-alone .exe that runs just fine under Vista and my Windows7 PC.
I might consider uploading it, if anyone cares. Its a brilliant program.

Try here:
http://www.oldversion.com/windows/wavepad/

Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: {PLA} Van STING on September 21, 2013, 11:12:18 AM
Looks like Audacity has VST host for effects but not instruments.
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: RepComm on September 21, 2013, 11:16:40 AM
Quote from: Buckler on September 21, 2013, 07:15:59 AM
Try here:
http://www.oldversion.com/windows/wavepad/
Led you're a wonder!
I just happened to accidentally (well, not really but..) delete all the contents of my flash drive, which included WavePad. And yes yes, I know. "Google is your best friend." :)
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Joseph on September 21, 2013, 11:26:42 AM
Quote from: vansting on September 21, 2013, 11:12:18 AM
Looks like Audacity has VST host for effects but not instruments.
It's a pain trying to use VST in editors like a'udacity and goldwave anyway. They're made for DAWs
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Dark_Phantom on March 26, 2014, 03:09:59 PM
So, I have gotten this to partially munge on 64-bit, but I don't know if this is the same problem other 64-bit users have or not.

My lvl gets mostly munged and then... WHAM! 
Code (txt) Select

soundflmunge.exe : Error : At least 1 value(s) must be specified for switch -banklistinput  - while munging

This happens whenever the .stm file is munging. (the file that defines the streams).  The command prompt itself says that it cannot find the path specified.  So basically I have a sound.lvl without the streams.
Suggestions?  Comments?  Find a 32 bit OS to munge on?
I'm going to keep messing with this until it munges...

Also, I notice that nothing has the common.bnk file in it.  Is this necessary?
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: RepComm on March 26, 2014, 03:35:25 PM
What I'm saying here isn't solid completely, but it's my best guess.

The full munge isn't really the problem I don't think, but I seriously doubt it's actually munging the sounds (maybe the sound reqs, but not the actual sound).

I think the only thing you're getting munged is the REQs (practically everything except the *.wav files are technically just reqs or references, and function the same as the *.req file, just referencing to something and labelling it, then munge takes that info and outputs an lvl to match), so even though they are munging, the sound isn't, and therefor making the lvl, but only with some reference labels and no actual sound data.
-- Hopefully that can put someone on the right track.. Or at least an idea of how to find the right track.

I think the bik file is just another form of the sound(i've heard folks have extracted all the sounds from it with ease, but it's distorted), I have doubt that the game actually reads it at all..

Again, most of what I'm saying is probably shaky info, I'm not exactly a sound expert :P
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: 1ИCΘ6И17Θ on December 17, 2016, 08:27:33 AM
Shock... many links in the first page seems to not longer exist and the tutorial isn't fully completed yet, perhaps someone knows a more up to date version ? Adding music and modding sounds would be a crucial step into making my mod.
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Phobos on December 19, 2016, 03:30:49 PM
Quote from: Incognito on December 17, 2016, 08:27:33 AM
Shock... many links in the first page seems to not longer exist and the tutorial isn't fully completed yet, perhaps someone knows a more up to date version ? Adding music and modding sounds would be a crucial step into making my mod.
I'm not sure what the current gametoast links are for those threads or if they still exist.

The ultimate tutorial will be updated later once I rebuild the sound lvl for TWD mod. For now I recommend using psych0fred's documentation along with ginev's guide http://www.swbfgamers.com/index.php?topic=9395.0

The sound builder included in toolbox v4 has a tutorial included for adding music streams http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=525
[spoiler]
QuoteSWBF Sound.LVL Builder 1.2
Released October 5 2010
Created by Phobos Developer and Phazon Elite (Thanks to RLCT.Fang for bugtesting)

This builder is for adding background music to custom maps for SWBF1. It is set up to add 5 songs that randomly shuffle in your world, although it's possible to add more than one song to each WAV. The current version only works for GCW era, although if you are savvy enough you can edit the files yourself for different eras. The default map name is phobos because that is what I set it up for. It is ok to leave it this way because it will not affect your map, but feel free to edit all of the files (config and batch) if you want to. Note that when you switch factions it will go to a different song.

Make sure that you extract this folder directly into your C:\ folder, because the directory structure cannot have any spaces or it will not munge properly. Also,any map with the LUA configured as outlined in this readme will be compatible with your munged Phobos.lvl sound file.

Known Bugs: Sometimes only plays part of the first song then either restarts or skips.

1. You have to convert your Mp3 files to WAV (I use audacity) with exactly "48 khz sample rate" and "16 bit sample format".
2. Export the files as 01.wav, 02.wav, 03.wav, 04.wav, and 05.wav
3. Move the WAV files into the streams folder.

---Editing The LUA---
4. Add this:
ReadDataFile("dc:sound\\phobos.lvl;phobosgcw");
Above this:
ReadDataFile("sound\\tat.lvl;tat1gcw");

5. Replace your entire "OpenAudioStream" section with this:
OpenAudioStream("dc:sound\\Phobos.lvl", "phobosgcw_music");
OpenAudioStream("dc:sound\\Phobos.lvl", "Phobos");
--OpenAudioStream("sound\\tat.lvl","tatgcw_music");
--OpenAudioStream("sound\\tat.lvl","tat1");
--OpenAudioStream("sound\\tat.lvl","tat1");
--OpenAudioStream("sound\\gcw.lvl","gcw_vo");
OpenAudioStream("sound\\gcw.lvl","gcw_tac_vo");
--OpenAudioStream("sound\\tat.lvl","tat1_emt");

6. Add this:
SetAmbientMusic(ALL,1.0,"all_phobos_amb_start",0,1);
SetAmbientMusic(ALL,0.99,"all_phobos_amb_middle",1,1);
SetAmbientMusic(ALL,0.99,"all_phobos_amb_middl2",2,1);
SetAmbientMusic(ALL,0.99,"all_phobos_amb_middl3",3,1);
SetAmbientMusic(ALL,0.1,"all_phobos_amb_end",4,1);

SetAmbientMusic(IMP,1.0,"all_phobos_amb_start",0,1);
SetAmbientMusic(IMP,0.99,"all_phobos_amb_middle",1,1);
SetAmbientMusic(IMP,0.99,"all_phobos_amb_middl2",2,1);
SetAmbientMusic(IMP,0.99,"all_phobos_amb_middl3",3,1);
SetAmbientMusic(IMP,0.1,"all_phobos_amb_end",4,1);
Below this:
SetOutOfBoundsVoiceOver(2,"Allleaving");
SetOutOfBoundsVoiceOver(1,"Impleaving");

7. Delete the following section:
SetAmbientMusic(ALL,1.0,"all_tat_amb_start",0,1);
SetAmbientMusic(ALL,0.99,"all_tat_amb_middle",1,1);
SetAmbientMusic(ALL,0.1,"all_tat_amb_end",2,1);
SetAmbientMusic(IMP,1.0,"imp_tat_amb_start",0,1);
SetAmbientMusic(IMP,0.99,"imp_tat_amb_middle",1,1);
SetAmbientMusic(IMP,0.1,"imp_tat_amb_end",2,1);

---Now you're done with the LUA so save.---

8. Click munge for phobos.lvl in _lvl_pc.
9. Munge your map
10. Copy the phobos.lvl into your sound folder for custom map.
[/spoiler]

also you can examine sereja's map assets which usually include a custom sound builder.
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: 1ИCΘ6И17Θ on December 22, 2016, 12:42:45 AM
Awesome, thanks a lot.  :cheers:
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Giftheck on December 29, 2016, 02:38:29 AM
Any chance I could get some help building new shell music streams? So far, with help using the shell.lvl builder, I've managed to load a new music file but the issue here is that when I start the game I only get the first audio track defined in my

Either I'm doing something wrong with my scripting or the config file is not working.
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Phobos on January 16, 2017, 07:36:24 AM
Quote from: Gistech on December 29, 2016, 02:38:29 AM
Any chance I could get some help building new shell music streams? So far, with help using the shell.lvl builder, I've managed to load a new music file but the issue here is that when I start the game I only get the first audio track defined in my

Either I'm doing something wrong with my scripting or the config file is not working.
Did you rebuild the shell.lvl in the SHELL\ENG folder or in the SOUND folder? If you can post your audio configs I'll take a look at them.

I modified the batch file for 64-bit munging like this
@echo off
@set path=Ext; C:\BattlefrontMods\DataPhobos=%Path%
echo \_build_pc
echo \_lvl_pc
echo start munging
pause
@set path=%Root-Path%Path%submunge
munge.bat

I haven't replaced the stock game music, though for rebuilding the shell.MVS I had to use names of stock cutscenes to add to the new campaign because the game engine ignores custom named BIKs. Also the fly through videos are hard-coded to repeat so I'm using historical campaign names.
Quote
// Historical Campaigns
..\..\_SOURCE_PC\shell\movies\bes1h01.bik
..\..\_SOURCE_PC\shell\movies\bes2h01.bik
..\..\_SOURCE_PC\shell\movies\end1h02.bik
..\..\_SOURCE_PC\shell\movies\end1h03.bik
..\..\_SOURCE_PC\shell\movies\geo1h01.bik
..\..\_SOURCE_PC\shell\movies\hot1h02.bik
..\..\_SOURCE_PC\shell\movies\kam1h01.bik
..\..\_SOURCE_PC\shell\movies\kam1h02.bik
..\..\_SOURCE_PC\shell\movies\nab1h01.bik
..\..\_SOURCE_PC\shell\movies\nab2h01.bik
..\..\_SOURCE_PC\shell\movies\tat1h01.bik
..\..\_SOURCE_PC\shell\movies\tat2h01.bik
..\..\_SOURCE_PC\shell\movies\yav1h01.bik
..\..\_SOURCE_PC\shell\movies\yav2h01.bik
..\..\_SOURCE_PC\shell\movies\kas2h01.bik
}

//// The Walking Dead Shell.MVS Seasons 1-2
// transition times used by all movies
MovieProperties()
{
    Name("transition_template");
    FadeInTime(0.0);
    FadeOutTime(0.5);
}

// TWD00
MovieProperties()
{
    Name("bes1h01");
    Inherit("transition_template");
    Movie("shell");
    SegmentList()
    {
        Segment("bes1h01", 1.0, 0);
    }
}

// TWD01
MovieProperties()
{
    Name("bes2h01");
    Inherit("transition_template");
    Movie("shell");
    SegmentList()
    {
        Segment("bes2h01", 1.0, 0);
    }
}

// TWD02
MovieProperties()
{
    Name("end1h02");
    Inherit("transition_template");
    Movie("shell");
    SegmentList()
    {
        Segment("end1h02", 1.0, 0);
    }
}

// TWD03
MovieProperties()
{
    Name("end1h03");
    Inherit("transition_template");
    Movie("shell");
    SegmentList()
    {
        Segment("end1h03", 1.0, 0);
    }
}

// TWD04
MovieProperties()
{
    Name("geo1h01");
    Inherit("transition_template");
    Movie("shell");
    SegmentList()
    {
        Segment("geo1h01", 1.0, 0);
    }
}

// TWD05
MovieProperties()
{
    Name("hot1h02");
    Inherit("transition_template");
    Movie("shell");
    SegmentList()
    {
        Segment("hot1h02", 1.0, 0);
    }
}

// TWD06
MovieProperties()
{
    Name("kam1h01");
    Inherit("transition_template");
    Movie("shell");
    SegmentList()
    {
        Segment("kam1h01", 1.0, 0);
    }
}

// TWD07
MovieProperties()
{
    Name("kam1h02");
    Inherit("transition_template");
    Movie("shell");
    SegmentList()
    {
        Segment("kam1h02", 1.0, 0);
    }
}
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Giftheck on January 16, 2017, 02:16:03 PM
In the sound folder. According to the file lists I've seen, that is where I'm supposed to put my shell sound files.

Here's the config:

// main shell music
SoundStreamProperties()
{
    Name("shell_soundtrack");
    Pitch(1.0);
    PitchDev(0.0);
    Gain(1.0);
    GainDev(0.0);
    ReverbGain(0.0);
    Bus("shellmusic");
    Looping(0);
    Pan(0.0);
    Mode3D(0);
    CyclePlayback(1);
    Stream("shell_music");
    SegmentList()
    {
        Segment("menu_endcredits", 0.083);
        Segment("menu_ep1_duelofthefates", 0.083);
        Segment("menu_ep2_acrossthestars", 0.083);
        Segment("menu_ep3_battleoftheheroes", 0.083);
        Segment("menu_ep4_thewar", 0.083);
        Segment("menu_ep5_clash", 0.083);
        Segment("menu_ep5_imperialmarch", 0.083);
        Segment("menu_ep6_spacebattle", 0.083);
        Segment("menu_r1_hope", 0.083);
        Segment("menu_r1_imperialtheme", 0.083);
        Segment("menu_tfu_battletheme.wav", 0.083);
        Segment("menu_tfu_maintheme", 0.083);
        //Segment("fullScalePinkNoiseStereo", 0.167);
        //Segment("fullScale1KSinWave", 0.167);
    }
}

// galactic conquest music
SoundStreamProperties()
{
    Name("shell_galacticconquest");
    Pitch(1.0);
    PitchDev(0.0);
    Gain(1.0);
    GainDev(0.0);
    ReverbGain(0.0);
    Bus("shellmusic");
    Looping(0);
    Pan(0.0);
    Mode3D(0);
    CyclePlayback(1);
    Stream("shell_music");
    SegmentList()
    {
        Segment("menu_ep2_acrossthestars", 0.167);
    }
}

// historical briefing music
SoundStreamProperties()
{
    Name("shell_droidinvasion");
    Pitch(1.0);
    PitchDev(0.0);
    Gain(1.0);
    GainDev(0.0);
    ReverbGain(0.0);
    Bus("shellmusic");
    Looping(0);
    Pan(0.0);
    Mode3D(0);
    CyclePlayback(1);
    Stream("shell_music");
    SegmentList()
    {
        Segment("campaign_cis", 0.167);
    }
}

SoundStreamProperties()
{
    Name("shell_clonewars");
    Pitch(1.0);
    PitchDev(0.0);
    Gain(1.0);
    GainDev(0.0);
    ReverbGain(0.0);
    Bus("shellmusic");
    Looping(0);
    Pan(0.0);
    Mode3D(0);
    CyclePlayback(1);
    Stream("shell_music");
    SegmentList()
    {
        Segment("campaign_rep", 0.167);
    }
}

SoundStreamProperties()
{
    Name("shell_imperialmarch");
    Pitch(1.0);
    PitchDev(0.0);
    Gain(1.0);
    GainDev(0.0);
    ReverbGain(0.0);
    Bus("shellmusic");
    Looping(0);
    Pan(0.0);
    Mode3D(0);
    CyclePlayback(1);
    Stream("shell_music");
    SegmentList()
    {
        Segment("campaign_imp", 0.167);
    }
}

SoundStreamProperties()
{
    Name("shell_clash");
    Pitch(1.0);
    PitchDev(0.0);
    Gain(1.0);
    GainDev(0.0);
    ReverbGain(0.0);
    Bus("shellmusic");
    Looping(0);
    Pan(0.0);
    Mode3D(0);
    CyclePlayback(1);
    Stream("shell_music");
    SegmentList()
    {
        Segment("campaign_all", 0.167);
    }
}


// shell transition sound effects
SoundProperties()
{
    Name("shell_transition_template");
    Pitch(1.0);
    PitchDev(0.1);
    Gain(1.0);
    GainDev(0.0);
    ReverbGain(1.0);
    Bus("shellfx");
    Looping(0);
    Mode3D(0);
}


// 1
SoundProperties()
{
    Name("shell_transition1_left");
    Inherit("shell_transition_template");
    Pitch(0.99);
    Pan(-1.0);
    SampleList()
    {
        Sample("whoosh01l", 1.0);
    }
}

SoundProperties()
{
    Name("shell_transition1_right");
    Inherit("shell_transition_template");
    Pan(1.0);
    SampleList()
    {
        Sample("whoosh01r", 1.0);
    }
}

SoundLayered()
{
    Name("shell_transition1");
    Layer("shell_transition1_left",  "shell_transition1_left", 0.0, 0.5);
    Layer("shell_transition1_right", "shell_transition1_right", 0.0, 0.5);
}

// 2
SoundProperties()
{
    Name("shell_transition2_left");
    Inherit("shell_transition_template");
    Pitch(0.99);
    Pan(-1.0);
    SampleList()
    {
        Sample("whoosh02l", 1.0);
    }
}

SoundProperties()
{
    Name("shell_transition2_right");
    Inherit("shell_transition_template");
    Pan(1.0);
    SampleList()
    {
        Sample("whoosh02r", 1.0);
    }
}

SoundLayered()
{
    Name("shell_transition2");
    Layer("shell_transition2_left",  "shell_transition2_left", 0.0, 0.5);
    Layer("shell_transition2_right", "shell_transition2_right", 0.0, 0.5);
}


// 3
SoundProperties()
{
    Name("shell_transition3_left");
    Inherit("shell_transition_template");
    Pitch(0.99);
    Pan(-1.0);
    SampleList()
    {
        Sample("whoosh03l", 1.0);
    }
}

SoundProperties()
{
    Name("shell_transition3_right");
    Inherit("shell_transition_template");
    Pan(1.0);
    SampleList()
    {
        Sample("whoosh03r", 1.0);
    }
}

SoundLayered()
{
    Name("shell_transition3");
    Layer("shell_transition3_left",  "shell_transition3_left", 0.0, 0.5);
    Layer("shell_transition3_right", "shell_transition3_right", 0.0, 0.5);
}


// 4
SoundProperties()
{
    Name("shell_transition4_left");
    Inherit("shell_transition_template");
    Pitch(0.99);
    Pan(-1.0);
    SampleList()
    {
        Sample("whoosh04l", 1.0);
    }
}

SoundProperties()
{
    Name("shell_transition4_right");
    Inherit("shell_transition_template");
    Pan(1.0);
    SampleList()
    {
        Sample("whoosh04r", 1.0);
    }
}

SoundLayered()
{
    Name("shell_transition4");
    Layer("shell_transition4_left",  "shell_transition4_left", 0.0, 0.5);
    Layer("shell_transition4_right", "shell_transition4_right", 0.0, 0.5);
}


// 5
SoundProperties()
{
    Name("shell_transition5_left");
    Inherit("shell_transition_template");
    Pitch(0.99);
    Pan(-1.0);
    SampleList()
    {
        Sample("whoosh05l", 1.0);
    }
}

SoundProperties()
{
    Name("shell_transition5_right");
    Inherit("shell_transition_template");
    Pan(1.0);
    SampleList()
    {
        Sample("whoosh05r", 1.0);
    }
}

SoundLayered()
{
    Name("shell_transition5");
    Layer("shell_transition5_left",  "shell_transition5_left", 0.0, 0.5);
    Layer("shell_transition5_right", "shell_transition5_right", 0.0, 0.5);
}


// 6
SoundProperties()
{
    Name("shell_transition6_left");
    Inherit("shell_transition_template");
    Pitch(0.99);
    Pan(-1.0);
    SampleList()
    {
        Sample("whoosh06l", 1.0);
    }
}

SoundProperties()
{
    Name("shell_transition6_right");
    Inherit("shell_transition_template");
    Pan(1.0);
    SampleList()
    {
        Sample("whoosh06r", 1.0);
    }
}

SoundLayered()
{
    Name("shell_transition6");
    Layer("shell_transition6_left",  "shell_transition6_left", 0.0, 0.5);
    Layer("shell_transition6_right", "shell_transition6_right", 0.0, 0.5);
}


// 7
SoundProperties()
{
    Name("shell_transition7_left");
    Inherit("shell_transition_template");
    Pitch(0.99);
    Pan(-1.0);
    SampleList()
    {
        Sample("whoosh07l", 1.0);
    }
}

SoundProperties()
{
    Name("shell_transition7_right");
    Inherit("shell_transition_template");
    Pan(1.0);
    SampleList()
    {
        Sample("whoosh07r", 1.0);
    }
}

SoundLayered()
{
    Name("shell_transition7");
    Layer("shell_transition7_left",  "shell_transition7_left", 0.0, 0.5);
    Layer("shell_transition7_right", "shell_transition7_right", 0.0, 0.5);
}


// 8
SoundProperties()
{
    Name("shell_transition8_left");
    Inherit("shell_transition_template");
    Pitch(0.99);
    Pan(-1.0);
    SampleList()
    {
        Sample("whoosh08l", 1.0);
    }
}

SoundProperties()
{
    Name("shell_transition8_right");
    Inherit("shell_transition_template");
    Pan(1.0);
    SampleList()
    {
        Sample("whoosh08r", 1.0);
    }
}

SoundLayered()
{
    Name("shell_transition8");
    Layer("shell_transition8_left",  "shell_transition8_left", 0.0, 0.5);
    Layer("shell_transition8_right", "shell_transition8_right", 0.0, 0.5);
}


// 9
SoundProperties()
{
    Name("shell_transition9_left");
    Inherit("shell_transition_template");
    Pitch(0.99);
    Pan(-1.0);
    SampleList()
    {
        Sample("whoosh09l", 1.0);
    }
}

SoundProperties()
{
    Name("shell_transition9_right");
    Inherit("shell_transition_template");
    Pan(1.0);
    SampleList()
    {
        Sample("whoosh09r", 1.0);
    }
}

SoundLayered()
{
    Name("shell_transition9");
    Layer("shell_transition9_left",  "shell_transition9_left", 0.0, 0.5);
    Layer("shell_transition9_right", "shell_transition9_right", 0.0, 0.5);
}


// 10
SoundProperties()
{
    Name("shell_transition10_left");
    Inherit("shell_transition_template");
    Pitch(0.99);
    Pan(-1.0);
    SampleList()
    {
        Sample("whoosh10l", 1.0);
    }
}

SoundProperties()
{
    Name("shell_transition10_right");
    Inherit("shell_transition_template");
    Pan(1.0);
    SampleList()
    {
        Sample("whoosh10r", 1.0);
    }
}

SoundLayered()
{
    Name("shell_transition10");
    Layer("shell_transition10_left",  "shell_transition10_left", 0.0, 0.5);
    Layer("shell_transition10_right", "shell_transition10_right", 0.0, 0.5);
}



It DOES munge the sound, but it seems the config isn't being included for some reason. I know this because when I try to load my custom shell.lvl sound file alongside the stock one via the shell_interface LUA, the first track on my file list will play - and that's it. If I solely load the new shell.lvl, nothing will play at all, including sound effects.
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Phobos on January 26, 2017, 04:33:41 PM
I'm not sure how much support the game engine has for custom-named sound effects added to a rebuilt stock sound\shell.lvl.

Calling on multiple shells in the shell_interface LUA probably won't work as I tried something similar once with the ifs_yoda script loading custom voiceovers in a LVL outside of the sound\shell and the game just ignored the file even though it was set up properly. That's interesting it plays the first track though.

Also if you have references in the config to WAV files that don't exist in the builder, there will be a munge error. I'd have to see the other files in your builder including the REQ to offer more advice about it, but if all else fails you might want to try adding your custom WAV tracks using the names of stock tracks. So basically "replacing" the stock sounds, like how I had to with the shell.mvs for adding new cutscenes.
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Giftheck on January 27, 2017, 11:44:18 AM
I have a feeling you can't use the SFX file. So I'm going to see if we can go in via the ASFX.
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Giftheck on January 29, 2017, 10:38:37 AM
I got it working! And it works exactly as it should (with the exception of the game not playing the briefing music when there is a video preceeding it)
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Isaac1138 on February 02, 2017, 05:20:40 PM
does the same insructions apply for BFII?
Title: Re: The Ultimate Sound Modding Tutorial [WIP]
Post by: Phobos on February 07, 2017, 08:11:17 AM
Quote from: Isaac1138 on February 02, 2017, 05:20:40 PM
does the same insructions apply for BFII?
I'm not sure what does or does not apply to BF2 for BF1, I think there is some overlap, but you can check psych0fred's website for more BF2 sound modding info
http://secretsociety.com/forum/downloads/BF2Docs/Sound/
http://secretsociety.com/forum/downloads/BF2Docs/BF2soundmungeFix.zip


Here are some other pages with more info
https://sites.google.com/site/swbf2modtoolsdocumentation/sound_engine_guide
https://sites.google.com/site/swbf2modtoolsdocumentation/sounddoc-music
https://sites.google.com/site/swbf2modtoolsdocumentation/sounddoc-ya
https://sites.google.com/site/swbf2modtoolsdocumentation/soundhooks
https://sites.google.com/site/swbf2modtoolsdocumentation/soundreadme
EhPortal 1.34 © 2024, WebDev