Homework 2 - Frequently Asked Questions

[Note questions are added in reverse order, so the newest ones are at the top.]


Q: Tell me about sounds.

A: There are two ways. One, you simply put in the path to the sound in Faceposer and use the sound directly. One thing that you should do is choose a directory name that has your own name in it or something unique, just to make things easier to organize. In any case, you can reference the sound directly. This is easier, but does not let you control the volume of the sound. That means that you must record it properly and/or adjust with audacity so it is correct. We used this technique effectively in the Ute/Cougar movies, although there were times when the special effects were a bit too loud. If you want to be able to control the volume in faceposer, then you need to do more work and create your own sound description files for the system to do. Here is how you do that:

To do this, you must edit the games_sound_manifest.txt file in the scripts folder.  You need to add a line that loads in your sound files.  The line should look like:

"precache_file"        "scripts/youruniquedirectoryname/scriptedSounds.txt"

So, create your own script file which references all of your wav files.  The scriptedSounds.txt file (or whatever you call it) will have several soundscript entries that looks something like:

"npc_janeDoe.speech"
{
    "channel"       "CHAN_VOICE"
    "volume"        "VOL_NORM"
    "pitch"         "PITCH_NORM"
    "soundlevel"    "SNDLVL_NORM"

    "wave"          "*yourcadelogin/npc_janeDoe_speech.wav"
}

Here is a link to the documents on sound scripts.


Q: Do I Have to use the sound script stuff?

A: No, it is only necessary if you are using your own mod.  If you just use HL2, then it should work ok to just reference the file name.


Q: I can't find the scripts files.

A:

By default, Half Life 2 doesn't have a scripts directory since all that data is stored in the main .gcf.

 

So just make a new directory and a new game_sounds_manifest.txt at the following location:

<path_to_Steam>\Steam\steamapps\<your_login>\half-life 2\hl2\scripts\

 

Here is the default manifest in case you need a starting point.