How do I mod GLaDOS's voice in Portal 1?

Solution 1:

Ha! I did it by cheating: finding an existing sound mod for Portal and examining it :D. Here's how, for posterity:

Apparently, the Source engine does not look for sounds in the directory. It looks for script files instead. Those script files define where to look for stuff.

So I did the following:

  • Opened the main Portal GCF (that's portal content.gcf) file with GCFScape;
  • Extracted GLaDOS's voice script file (that's scripts\npc_sounds_aperture_ai.txt) to the directory where the game engine will look at, which, according to the Valve wiki, is the one where GameInfo.txt is in. So STEAMAPPS\millenomi\portal\portal, so that I have STEAMAPPS\millenomi\portal\portal\scripts\npc_sounds_aperture_ai.txt

Now Portal will look relative to the scripts file for sounds! …not. Apparently, if the file has the same name it's still looked for using the same search path that led Source to pick up the original file instead. Sigh. So, instead, noticing the working mod had file names that were different from the ones in the archive, I changed the script and the filename to a name that wasn't used anywhere else in the game (vo/aperture_ai/00_part1_entry-1__MODIFIED.wav). And BAM!, it worked. :D

Solution 2:

All you need is to set the correct attributes of your wav file. I have changed files for Alien Swarm, it is also a Source SDK powered game. So I assume the steps are the same:

  1. Get the free application Audacity, install and run it.
  2. Set sound frequency to 44 100 Hz example
  3. Go to audicity options, Formats and select WAV (Microsoft 16 bit PCM)example
  4. Record your sound and export to wav file into proper Portal directory (replace the original file)
  5. Check it in Portal

If you don't hear your sound in Portal then some wav options are incorrect and must be changed. Check the original Portal wav files and see what options are they using (you can open them in Audicity).

Solution 3:

Another idea I have as to why it's not working is that there might be a console option that is preventing mods from occurring.

With your files in the c:\program files\steam\steamapps\millenomi\portal\portal\sounds\vo

With Portal open hit the ~ key (top left keyboard) to bring up the developer console. If that doesn't happen to do anything, click on options. Under the Keyboard tab, there should be a button that says "Advanced". Click that and check the box that says "Enable developer console", then hit "OK".

Now try the ~ key again. This should open the Developer Console. With the developer console open, type "sv_pure 0" (minus the quotes). Then try running a game.

sv_pure is something that is usually used on Multi-player servers like Counter-Strike or Team Fortress 2 which prevents people from connecting to the server using mods (textures/models/sounds). It overrides their mods with the default GCF files.

If this doesn't work, my only other suggestion is to try it again, but remove the second portal folder from the equation.

 c:\program files\steam\steamapps\millenomi\portal\sounds\vo

instead of:

 c:\program files\steam\steamapps\millenomi\portal\portal\sounds\vo