Tomb Raider Forums

Tomb Raider Forums (https://www.tombraiderforums.com/index.php)
-   Tutorials and Resources (https://www.tombraiderforums.com/forumdisplay.php?f=28)
-   -   Sound issues (https://www.tombraiderforums.com/showthread.php?t=79194)

Titak 24-11-06 14:46

Sound issues
 
[SIZE="4"][COLOR="DarkSlateBlue"][CENTER][b]Audio[/b][/CENTER][/COLOR][/SIZE]

The LE uses two different sound types: [i]Audio[/i] and [i]sound effects[/i] .

[b]Audio[/b]
The audio files are located in the [i]TRLE/Audio[/i] folder and they are in [i]*.wav[/i] format.
The audio files are basically background music, like background ambience, thrill music, mysterious music and offcourse the well known secret tune.

The files are numbered 000 to 111. You can replace existing files with new ones or you can add files. TRLE only came with a couple of audiotracks, but the LE won't accept files with numbers higher than 111!
It simply won't recognise any numbers higher than 111.wav and the audio won't be played ingame even when it is triggered correctly in your project.

[b]WAV Format:[/b]
[i]Microsoft ADPCM
44100 kHz
4 Bit
Stereo[/i]

[b]Activation:[/b]
The audio files need to be activated with a trigger.

[img]http://titak.tombraiderhub.com/Tutorials/audiotrigger.jpg[/img]

Open the trigger type window and choose CD in the trigger box.
Put in the number of the audio file you want to be triggered in the box next to it.

Audio files can only be played once in a level.
Exceptions are 005.wav (secret tune) and the background audio loops.

Unless... you change the codebits of the trigger. You can trigger an audio track to play up to six times when you adjust the codebits of the first trigger for that particular audio track. The below images shows you how to set the codebits. The image is taken from the manual.

[img]http://titak.tombraiderhub.com/Tutorials/audiocodebits.jpg[/img]

The numbers in the top row indicate how many times the track can be triggered.
For example: If you want to play the track [i]3 times[/i] during the level you will only need to click [i]codebit 2[/i] . (It turns black when clicked)


[B]Note 1: [/B]
The above information applies to the original TRLE.
When you are using TRNG, you can trigger audio as many times as you want through flipeffect triggers. TRNG also allows for different audio formats, like all WAV formats and MP3 and OGG.
TRNG also allows for playing two different tracks at the same time, one on channel1 and one on channel2.

[B]Note 2: [/B]
[QUOTE=Lwmte;7801122]I think there's general misunderstanding how trigger mask buttons (1-2-3-4-5) work with CD triggers. Manual is also completely wrong describing this feature. It is properly described in TRS3 document (look for [I]4.6.9. TrigAction 0x08 — Play Soundtrack[/I] chapter).

Simply said, you have to toggle either 1 or 2 or 3 or 4 or 5 trigger mask button to play same track once again, but it will only work if you use it on different triggers. E.g., you can play same track in two different parts of your level using different CD triggers with trigger mask 1 and trigger mask 2, but you can't force playing same track twice on same trigger, say, placing both CD triggers with mask 1 and 2 on the same sector. As long as track was triggered for that particular mask, it won't play again.

Also you can use one shot flag as extra play count, because for CD trigger, engine treats one-shot flag as extra trigger mask, so overall you can play the track 6 times in your level, using 6 different CD trigger setups.[/QUOTE]

[B]Note 3: [/B]
[QUOTE=AkyV] [B]Playing audio tracks[/B]


The old (TRLE) way to play an audio track is if you activate a trigger with CD subject type.
But I recommend using the new, TRNG method to play audio tracks, because the new method has some splendid features that CD triggers are unable to use.

Theoretically, you could use the old and the new methods collaterally with each other, if you want.
Due to some interactions between the two methods, I don’t recommend it, so choose only CD triggers or only the new method.

[COLOR=Red]The differences between the old and the new methods:[/COLOR]

a, The old method uses CD triggers (to play the track whose ID is typed in Window Object).
The new method uses F68 for channel1 or F129 for channel2 (to play the track whose ID chosen in Window Timer).

b, The old method plays only WAV files.
The new method is able to play other formats as well. (Probably they are only AIFF, MP1, MP2, MP3, OGG.)

c, The old method always, automatically plays the background (loop) audio on audio channel1 and the foreground (single) audio on audio channel2.
The new method is able to play the background track or the foreground track on any channel.

[COLOR=green]Usually the new method also plays the background audio on audio channel1 and the foreground audio on audio channel2, but it is not necessary, you can choose the required channel. – In fact, now you can use the two channels even to play two loop or two single tracks at the same time.[/COLOR]

d, The old method plays a track only once, even without One Shot button pressed.

- TRLE manual says CD triggers will play tracks 2-6 times if you switch on/off some STT number buttons. However, it doesn’t work in TRNG. [I](Edit: this thing had been cleared up just before.)[/I]
- Be careful, if you want to change the loop (background) track with a CD trigger in TRNG. Because, if you have activated at least another CD trigger in the level, for a foreground track, then, after that, the background CD will work only if you save the game and then load that savegame.

The new method is able to play a track any times.

e, The old method plays the tracks of audio folder from ID0 to ID127.
The new method plays the tracks of audio folder from ID0 to ID255.

f, The old method plays these tracks automatically as foreground tracks: ID0-ID101, ID103-104, ID112-ID127, and these tracks automatically as background tracks: ID102, ID105-ID111.
With the new method, you are able to choose if the given track will be played as a foreground or a background track, using any ID from ID0 to ID255.

So the first background track in the Data Script commands could also have any ID, as opposed to TRLE.

g, CD triggers cannot be exported into the Script/WADMerger. FLIPEFFECT triggers can. (That’s why eg. you can use a timer for the audio track of the FLIPEFFECT, using that FLIPEFFECT in the Script, with an Organizer, to start the track only after given seconds elapsed after the start of the Organizer.)

h, The CD txt file in wads folder contains tracks only which are played by CD triggers, i.e. not including the tracks of the new method.

[COLOR=Red]New features which are useable both with the old and the new method:[/COLOR]

a, As you see above, both methods have two audio channels.

b, F69 will stop all the tracks immediately. F130 will do that only on the required channel.

c, F133 will adjust the volume of the track which is just playing or just starts playing. (Not bothering the general audio volume value in the Options menu of the game.)

[COLOR=green]See SoundSettings Script command for a preset of general audio volume.[/COLOR]
[COLOR=green]This is the same you could adjust in the Options menu of the game.[/COLOR]

d, The track interrupted won’t stop at once, it has a fade-out, which can be customized, using a Customize= CUST_NEW_SOUND_ENGINE Script command.

e, The audio tracks in TRLE won’t continue if you saved the game when the audio was playing and then you load that savegame. Now you can customize that, using a Customize=CUST_CD_SINGLE_PLAYBACK Script command. (The default value in TRNG is: to continue the track where it was interrupted.)

[COLOR=Red]If you feel nostalgia for TRLE, so you’d like to use CD triggers exactly as in TRLE, i.e. without the new features of them - then these are your possibilities:[/COLOR]

a, Adjust all the fade-out values with Customize= CUST_NEW_SOUND_ENGINE to 0, to remove fade-outs.

b, Use CDM_NO_SAVE in Customize=CUST_CD_SINGLE_PLAYBACK, not to continue the tracks which were interrupted, when you load the savegame.

c, Don’t place audio tracks over ID111 in audio folder, or don’t start them with CD triggers (because the biggest track ID with TRLE was 111).

d, Use a Customize= CUST_SET_OLD_CD_TRIGGER, ENABLED Script command. – The results:

- You can’t adjust the volume of tracks started by a CD trigger, using F133.
- ID0 audio track will start automatically (as a loop), if Lara dies, or maybe if you try to use some new audio triggers (eg. F133). (It is considered as a bug.)
- The CD triggers will use only one audio channel: the background track will be interrupted temporarily on that channel if you play a foreground track there. When the foreground track stops the background track will restart.

[COLOR=green]Maybe you want to use the new method, but in the good old “the background track will be interrupted temporarily on the channel if you play a foreground track there” way. In that case use F193 to play the single track (instead of F68 or F129), on any channel. - But this time the interrupted track will be restored where it has been stopped.[/COLOR]
[COLOR=green](In fact, this trigger can be used even to interrupt a foreground track with another foreground track, if both tracks just being played are single, not loop.)[/COLOR]
[COLOR=green]Now you don’t need CUST_SET_OLD_CD_TRIGGER, ENABLED.[/COLOR]

- You can use F69 or (adjusting channel1) F130 to abort a track started by a CD trigger, but only if it stops a foreground audio on the one and only audio channel. (I.e. in the case of the background audio, they will start the track, from the beginning.)

[I]I don’t recommend disabling the new method with NewSoundEngine= DISABLED Script command, if you want to use “a really classic audio system” with CD triggers.
I mean, NewSoundEngine= DISABLED causes the audio system will be more or less buggy.
Nowadays I see only one reason to disable NewSoundEngine: when you want to use the “Angkor type” cutscenes with Von Croy – because that cutscene feature works only if the new method is disabled. (“Angkor type” cutscenes are which you could see in the first level of The Last Revelation, where black stripes showed up at the bottom and the upper edges of the screen while you could hear Von Croy’s advices for the young Lara.) I.e. if the new method is enabled then you will be able to move Von Croy in the level, and make him do other things as well – but you will not be able to play “Angkor type” cutscenes with him.
However, there is a better way for the “Angkor type” cutscenes, without disabling the new method: you can simulate them as demo type cutscenes.[/I]

[COLOR=green]Some Script commands are also able to control single or loop audio tracks. See eg. Image or Diary commands.[/COLOR]
[/QUOTE]

[B]Note 4:[/B]
[QUOTE=AkyV] [B]Imported audio tracks[/B]

There is a special method to play audio tracks: in an imported way.
Each audio track you want to import (into Script.dat) must be placed anywhere in Level Editor main folder. The type must be AIFF, MP1, MP2, MP3, OGG or WAV, the name could be anything.
You need to type an ImportFile command (also using an IMPORT_MEMORY constant in it) for each audio track that will be imported, in the [Options] part of the Script. Each ImportFile command will contain the data about that track, including the ID and the name.

As opposed to the “usual” audio tracks, the ID and the name is different in the case of imported tracks – because the name is not equivalent with the ID.
Besides, the ID’s of ImportFile commands and the “usual” audio track ID’s are not the same.

After building the Script, the audio track is imported into Scipt.dat. It means you can remove the track from the Level Editor main folder, you don’t need it any more, the game will play the imported audio tracks directly from Script.dat.

- This Script.dat must be the final Script.dat of your game or else you will have a problem if you build the Script again. (The problem is you will get an error message about that audio track is missing in Level Editor main folder.)
- The aggregated size of the files like that can’t be bigger than about 20 MByte.

And why is it worth playing audio tracks from the Script.dat? – Because:

a, Usually if you play an audio track that will perhaps start with a bit slip – mostly if you start it from a compact disk, not from a HDD. It won’t happen ever with imported audio.

b, You don’t need to share that audio track via Level Editor audio subfolder with other people, when you release your game.

c, The new audio method is able to use “only” maximum 256 slots in the audio folder. If that is not enough, then you can use imported audio tracks as well.

The imported audio tracks work in the game exactly the way as an audio track played by the new audio method does, except: in loop mode you must use F131 to start an audio track, in single mode you must use F132.
The triggers will use the audio ID’s you typed in the ImportFile commands.

[COLOR=green]You can play ImportFile audio files even with “normal” audio triggers, if the name of the ImportFile audio file is a number, as if it were an audio file in audio folder. (This time naturally you cannot have an audio file with that number in audio folder.)[/COLOR]

You can create maximum 199 ImportFile commands for each level, choosing ID’s for them from a 1, 2, 3,… 1998, 1999 interval. However, the biggest ImportFile ID in F131/F132 triggers is 200 – that’s why ImportFile with ID201-ID1999 can be used only:

= if the audio track of that ImportFile is played with a “normal” audio trigger, or
= it the command is used for another function of ImportFile (see more about it NG Center/Reference), so they are not useable for audios/triggers.
[/QUOTE]

Titak 24-11-06 14:47

[SIZE="4"][b][COLOR="DarkSlateBlue"][CENTER]Sound effects[/CENTER][/COLOR][/b] [/SIZE]

Sound effects are the sounds Lara makes, like her footsteps, grunts, gunfire, etc. But also all other sounds an animating object, like a trapblade, or baddies make.

These so-called soundsamples are located in the [i]TRLE/Sound/Samples[/i] folder.

[b]Format:[/b]
[i]PCM
22050 kHz
16 Bit
Mono[/i]

The game can crash if the format is wrong!

You can use [i]Windows Sound Recorder[/i] to save a sample in the right format. But I've had problems with this myself (the sample seemed to have been saved in the right format but it still wouldn't play [I]or[/I] the game crashed) and I now use [url="http://www.threechords.com/hammerhead/cool_edit_96.shtml"]Cool Edit 96[/url]. Works like a charm! [img]http://www.tombraiderforums.com/images/smilies/thumb.gif[/img]

[b]Activation:[/b]
A soundeffect is activated by assigning the sound to the wad AND the object.
When you add a new object with sound to your wad using [i]WADMerger[/i] the sound will usually automatically be added to your wad.
If this does not happen or if you have been creating your own objects you need to manually add the sound to the wad. To do so you need to edit the Sound.txt.

[b]Sound.txt[/b]
The sound.txt contains all sounds used by the LE and it is located in the [i]TRLE/Sound/LevelSFX Creator[/i] folder.
I've coloured the text on the screenshot to make the columns I'm describing below more visible. ;)

[img]http://titak.tombraiderhub.com/Tutorials/soundtxt.jpg[/img]

[b][COLOR="Red"]First column[/COLOR][/b]
(LARA_FIRE) is a description of the sound. This can be changed as you see fit.

[b][COLOR="DarkOrange"]Second column[/COLOR][/b]
(magnum) contains the name(s) of the associated samples. You can simply assign a new sound to an object by changing the name of the sample in this column.

[b][COLOR="SeaGreen"]Third column[/COLOR][/b]
(VOL75) indicates the volume of the sound. The higher the number, the louder the sound will be ingame. If the VOL is not set you won't be able to hear the sound ingame.

[b][COLOR="Blue"]Fourth column[/COLOR][/b]
can contain the letters: P, V, R, L
- [i]P[/i] = [I]Pitch[/I]: A sound with V will have a random slight pitch change each time it is played.

- [i]V[/i] = [I]Volume[/I]: A sound with V will have a random slight volume change each time it is played. If you carefully listen to the shotgun sound ingame you will notice that not every shot sounds the same: the LARA_SHOTGUN line has V assigned to it.

[I]P[/I] and [I]V[/I] are used in cases where a sample tends to be repeated very often, which would sound too mechanical if it were repeated exactly the same way all the time.

- [i]R[/i] Radius (WRONG! This is what we initially thought. Read further down this post for new info.)

- [i]L[/i] Stands for [i]looping[/i] . This needs to be assigned if you want a sample to play over and over again (=loop) The WATERFALL_LOOP line has an L assigned to it.

[b][COLOR="DarkSlateBlue"]fifth column[/COLOR][/b]
can contain the letters CH followed by a two digit number.

- [i]CH[/i] is the [i]chance[/i] of the sound to be played when triggered. The smaller the CH number the less it will be played. If no CH is included in this column the sound will play every time it is triggered. Example: CH is assigned to Lara's climbing grunt: you don't hear it all the time when she is climbing.

[b][COLOR="DarkOrchid"]Sixth column[/COLOR][/b]
contains the [i]PIT[/i] of the sound, which stands for pitch.
PIT followed by a positive number raises the pitch, PIT followed by a negative number lowers the pitch. Leave the PIT out and no pitch change will occur.

[b][COLOR="Magenta"]Seventh column[/COLOR][/b]
contains the RAD values. RAD stand for [i]radius/range[/i] . This value determines from how far away the sound can still be heard.
The higher the number the further away the sound can still be heard. The rollingball and spikes for example have a RAD of 26, which makes them heard from very far away. Normal sounds have RAD06.

[b][COLOR="DarkSlateGray"]eight and last column[/COLOR][/b]
contains a series of letters preceded by a #. These letters are associated with wads. The letters are case sensitive, so [i]a[/i] is not the same as [i]A[/i].
[quote] [i][B]Quoted from Skribbler[/B] from his tutorial on [COLOR="DarkSlateBlue"]SFX Issues[/COLOR][/i] :
All sounds associated with the #g will be added to all *.sam and *.sfx files (except *.sam and *.sfx files associated with the #t), since they are considered vital to every wad. The #t is associated only with the Title Load Screen level, and only those sounds associated with the #t will be included with any *.sam and *.sfx files built with it. All other letters and combination of letters (except #G) may be used as associated with a level. These are the same as the sound code letters indicated on p. 65 of the Tutorial Manual (and also in the readme.txt file included with the New Wads download). The complete list is as follows:

g - General; all levels
t - Title Load Screen (title)
a - Angkor Wat (angkor, angkor1)
b - Race For The Iris (ang_race)
c - The Tomb Of Seth (settomb, settomb1)
d - Burial Chambers (settomb2)
e - Valley Of The Kings (jeepchas)
f - KV5 (jeepchs2)
h - Temple Of Karnak (karnak, karnak1)
i - The Great Hypostyle Hall (hall)
j - Sacred Lake (lake)
k - Lake 2 (Level associated with TR:TLR that was not released)
l - Tomb Of Semerkhet (semer)
m - Guardian Of Semerkhet (semer2)
n - Desert Railroad (train)
o - Alexandria (alexhub)
p - Coastal Ruins (coastal, alexhub2)
q - Pharos, Temple Of Isis (palaces)
r - Cleopatra’s Palaces (cleopal, palaces2)
s - Catacombs (catacomb, csplit1)
T - Temple Of Poseidon (csplit2)
u - The Lost Library (library)
v - Hall Of Demetrius (libend)
w - City Of The Dead (city, bikebit; also New City [newcity])
x - Trenches (nutrench)
y - Chambers Of Tulun (cortyard)
z - Street Bazaar (lowstrt)
A - Citadel Gate (highstrt)
B - Citadel (citnew)
C - The Sphinx Complex (joby1a)
D - The Valley Temple (joby 1b - Level associated with TR:TLR included on the CD, but not in the game)
E - Underneath The Sphinx (joby2)
F - Menkaure’s Pyramid (joby3a)
H - Inside Menkaure’s Pyramid (joby3b)
I - The Mastabas (joby4a)
J - The Great Pyramid (joby4b)
K - Khufu’s Queens Pyramids (joby4c)
L - Inside The Great Pyramid (joby5a)
M - Temple Of Horus (Part I, joby5b)
N - Temple Of Horus (Part II, joby5c)
Ti - The Times Exclusive (times)
Tu - Playable Tutorial Level (tut1)
[/quote]Thanks! :tmb:


[b][COLOR="DarkSlateBlue"]Converting [I]the oldfashioned way[/I][/COLOR][/b]
Once you have edited the sound.txt you need to convert it into new .sfx and .sam files.

If you are running the LE on XP and if you are using one of the letters listed above you can do this by simply double clicking the [i]SFX_Example.bat[/i] in the [i]TRLE/Sound/LevelSFX Creator folder[/i]. The new files will automatically be placed in the Wads folder.

If you are using a custom letter sequence (eg I'm using [i]hm[/i] for my levels) you need to use the [i]DOS Prompt[/i] to convert the sound.txt file.
The manual says: "[i]From the LevelSFX Creator directory type the following DOS command: pcwadsfx settomb c. Of course, use the WAD (along with its associated letter) you wish to change.[/i]"
[i]Settomb[/i] being the name of your wad, [i]c[/i] being the letter or letter combination associated with your wad.
Once converted you need to put the new files into the Wads folder.

Convert the tom file of your wad and if all has been done correctly you will hear the changes you have made! :D

Many thanks to Idealist, Geckokid and Mulf for the info on sound samples! :tmb:


[COLOR="DarkSlateBlue"][b]Adding sounds using [I]WADMerger[/I][/b][/COLOR]
You can also add sounds to your wad by using [i]WADmerger's Sound Manager[/i].
- Open your wad and click the Sound Manager button. A small window will pop up with a list of the soundeffects.
- Scroll down to locate the sound effect you want to add and check it by clicking on the small white box in front of it.
- Save the wad.

Keep in mind that you can only [i]ADD[/i] sounds to a wad with WADMerger. You can't remove them.
To remove sounds from you wad you need to edit the sounds.txt like described above. ;)
Also, [B]WADMerger Sound Editor tends to be buggy[/B]. So, use at your own risk.


[COLOR="DarkSlateBlue"][B]Converting with [I]Screamer[/I]:[/B][/COLOR]
You can use SCREAMER to open a sounds.txt file and you can then edit it like you would do the manual way.
So add sounds by assigning your level letter(s) to the sound, change the name of the sample it should use, change pitch, volume, etc.
Then save the sounds.txt and output the wad.
[I]Screamer[/I] will then create new .SAM and .SFX files for your wad, which it places in the Screamer Output folder.
All you have to do then is move the new files to your wad folder and rename them if you haven't given the wad a name in Screamer.


[COLOR="DarkSlateBlue"][B]Converting with [I]TRLE Sound Editor[/I]:[/B][/COLOR]
[I]Screamer[/I] does not always work on Windows8 but sapper made this great new sound editing tool called [URL="http://www.tombraiderforums.com/showthread.php?t=202077"][I]TRLE Sound Editor[/I][/URL].
With it you can open the sounds.txt and edit it like you would do the manual way.
The converting is done by the program itself, just like with Screamer.

[B][COLOR="DarkSlateBlue"]Converting with [I]SFX Manager[/I][/COLOR][/B]
Magplus also made a program with which you can edit and convert the sounds.txt file.



[B]Note 1:[/B]
Remember that you do not have to use the letters mentioned in the list above.
You can use your own letter or letter combination. Just make sure you include/assign this letter or letter combo when converting and all lines with that letter(combo) will be added to your level wad.

[B]Note 2:[/B]
If you are using a lot of custom sounds and if you are using a lot of different sounds per level, it can happen that you do not have enough slots/room for all levels in one sounds.txt.
Well, no problem, use one sounds.txt per level for example.
I'm not sure if the oldfashioned way of converting allows for different names for the sounds.txt, but Screamer, TRLE Sound Editor and SFX Manager surely can handle them.
Simply open the Sounds-06KA2.txt (This is what the sounds.txt for one of my MoA2 levels is called), edit it and convert.
In this case it is easiest to only assign "g" and your custom letter(combo) to the slots.

Here's an example of part of one of my sounds.txt files, Sounds-06KA2.txt, lines 60 to 82:
[CODE]UNDERWATER: undwatr VOL40 L PIT00 #g
UNDERWATER_SWITCH: uw_swt VOL80 P #KA
LARA_PICKUP: lara_aha VOL40 RAD13 #g
PUSHABLE_SOUND: l_pshst VOL35 L PIT-20 RAD10 #KA
DOOR_GENERAL: gen_door VOL80 P V PIT20
HELICOPTER_LOOP: [B][COLOR="Purple"]l_moa_ratll[/COLOR][/B] VOL40 L RAD10 #KA
ROCK_FALL_CRUMBLE: [B][COLOR="Purple"]sk_die_effect[/COLOR][/B] VOL50 RAD10 #KA
ROCK_FALL_LAND: [B][COLOR="Purple"]sk_die_effect[/COLOR][/B] VOL70 PIT10 RAD10 #KA
PENDULUM_BLADES: [B][COLOR="Purple"]polesrise[/COLOR][/B] VOL50 RAD08
STALEGTITE: [B][COLOR="Purple"]splash2 splash3 splash4[/COLOR][/B] VOL35 RAD07 #KA
LARA_THUD: lar_th1 lar_th2 VOL50 P V PIT-10 #g
GENERIC_SWOOSH: swoosh1 VOL45 P V RAD10 #g
GENERIC_HEAVY_THUD: gen_thud VOL80 P PIT-50 RAD10 #g
CROC_FEET: [B][COLOR="Purple"] fl_kick01 fl_kick02 fl_kick03[/COLOR][/B] VOL40 P V PIT-10 RAD10 #g
SWINGING_FLAMES: p[B][COLOR="Purple"]olesrise[/COLOR][/B] VOL40 RAD08
STONE_SCRAPE: spinhook VOL90 PIT-50 RAD10
BLAST_CIRCLE: [B][COLOR="Purple"]hand_pl1 hand_pl2 hand_pl3[/COLOR][/B] VOL20 RAD08 #KA
BAZOOKA_FIRE: [B][COLOR="Purple"]polesrise[/COLOR][/B] VOL30 RAD08
HECKLER&KOCH_FIRE: [B][COLOR="Purple"]d_eagle3[/COLOR][/B] VOL50 RAD13 #KA
WATERFALL_LOOP: l_wfall VOL25 L RAD08 #g
CROC_ATTACK: [B][COLOR="Purple"]landing2 landing3[/COLOR][/B] VOL55 PIT00 RAD10 #g
CROC_DEATH: [B][COLOR="Purple"]splash_waterfall[/COLOR][/B] VOL40 P RAD10 #KA
PORTCULLIS_UP: [B][COLOR="Purple"]gate3[/COLOR][/B] VOL50 RAD10 [/CODE]
As you can see, only "g" and the lettercombo "KA" are assigned.
The purple entries are custom sounds.
TRLE Sound Editor marks custom sfx names in purple.


[B]NOTE 3:[/B]
[QUOTE=TheLostSecret;7879381]Here is a list of full functionalities that you must know as a level editor with [B]SOUNDS.TXT[/B] :

[COLOR="DarkGreen"][B]Sample[/B][/COLOR] :
[I][SIZE="5"]LARA_RICOCHET: rico_01 rico_02 VOL60 P V R L N CH10 PIT30 RAD13 #g[/SIZE][/I]


[COLOR="Blue"][B]1.[/B][/COLOR] : The names are shown for you in the first block of a line ( Also referred as sound name ID ) . Here is : [B]LARA_RICOCHET[/B]

[COLOR="Blue"][B]2.[/B][/COLOR] : Number of samples for a sound ID to associate with it . [U]The files must be stored in Samples directory and do not have any white-space characters such as space . Instead , in naming the audio files , always remember to use underlines ![/U] In here , we have samples for this sound ID : [B]rico_01[/B] & [B]rico_02[/B] --> [B][I]In order to define your custom file names , type the filename exactly like the file you have stored in Samples directory , then separate the file names with only one space character . For example if you want this sound to assign it to files 'craig_1' and 'craig_2' , you must type it like this : "LARA_RICOCHET: craig_1 craig_2"[/B][/I]

[COLOR="Blue"][B]3.[/B][/COLOR] : [B]VOL[/B] means the amount of volume ( loudness ) this sound must have when played ; The more the value , the louder the sound is . Here we have the amount [B]60[/B] --> . [B][I]In order to define your custom amount , type "VOL" in capital and exactly after that , enter a 2-digit number . For example if you want the volume to be 'nine' , then you must type "VOL[U]09[/U]" like this . ( Remember to convert 1 digit numbers to 2 digit . )[/B][/I]

[COLOR="Blue"][B]4.[/B][/COLOR] : [B]P[/B] flag means that this sound ID will have randomized PITCH amount each time it is played during runtime . For more information , visit the end of this post .

[COLOR="Blue"][B]5.[/B][/COLOR] : [B]V[/B] flag means that this sound ID will have randomized VOLUME amount each time it is played during runtime .

[COLOR="Blue"][B]6.[/B][/COLOR] : [B]R[/B] flag means how this sound will be triggered . Experimental .

[COLOR="Blue"][B]7.[/B][/COLOR] : [B]L[/B] flag means that this sound will be looped when played . [B]Not ideal for one-shot sounds but good for looping sounds such as WATERFALL_LOOP sound .[/B]

[COLOR="Blue"][B]8.[/B][/COLOR] : [B]N[/B] flag means this sound is NULL type and therefore will never be played during runtime . [B]This feature is removed in TRNG and this flag doesn't affect this sound .[/B]

[COLOR="Blue"][B]9.[/B][/COLOR] : [B]CH[/B] is the short form of CHANCE ; Which means this sound will not be always played , but with the chance amount of the value entered after the CH word . For example , we want our audio to be played with a one fifth possibility ( 1/2 in mathematics ) . So we have to enter it like this : [B]( CH50 ) . [B][I]Remember that this flag requires a 2-digit number as an argument , which means you have to enter a decent value from a range of 01 to 99 ! If you add a value of 00 or remove this flag , it will always be played .[/B][/I]

[COLOR="Blue"][B]10.[/B][/COLOR] : [B]PIT[/B] is the short form of PITCH ; Which means the amount of pitch this sound will have . The more the value , the more the voice gets closer to a girlish voice ! ( It is somehow hard to describe it so it is experimental ... :o ) [B][I]The way of usage is exactly like CH .
You can also add negative values , like "PIT-05" it will make a rough man voice ! :D[/B][/I]

[COLOR="Blue"][B]11.[/B][/COLOR] : [B]RAD[/B] is the short form of RADIUS ; The more the amount , the easier you could hear the sound in a 3D world space . It is mostly used to create a spatial 3D sound blend in 3D games . For more information on spatial blending , google it . :D . [B][I]The way of usage is exactly like CH[/B][/I]

[COLOR="Blue"][B]12.[/B][/COLOR] : [B]Level of Generality[/B] , also referred as ( Relative Level ID ) specifies that in which levels , this sound has to be included with the .SFX file for the level . For example , we have a wad name called "craigbit.wad" and we want to build SAM and SFX file using the SOUNDS.TXT , with this sound file included . First of all , we specify a unique 2-letter ID for our level . For CRAIG it's good to use [B]CG[/B] . Now , we want to include LARA_RICOCHET sound to this level . By the end of the line , we will add a flag like this : [B][U]"#CG"[/B][/U] ( Remember to always add the HASH ( # ) flag to the first of the unique level ID . )

[B]----------------------------------[/B]

[FONT="Arial Black"][B][SIZE=5]Things to take care of ! :[/SIZE][/B][/FONT]

[B][COLOR="Red"]1.[/COLOR][/B] : Be aware that the SPACE character is the separator of the arguments in SOUNDS.TXT file . You could also use other white space characters such as TAB in order to do some justification with the texts you are working with .

[B][COLOR="Red"]2.[/COLOR][/B] : The UNIQUE LEVEL IDs are [B]case sensitive[/B] , for example [U]#a is different from #A ![/U]

[B][COLOR="Red"]3.[/COLOR][/B] : [COLOR="SeaGreen"][B][SIZE="5"]#G[/SIZE][/B][/COLOR] flag means "General" or "Global" which means that this sound will be included with all of the levels and wad files , bypassing the # UNIQUE ID flag !

[B][COLOR="Red"]4.[/COLOR][/B] : [B]DO NOT OVERDO USING[/B] [COLOR="SeaGreen"][B][SIZE="5"]#G[/SIZE][/B][/COLOR] flag or else you will hear really bad and annoying sounds during runtime , which causes game's engine's instability !

[B]----------------------------------------------------[/B]

Also , for building the "craig.SAM" and "craig.SFX" file , follow these simple steps :

[B]1.[/B] Create a blank .TXT file .
[B]2.[/B] Open it in NOTEPAD .
[B]3.[/B] Write down this code :
[CODE]

pcwadsfx craig cg Sounds.txt

copy *.sam ..\..\graphics\wads
copy *.sfx ..\..\graphics\wads

del *.sam
del *.sfx

[/CODE]
[B]4.[/B] Rename the file extension with ".BAT" .
[B]5.[/B] Execute the batch file you just created to automatically compile and copy the files to the WADs directory .
[B]6.[/B] Build the level and see how it works !

[I] Whenever you wanted to do some modifications , you can do it at ease , but remember to always execute this batch file after any changes made with Sounds.txt file or nothing will be apllied ! [/I][/QUOTE]


All times are GMT. The time now is 14:41.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.