Portal 2 custom sounds

Avatar
TheAlexby
13 Posts
Posted May 25, 2011
So i used a gcf extractor to get a sound from portal 2. I then edited the sound a little bit, and i feel its ready. There is just one problem.... I gave the sound the same name, and i first tried to put it in portal 2/portal2/sound/vo/announcer/prehub42.wav but that didnt work. Then i tried to put it in addons/vo/announcer/prehub42.wav and it still didnt work... So any ideas how to make this work? I really have no idea.. This method has worked for me before on other source games, but i guess portal 2 (since is it is a different source engine) has changet that. Any ideas?

Please note, i wanna change the sound only for me, i would never give it away, and its just for testing purposes.

Advertisement
Registered users don't see ads! Register now!
Avatar
Mek
459 Posts
Posted May 25, 2011
Replied 29 minutes later
When the sound is to play and it does not, open the developer console and look what stuff it has to say about your sound.
Avatar
TheAlexby
13 Posts
Posted May 25, 2011
Replied 37 minutes later
No, the sound plays, but that is the default sound. I was playing an official valve map, and as i understand, they play sound files from a file at your computer, so if you change that file, but have the same name it will basically play the new one.
Conclusion: The normal sound plays, but not the one i made... it did have the same name, i just dont know where to put it.
Avatar
msleeper
4,095 Posts
Admin
Posted May 25, 2011
Replied 2 hours later
You have to rebuild your sound cache.
Avatar
TheAlexby
13 Posts
Posted May 25, 2011
Replied 2 hours later
How do i do that?
Avatar
WinstonSmith
940 Posts
Posted May 26, 2011
Replied 21 hours later
Ah...don't know about rebuilding the sound cache, but I think you might have to edit the VPK pak01_dir. Sort of like the way Hunter wrote up to replace textures, I think the VPK system only defaults to a common\portal 2\portal2\ file if it can't find the correct file in the VPKs. Try messing with pak01_dir.vpk (MAKE A BACKUP FIRST) and it might work.
Avatar
msleeper
4,095 Posts
Admin
Posted May 26, 2011
Replied 19 minutes later
You can place custom VPKs in the addons/ directory in the root portal 2/portal2/ directory. You'll have to create it as it doesn't exist by default, but putting VPKs there does work.
Avatar
TheAlexby
13 Posts
Posted May 26, 2011
Replied 40 minutes later
okay so i tried that.. i made a folder i called pak01_dir and i made it into a VPK, then i put it in addons(which i created also) and the folders inside the VPK is sound/vo/announcer/ just like the original VPK... still does not work...
Avatar
msleeper
4,095 Posts
Admin
Posted May 26, 2011
Replied 58 minutes later

TheAlexby wrote:
i made a folder i called pak01_dir and i made it into a VPK

Err, no. The contents of the VPK should reflect the directory structure of the portal 2/portal2/ root directory. Making a folder to hold your custom sounds/ directory is purely for convenience. You don't VPK the "some bullshit directory name", you VPK the sounds/, maps/, directories inside it.

Avatar
TheAlexby
13 Posts
Posted May 26, 2011
Replied 6 minutes later
Okay so i didn't get that, at all... I'm not very good at english, could you just make an example? like, "The vpk should be called (NAME) it should contain (Folders and files etc) and you place it (folder to place it)" ?
Avatar
msleeper
4,095 Posts
Admin
Posted May 26, 2011
Replied 16 minutes later
Avatar
TheAlexby
13 Posts
Posted May 26, 2011
Replied 9 minutes later

msleeper wrote:

I'll take that as a no? if not then, could you explain more detailed?

Avatar
WinstonSmith
940 Posts
Posted May 26, 2011
Replied 3 hours later

TheAlexby wrote:
msleeper wrote:

I'll take that as a no? if not then, could you explain more detailed?

Alright, since I guess msleeper's gone and shot himself I'll help you out here. When you go to C:\Program Files\Steam\steamapps\common\portal 2\portal2\ there are a few folders named "maps", "materials", "sound", etc. What you should do is create a folder with whatever you want your VPK file to be named (in your case, you'd name the folder something other than pak01_dir--let's say "custom_sound_vpk") and create folders inside it named "maps", "materials", "sound", etc. so that the contents of the custom_sound_vpk folder match the content of the C:\Program Files\Steam\steamapps\common\portal 2\portal2\ folder. Then put the sound files or whatever you want inside \custom_sound_vpk\sound\ and drag the entire \custom_sound_vpk\ folder on to the VPK creator.

The only reason I'm suggesting a different name is because if you name it the same as one of the VALVe-supplied VPKs it might fight between the two.

Avatar
TheAlexby
13 Posts
Posted May 27, 2011
Replied 21 hours later
Yeah thank you. But, that is for use if i make the maps myself i belive. But i'm talking about overriding the default sounds... So i can play the official VALVe maps, and have my voice for an example instead of glados or the announcer...
Advertisement
Registered users don't see ads! Register now!
Avatar
WinstonSmith
940 Posts
Posted May 27, 2011
Replied 46 minutes later

TheAlexby wrote:
Yeah thank you. But, that is for use if i make the maps myself i belive. But i'm talking about overriding the default sounds... So i can play the official VALVe maps, and have my voice for an example instead of glados or the announcer...

Honestly? My best advice would be to modify the original VPK like in the thread to which I linked. Mostly because unless you want to extract everything in the original VPK and replace the sounds and then reVPK everything, making a new VPK with just the sounds and the same name will break most of the game. Yeah, you'll have to do it again every time P2 is updated, but seriously, my advice is to backup and then modify pak01_dir.vpk.