www.tombraiderforums.com

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Tomb Raider Level Editor Tutorials

Closed Thread
 
Thread Tools
Old 24-11-06, 14:46   #1
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 30,634
Default Sound issues

Audio


The LE uses two different sound types: Audio and sound effects .

Audio
The audio files are located in the TRLE/Audio folder and they are in *.wav 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.

WAV Format:
Microsoft ADPCM
44100 kHz
4 Bit
Stereo


Activation:
The audio files need to be activated with a trigger.



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.



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


Note 1:
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.

Note 2:
Quote:
Originally Posted by Lwmte View Post
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 4.6.9. TrigAction 0x08 — Play Soundtrack 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.
Note 3:
Quote:
Originally Posted by AkyV
Playing audio tracks


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.

The differences between the old and the new methods:

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.

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.

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. (Edit: this thing had been cleared up just before.)
- 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.

New features which are useable both with the old and the new method:

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.)

See SoundSettings Script command for a preset of general audio volume.
This is the same you could adjust in the Options menu of the game.

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.)

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:

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.

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.
(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.)
Now you don’t need CUST_SET_OLD_CD_TRIGGER, ENABLED.

- 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 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.


Some Script commands are also able to control single or loop audio tracks. See eg. Image or Diary commands.
Note 4:
Quote:
Originally Posted by AkyV
Imported audio tracks

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.

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.)

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.
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.

Last edited by Titak; 11-12-17 at 19:27.
Titak is offline  
Old 24-11-06, 14:47   #2
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 30,634
Default

Sound effects


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 TRLE/Sound/Samples folder.

Format:
PCM
22050 kHz
16 Bit
Mono


The game can crash if the format is wrong!

You can use Windows Sound Recorder 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 or the game crashed) and I now use Cool Edit 96. Works like a charm!

Activation:
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 WADMerger 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.

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



First column
(LARA_FIRE) is a description of the sound. This can be changed as you see fit.

Second column
(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.

Third column
(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.

Fourth column
can contain the letters: P, V, R, L
- P = Pitch: A sound with V will have a random slight pitch change each time it is played.

- V = Volume: 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.

P and V 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.

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

- L Stands for looping . 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.

fifth column
can contain the letters CH followed by a two digit number.

- CH is the chance 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.

Sixth column
contains the PIT 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.

Seventh column
contains the RAD values. RAD stand for radius/range . 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.

eight and last column
contains a series of letters preceded by a #. These letters are associated with wads. The letters are case sensitive, so a is not the same as A.
Quote:
Quoted from Skribbler from his tutorial on SFX Issues :
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)
Thanks!


Converting the oldfashioned way
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 SFX_Example.bat in the TRLE/Sound/LevelSFX Creator folder. The new files will automatically be placed in the Wads folder.

If you are using a custom letter sequence (eg I'm using hm for my levels) you need to use the DOS Prompt to convert the sound.txt file.
The manual says: "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."
Settomb being the name of your wad, c 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!

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


Adding sounds using WADMerger
You can also add sounds to your wad by using WADmerger's Sound Manager.
- 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 ADD 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, WADMerger Sound Editor tends to be buggy. So, use at your own risk.


Converting with Screamer:
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.
Screamer 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.


Converting with TRLE Sound Editor:
Screamer does not always work on Windows8 but sapper made this great new sound editing tool called TRLE Sound Editor.
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.

Converting with SFX Manager
Magplus also made a program with which you can edit and convert the sounds.txt file.



Note 1:
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.

Note 2:
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:          l_moa_ratll                       VOL40          L                 RAD10  #KA 
ROCK_FALL_CRUMBLE:        sk_die_effect                     VOL50                            RAD10  #KA
ROCK_FALL_LAND:           sk_die_effect                     VOL70                   PIT10    RAD10  #KA
PENDULUM_BLADES:          polesrise                         VOL50                            RAD08
STALEGTITE:               splash2 splash3 splash4           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:                fl_kick01 fl_kick02 fl_kick03     VOL40  P V              PIT-10   RAD10  #g 
SWINGING_FLAMES:          polesrise                         VOL40                            RAD08
STONE_SCRAPE:             spinhook                          VOL90                   PIT-50   RAD10
BLAST_CIRCLE:             hand_pl1 hand_pl2 hand_pl3        VOL20                            RAD08  #KA
BAZOOKA_FIRE:             polesrise                         VOL30                            RAD08
HECKLER&KOCH_FIRE:        d_eagle3                          VOL50                            RAD13  #KA 
WATERFALL_LOOP:           l_wfall                           VOL25          L                 RAD08  #g 
CROC_ATTACK:              landing2 landing3                 VOL55                   PIT00    RAD10  #g 
CROC_DEATH:               splash_waterfall                  VOL40  P                         RAD10  #KA 
PORTCULLIS_UP:            gate3                             VOL50                            RAD10
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.


NOTE 3:
Quote:
Originally Posted by TheLostSecret View Post
Here is a list of full functionalities that you must know as a level editor with SOUNDS.TXT :

Sample :
LARA_RICOCHET: rico_01 rico_02 VOL60 P V R L N CH10 PIT30 RAD13 #g


1. : The names are shown for you in the first block of a line ( Also referred as sound name ID ) . Here is : LARA_RICOCHET

2. : Number of samples for a sound ID to associate with it . 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 ! In here , we have samples for this sound ID : rico_01 & rico_02 --> 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"

3. : VOL 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 60 --> . 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 "VOL09" like this . ( Remember to convert 1 digit numbers to 2 digit . )

4. : P 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 .

5. : V flag means that this sound ID will have randomized VOLUME amount each time it is played during runtime .

6. : R flag means how this sound will be triggered . Experimental .

7. : L flag means that this sound will be looped when played . Not ideal for one-shot sounds but good for looping sounds such as WATERFALL_LOOP sound .

8. : N flag means this sound is NULL type and therefore will never be played during runtime . This feature is removed in TRNG and this flag doesn't affect this sound .

9. : CH 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 ) . 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 .

10. : PIT 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 ... ) The way of usage is exactly like CH .
You can also add negative values , like "PIT-05" it will make a rough man voice !


11. : RAD 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 . . The way of usage is exactly like CH

12. : Level of Generality , 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 CG . Now , we want to include LARA_RICOCHET sound to this level . By the end of the line , we will add a flag like this : "#CG" ( Remember to always add the HASH ( # ) flag to the first of the unique level ID . )

----------------------------------

Things to take care of ! :

1. : 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 .

2. : The UNIQUE LEVEL IDs are case sensitive , for example #a is different from #A !

3. : #G 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 !

4. : DO NOT OVERDO USING #G flag or else you will hear really bad and annoying sounds during runtime , which causes game's engine's instability !

----------------------------------------------------

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

1. Create a blank .TXT file .
2. Open it in NOTEPAD .
3. Write down this code :
Code:
pcwadsfx craig cg Sounds.txt

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

del *.sam
del *.sfx
4. Rename the file extension with ".BAT" .
5. Execute the batch file you just created to automatically compile and copy the files to the WADs directory .
6. Build the level and see how it works !

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 !
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.

Last edited by Titak; 11-05-18 at 16:43.
Titak is offline  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 00:25.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.