Importing Custom Sounds
From FleshWorks
by GlasWolf
First of all, this is a fairly simple way of importing custom sounds but it does NOT work for sounds used within conversations or sounds used as zone streaming ambients (see here for a discussion on those). You should be OK for pretty much everything else.
The first thing you need is your sound (duh!). T3 can read .wav and .ogg files, so something like 22050Hz 16-bit mono encoding should work and give a decent size to quality ratio. Obviously .ogg files are much smaller and easier to distribute with your mission. Name it something unique and descriptive, like GlasBellRing. Once you have that ready, open T3Ed and click on the View menu -> Show Schema Browser. That takes ages to load, so leave it and browse to the CONTENT\T3\Sounds\schemas_sfx directory in your T3Ed installation directory. Create a folder in there, call it CustomSounds or whatever and copy your file into there.
Right go back into T3Ed and hopefully the schema browser will be just about ready. You'll see that the organisation of the SoundSchemas tree reflects the folder structure, so we'll keep it that way. Expand the Sounds folder, then right-click on the schemas_sfx one and choose Add new folder under this folder. Call it CustomSounds or whatever you chose before. Once you can see it in the tree, right-click on it and this time choose Add new schema to this folder. Enter the sound file name (GlasBellRing) without the extension in the box and click ok. You don't have to use the same name, but again it keeps everything organised.
Now we have to associate your sound file with the schema. Make sure the new schema is selected in the browser, then look for the section marked WAV file on the right hand side. It says there's currently none, so click on the Change button and browse to your sound file, then click OK. Once that's in place, press the Play button to make sure you can hear it.
Finally, change the dropdown box marked Metafile Storage to Memory. This ensures that when it comes to distributing our level we only have to include the small SchemaMetafile_Memory.csc instead of the huge ones containing all the game's other sounds. Then Save All and Exit. Don't worry, the schema browser will load up instantly from now until you close the editor.
And that's it! You can now access the sound in several ways using the file/schema name you gave it (GlasBellRing) - try using PlayBarkPoints (which only seem to work occasionally) or setting the Sounds -> SoundAmbient property on something. You can also trigger it via scripts in several ways - see the scripting actions list in the script browser.
A small note from Judith:
You can use higher .ogg quality settings, like 44,1kHZ and variable bitrate too. If you want to have a "placeable" sound, however, e.g. in AmbientSound marker or an object, it must be converted to mono. If you need your sound only to be played through a script in 2D, you can leave it in stereo.
Custom Sounds Tutorial forum thread
Back to Mission Design: Sound Tutorials Page
