Sounds and music files in NWN come in a great many forms. Basic sound files can be PCM encoded WAV files (rare) or MP3 files (much more common and highly recommended to use in pretty much all cases).
They no longer need to be stored in folders and can be added to hakpacks or nwsync in EE.
This guide will use Audacity to export files, which is open source and freely available.
Types of File
The extension for these are always BMU (music) or WAV, regardless of the files type. Confusing but it is how the games resource manager loads the files, it doesn't reflect the file contents. You can use on Windows Media Player Classic to play all the game files and inspect their bitrates and types.
WAV vs MP3
The general rule is don't use WAV for any sound file. It comes with a huge file size, and with little benefit to quality.
You can use MP3 for any type of sound regardless of if the resource type being WAV or BMU. It is highly recommended since sound files can get very large, and large amounts of small files also get very large such as voicesets or sound effects.
The game uses constant bitrate not variable. See notes further below on encoding standards.
For MP3s for anything other than a music file with the BMU extension, make sure you add a header - eg; using Notepad++ - to the very start of the file (with no new line):
BMU V1.0
File Requirements
Filenames must be 16 characters or less like any other resource in the game. The basic format recommendations are for files be 41,000 or 44,000 kHz, and mono or stereo as required. Some Bioware files use a lower kHz value. The limits of what NWN:EE supports will be sorted over time (it uses OpenAL so should support a lot larger range of formats).
Type | 2da File or Usage | Extension (not format!) | Header required if MP3 | Mono/Stereo | Example File | Usual Location | Notes |
---|---|---|---|---|---|---|---|
Music File | bmu | None | Stereo or Mono (Stereo Recommended) | mus_theme_nwn.bmu mus_bat_aribeth.bmu | Hakpacks or Bifs Default music: SteamApps\Common\Neverwinter Nights\data\mus | Must be MP3 you cannot load a wav file of any kind as a music track Note to show up in the toolset the battle music must have a prefix mus_bat_
| |
Sound Set Voice file | Soundset files (.ssf) referenced in soundset.2da | wav | BMU V1.0 | Mono | vs_fvengaum_bye.wav | Hakpacks or Bifs | |
Voice File | None, referenced by name in conversation options | wav | BMU V1.0 | Mono | vs_faldom_050.wav | Hakpacks or Bifs | |
Ambient Sound | ambientsound.2da | wav | BMU V1.0 | Stereo or Mono (Stereo Recommended) | al_pl_citynite.wav | Hakpacks or Bifs Default ambient tracks: SteamApps\Common\Neverwinter Nights\data\amb | Ambient sounds are really a type of "music". For some reason some are placed in "ambient" folder, who knows why. Bioware prefixes all of theirs "al_" Most of these appear to be WAVs by default which is odd (since they're long and perfect for MP3). |
Weapon Hit Sounds | weaponsounds.2da | wav | BMU V1.0 | Mono | cb_ht_fleshleth1.wav | Hakpacks or Bifs | Sounds of weapon on armour etc. These appear to be WAVs by default but no reason they couldn't be MP3 |
Footstep Sounds | footstepsounds.2da | wav | BMU V1.0 | Mono | fs_dirt_hard1.wav | Hakpacks or Bifs | Footstep sounds. When you walk on certain terrain. These appear to be WAVs by default but no reason they couldn't be MP3 |
Sound Effect | None, prefixes however are accepted, see below for list of default ones. Can be used in PlaySound. | wav | BMU V1.0 | Mono is recommended However the toolset does load Stereo encoded WAV files, but fails to load Stereo encoded MP3 files. Odd! | al_an_chickens1.wav (WAV file) | Hakpacks or Bifs | These are short or long, and the toolset can load most of the other types in this list into a repeating/single shot/continuous, area wide/local sound effect in the toolset as a sound object (which can have a varying volume level etc.). Alternatively playing them plays it from OBJECT_SELF at a set volume. |
GUI Sound Effect | None - mostly coded into GUI files or the game as hardcoded references. May make a list sometime. | wav | BMU V1.0 | Usually mono. | gui_open.wav | Hakpacks or Bifs | There are not many of these but can be replaced. Default ones are WAVs but no reason they couldn't be MP3. |
File and Sound System Limits
Apart from the file name, some music tracks are over 10 minutes in length, so there is no apparently size limit as such (Although note NWSync has 15MB file size limit). However there may or may not be issues if a sound file plays for an exceedingly long time if not a music or ambient sound track, since it could reset or cutoff depending on how the sound system works.
Ambient and music tracks also can cut out randomly or reset and start from the beginning, most obvious if alt-tabbing the game. If you make a good music track make sure the start of it comes in nicely - else it'll be really, really repetitive. Delays between it playing again and a lower volume can help. The game has a music volume slider.
There are also obvious...limitations with NWNs ancient sound system (in EE and Diamond). The game only plays a limited amount of sounds effects, the 3d positional audio sometimes decides to rapidly cut out or rapidly increase the loudness of sounds - even, annoyingly, in cutscenes. There is little to no way to script better sounds (as in use all the pitch, volume and randomness settings available in the Sound Object the toolset has) since PlaySound is so limited and buggy, and playing a sound as part of a voiceline also has limits.
Even more of an issue, the audio files are all also rated in the same "volume slider" used by the game. Which means spells, rain, or that walking sound all have the same volume meter. "voices" played in effects also get this treatment. The camera or PC also can get very close to sound effect sources and alter the position of audio through the camera rapidly.
Working around PlaySound() limits: although PlaySound() isn't an action (you don't get the little yellow square on the screen), if you assign a PlaySound() to someone, it will wait for their current action queue to finish before playing. This can cause frequent playback misses if action queues are at issue. If you really need a sound to be played, one way to ensure it occurs is to create an empty/non-visual effect in visualeffects.2da and put your wave file in the SoundImpact column. You can then apply the effect and reliably play the associated sound via scripting using ApplyEffectToObject() and the visual effect.
A note on Ambient Effects
The game has a limited palette of ambient effects which add echos and other things. If you've got more information on these write it here.
BMU format
There isn't particularly anything special, as noted here. These are MP3 files. The extension likely stands for "Bioware Music". Renaming a MP3 to BMU works fine as long as it matches the example settings.
Just in case you missed the note above, BMU files cannot be actual WAV encoded files. However .WAV files can be BMU ones.
As noted above if you have a .WAV file but MP3 / "BMU" contents you need to have the start of the file be: BMU V1.0, eg in Notepad++:
2da Files
Information to follow, but in essence, list the file name and an appropriate TLK (or sometimes "Quoted Name") reference to see the option in the toolset, and it sort itself in game.
Music Prefixes
There are two main prefixes that Bioware used for their files.
For battle music, to show up in the toolset the prefix must be used.
It should be you can still set the track using script commands or GFF edits (since they refer to just a ID number)
Prefix | Usage | Notes |
---|---|---|
Any (bioware uses mus_) | Ambient Music | Can only be used as ambient music. Cannot be selected for battle music tracks (but to have the same effect just have no battle music track). |
mus_bat_ | Battle Music and Ambient Music | Usually has an "ending sting" but not always. Can be used as both ambient music and battle music tracks - a good use for ambient music is "final boss levels" or "battlefields" where the entire area is for battle. It keeps it continuous track going helpfully. |
Sound Effect Prefixes
These help load the right sounds - else you'll be looking through literally thousands if you select "All Resources" which is the only way the toolset can load a sound effect, say, named "sound.wav".
They are defined in rrf_wav.2da - you can edit this or just use Biowares defaults below. The shorter prefixes load everything "under" them, so "Ambient_SingleShot" loads the People, Animals etc. ones all at once.
There may be some files in the default game which don't come under these naming conventions, selecting the "Blank" category can show them all.
Sound Effect Category | Prefix Loaded in Toolset |
---|---|
Ambient_SingleShot | as_ |
as_People | as_pl_ |
as_Animals | as_an_ |
as_Nature | as_na_ |
as_Weather | as_wt_ |
as_Doors | as_dr_ |
as_Containers | as_cn_ |
as_Switches | as_sw_ |
as_Magical | as_mg_ |
as_Civilization | as_cv_ |
Ambient_Looping | al_ |
al_People | al_pl_ |
al_Animals | al_an_ |
al_Nature | al_na_ |
al_Weather | al_wt_ |
al_Doors | al_dr_ |
al_Containers | al_cn_ |
al_Switches | al_sw_ |
al_Magical | al_mg_ |
al_Civilization | al_cv_ |
Creatures | c_ |
Bodyfalls | bf_ |
Combat | cb_ |
GUI | gui_ |
Footsteps | fs_ |
Item | it_ |
Spell | s |
Spell_Cast | sca_ |
Spell_Cessation | sce_ |
Spell_Conjure | sco_ |
Spell_Projectile | spr_ |
Spell_Persistent_Static | sps_ |
Spell_Persistent_Mobile | spm_ |
Spell_Duration | sdr_ |
Spell_Fire_and_Forget | sff_ |
Spell_Personal_Impact | sim_ |
VoiceSet | vs_ |
VoiceSet_Partial_NPC | vs_n |
VoiceSet_Partial_Hench | vs_h |
VoiceSet_Full | vs_f |
Horror | as_hr |
Encoding WAVs
The WAV settings are pretty simple. Using Audacity, an export of a file as a mono/stereo file with WAV (Microsoft). There are not any real options to export it, and an example is below:
Bioware WAVs are reasonably rare - an example one encoded: adpcm_ima_wav, 44100 Hz, 1 channels, s16, 177 kb/s while another is adpcm_ima_wav, 22050 Hz, 1 channels, s16, 88 kb/s.
There should be no need to encode any special headers, there are various WAV types - but seriously - why would you use this over a well encoded MP3 file anyway? Please don't use WAV files nowadays.
The one I encoded as a working test: pcm_s16le, 44100 Hz, 1 channels, s16, 705 kb/s
Audio Format : PCM Format settings : Little / Signed Codec ID : 1 Duration : 2 s 749 ms Bit rate mode : Constant Bit rate : 705.6 kb/s Channel(s) : 1 channel Sampling rate : 44.1 kHz Bit depth : 16 bits Stream size : 237 KiB (100%)
Encoding MP3s
MP3s are generally more sensible since it saves a lot of space. It appears NWN likes constant bitrates of 128kbps or lower. Some of the original game ones are for instance 96kbps. It is recommended in modern times to just use 128kbps.
You can use higher bitrates - but make sure you test the files in game.
You shouldn't use variable or average bitrate, the game won't like that.
Remember to add BMU V1.0 at the start of the file for the game and toolset to load them unless they are using the .BMU extension (where this info is assumed), eg; using Notepad++ - to the very start of the file (with no new line):
BMU V1.0
Stereo MP3
These are for music and ambient tracks only it seems. Mono is needed for usual sound and voice files (the game does positional audio for where it will come from).
These are the settings used in Audacity:
This produces this kind of MP3:
44100 Hz, stereo, 128 kb/s Format : MPEG Audio File size : 44.1 KiB Duration : 2 s 795 ms Overall bit rate mode : Constant Overall bit rate : 128 kb/s Writing library : LAME3.100 FileExtension_Invalid : m1a mpa1 mp1 m2a mpa2 mp2 mp3 Audio Format : MPEG Audio Format version : Version 1 Format profile : Layer 3 Duration : 2 s 795 ms Bit rate mode : Constant Bit rate : 128 kb/s Channel(s) : 2 channels Sampling rate : 44.1 kHz Frame rate : 38.281 FPS (1152 SPF) Compression mode : Lossy Stream size : 43.7 KiB (99%) Writing library : LAME3.100 Encoding settings : -m s -V 4 -q 3 -lowpass 17 -b 128
Mono MP3
This is likely the most used filetype for sound effects. It should work in all cases WAV works, but this author hasn't tested every single sound playing instance (eg; footsteps, or weapon sounds). If it is a case that WAV is needed in any particular place in the game update this with a warning and list of cases.
It is recommended to pre-mix down to mono before exporting.
But in any case select the Force export to mono to be sure:
This produces this kind of MP3:
44100 Hz, mono, 128 kb/s Format : MPEG Audio File size : 44.1 KiB Duration : 2 s 795 ms Overall bit rate mode : Constant Overall bit rate : 128 kb/s Writing library : LAME3.100 FileExtension_Invalid : m1a mpa1 mp1 m2a mpa2 mp2 mp3 Audio Format : MPEG Audio Format version : Version 1 Format profile : Layer 3 Duration : 2 s 795 ms Bit rate mode : Constant Bit rate : 128 kb/s Channel(s) : 1 channel Sampling rate : 44.1 kHz Frame rate : 38.281 FPS (1152 SPF) Compression mode : Lossy Stream size : 43.7 KiB (99%) Writing library : LAME3.100 Encoding settings : -m m -V 4 -q 3 -lowpass 20.5 -b 128