Adding Sounds To Portal 2 SDK

Avatar
Faja_2485
18 Posts
Posted Sep 03, 2012
How do you put in GLaDOS dialog from portal into your portal 2 map?
Advertisement
Registered users don’t see ads! Register now!
Avatar
FelixGriffin
2,680 Posts
Posted Sep 03, 2012
Replied 2 hours later
Basically, you can't. It's copyright infringement.

If you REALLY want to, and aren't going to release the dialogue with your map, you can extract the sounds from portal content.gcf/sound/vo/aperture_ai.

Avatar
Faja_2485
18 Posts
Posted Sep 03, 2012
Replied 55 minutes later

FelixGriffin wrote:
Basically, you can't. It's copyright infringement.

If you REALLY want to, and aren't going to release the dialogue with your map, you can extract the sounds from portal content.gcf/sound/vo/aperture_ai.

Is there anyway to put your own voice in the map?

Avatar
FelixGriffin
2,680 Posts
Posted Sep 03, 2012
Replied 1 hour later
Yes, there are a few options. First you'll need to record your voice, save it as a WAV file in portal2/sound/vo/faja or the like. The easy way is to add an ambient_generic to your level, with that sound. But to get it to work just like in the real game, with the dings before and after and not playing while paused, you need to make a full mod. It's really hard, so you probably don't want to do that.
Avatar
ChickenMobile
2,460 Posts
Posted Sep 04, 2012
Replied 6 hours later
The dings are simple. I nicely made up how to set one up through some scripts. (click my sig to find it)

If you are lazy however: you could always play the subsequent scenes through a logic_choreographed_scene with your own timing (I believe there is a OnCompletion output so you can play scenes straight after each other).
The good thing about scenes is people in other languages will speak in their language (or if their language didn't get recorded by Valve: subtitles).

Or if you are even lazier than that: play the ding sounds (preferably soundscripts so they can still see the subtitles) through an ambient_generic and trigger them through some timing.

Avatar
FelixGriffin
2,680 Posts
Posted Sep 04, 2012
Replied 12 hours later
In my contest entry I just used scenes and bypassed glados.nut, and got a nice ding working. If you want to do it that way I can give you a sample instance.
Avatar
Faja_2485
18 Posts
Posted Sep 04, 2012
Replied 2 hours later

FelixGriffin wrote:
Yes, there are a few options. First you'll need to record your voice, save it as a WAV file in portal2/sound/vo/faja or the like. The easy way is to add an ambient_generic to your level, with that sound. But to get it to work just like in the real game, with the dings before and after and not playing while paused, you need to make a full mod. It's really hard, so you probably don't want to do that.

See I don't really care about the dings and what not, but I can't even get it working it just says "missing from disk/repository", which I have no clue what it means. The dings aren't a must, but if I can get them in there easily, then I will.

Avatar
Faja_2485
18 Posts
Posted Sep 04, 2012
Replied 2 minutes later

ChickenMobile wrote:
The dings are simple. I nicely made up how to set one up through some scripts. (click my sig to find it)

If you are lazy however: you could always play the subsequent scenes through a logic_choreographed_scene with your own timing (I believe there is a OnCompletion output so you can play scenes straight after each other).
The good thing about scenes is people in other languages will speak in their language (or if their language didn't get recorded by Valve: subtitles).

Or if you are even lazier than that: play the ding sounds (preferably soundscripts so they can still see the subtitles) through an ambient_generic and trigger them through some timing.

I don't know much about .nut so adding all those files is pretty much impossible to me, plus I am only really making 3 maps (right now), so the files don't seem like a must.

Avatar
FelixGriffin
2,680 Posts
Posted Sep 04, 2012
Replied 47 minutes later
snd_rebuildaudiocache
Avatar
Faja_2485
18 Posts
Posted Sep 05, 2012
Replied 22 hours later

FelixGriffin wrote:
snd_rebuildaudiocache

Thanks and is there a super easy way to use my voice in the scene choreographer?

Avatar
FelixGriffin
2,680 Posts
Posted Sep 05, 2012
Replied 38 minutes later
Scene choreographer? You mean the face poser? You CAN do it that way, but it's hard, and you won't be able to put your map on the workshop or release it as a stand-alone map.

Anyway, just record it in Audacity and save it as a 44100 WAV file.

Avatar
Faja_2485
18 Posts
Posted Sep 05, 2012
Replied 19 minutes later
Will the Audio cache (The one I rebuilt with snd_rebuildaudiocache) stay with the map or will who ever I give it to need to do it too.
Avatar
josepezdj
2,386 Posts
Posted Sep 06, 2012
Replied 8 hours later
The command snd_rebuildaudiocache is slower than snd_updateaudiocache and both are ok for what you are trying to do. In order to automate the command snd_updateaudiocache you can try this:

  1. Go to your Portal2/portal2/cfg folder
  2. Create an autoexec.cfg (plain) text file if there isn't any
  3. Add snd_updateaudiocache in

Now you should embed that autoexec.cfg into the bsp using pakrat along with the custom sound you create. This way, everyone will listen to it with no problem. :thumbup:

Avatar
greykarel
225 Posts
Posted Sep 06, 2012
Replied 1 hour later

josepezdj wrote:
Now you should embed that autoexec.cfg into the bsp using pakrat along with the custom sound you create. This way, everyone will listen to it with no problem.

Actualy, you dont't need to have any autoexec files in your .bsp.and update audiocash at all if you packed your sound files into .bsp. It worked for me and everyone who played my map Hard Light.

Advertisement
Registered users don’t see ads! Register now!
Avatar
josepezdj
2,386 Posts
Posted Sep 06, 2012
Replied 22 minutes later
Now that you mention it, I remember ChickenMobile saying the same... Thanks for the correction.