Custom Sound Question

Avatar
MasterLagger
1,695 Posts
Posted Jul 27, 2011
How do I add custom sounds to my map? There was probably already another topic similar to this but I can't find it. I can't find any browse button or an import sound button anywhere in Hammer.
Advertisement
Registered users don’t see ads! Register now!
Avatar
MrLate
159 Posts
Posted Jul 27, 2011
Replied 6 minutes later
Well first you need to put your sound file to portal 2/portal2/sound folder. Then the entity you want to use is probably ambient_generic.

It is problematic using .mp3s because they just give error message to console. Even .wavs gave me problems because I had to pack them into the .bsp just to get them working.

Avatar
Skotty
671 Posts
Posted Jul 27, 2011
Replied 51 minutes later
You need to pack custom sounds into a VPK file and put them into the portal 2\portal2\addons folder.
Avatar
MasterLagger
1,695 Posts
Posted Jul 28, 2011
Replied 1 day later
Couldn't I just put the custom sounds and material in a folder and stick it in the portal 2/portal2 folder? I tested a WAV from there inside Hammer and it works.
Avatar
Will T.
163 Posts
Posted Jul 28, 2011
Replied 31 minutes later

MasterLagger wrote:
Couldn't I just put the custom sounds and material in a folder and stick it in the portal 2/portal2 folder? I tested a WAV from there inside Hammer and it works.

I was experimenting with this earlier today. While the file works fine in Hammer, Portal 2 will refuse to find it - it just places an error in the console. Packing the sound into the BSP fixes it.

Avatar
Skotty
671 Posts
Posted Jul 29, 2011
Replied 3 hours later
Exactly. Packing them in the BSP or for testing you can pack them in a VPK file. The other solution (I don't recommend this one!) is to rebuild the whole soundcache.
Avatar
MasterLagger
1,695 Posts
Posted Jul 29, 2011
Replied 7 hours later
Since I can't use PakRat, I'll use the VPK method. Maybe I'll stick a WIP map so people can test this to see if it will work.
Avatar
erictfitzgerald
3 Posts
Posted Aug 02, 2011
Replied 4 days later
I have successfully added wav files to a bsp, and they are functional in testing (thank you to MrJohnLanz on youtube for his tutorial).

However, wav files can be huge, and adding 2 wavs to a small map has increased its size to 8 megs, and at this rate, the bsp file will be well over 100 megs by the time i'm done adding all i want to.

can anyone explain how to add mp3s (i tried 128 bit mp3s, didnt play in hammer, doesnt play in testing) to a map? much less how to get an mp3 file to play in hammer?

are there other compressed audio formats that will work? does the file have to be mono? thank you for any help on this. when i'm done with my map, hopefully it will be a reward to those who have helped! Eric

Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Aug 02, 2011
Replied 14 minutes later

erictfitzgerald wrote:
can anyone explain how to add mp3s (i tried 128 bit mp3s, didnt play in hammer, doesnt play in testing) to a map? much less how to get an mp3 file to play in hammer?

Mp3's should be the main way to post large sounds into your map as they are more compressed. I found a good tutorial here: http://www.youtube.com/watch?v=c6akpZrqxqk Please note you have to convert to the right bit rate in order for it to play in game.

Mp3's usually cannot be previewed in the hammer editor.