Please or Register to create posts and topics.

Adding Custom Sounds

I've searched google for this, and it seems that I'm not the only one having this problem. How do I add custom sounds for a portal 2 map? I've done it successfully for other maps before, but I can never get it to work for portal 2. I get the sound file in the right format and all that, stick it in the right spot, browse for it in an ambient_generic entity, preview it, and then give it a trigger. When I load the map, it doesnt play. I get an error message saying that portal 2 cannot find the sound file because it is probably 'missing from disc repository' or something like that. Does anyone know how to fix this? Any help would be appreciated!

Also, does anyone know the name of the sound file for the Exile Vilify song?

Well, I figured out the Exily Vilify sound name. musicsp_a2_dual_lasers_r1.wav for anyone that wants to use it.

Still having troubles adding custom sounds. Can anyone help me with this?

I had the exact same problem and fixed it with adding a value of 10 to "Start volume" property for ambient generic entity.. or try to rebuild your audio caches by entering this to console snd_rebuildaudiocache .. but I think it's not necessary.

Adding new sounds (or replacing existing ones) does require the soundcache to be rebuilt.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

Actually, I figured out a differant solution. Using Pakrat, I just complied the sound right into the BSP after doing everything I listed above, without touching any soundcache. It was laggy as hell, but I think thats cuz I used a 4 minute, high quality song. (It make the map a few times bigger, and it took a long time to load.) Anyhow, thats all! I think I'll upload a non-radio verson of Exile Vilify for the map I'm making.

I'll try the audiocache thingy with the counsol, that seems much easier and less laggy. Of course, I'd need to embed it in the BSP, or include a seperate download, if anyone wanted my custom music in their maps. Thanks for your help!

EDIT: Tried it, works great! And from my understanding, its a one time process. Thanks a bunch! I know that lots of other users across the interwebs are having similar sound problems. I hope this helps anyone who stumbles across it!

:thumbup:

msleeper wrote:
Adding new sounds (or replacing existing ones) does require the soundcache to be rebuilt.

I never do that and it still works for me, if I do it properly.

Killerblonde wrote:
I just complied the sound right into the BSP after doing everything I listed above, without touching any soundcache. It was laggy as hell, but I think thats cuz I used a 4 minute, high quality song. (It make the map a few times bigger, and it took a long time to load.)

I also include things in the bsp, maybe thats why no cacherebuild is needed. And since you must include the custom contents in your download, its the same, but more elegant.
The map maybe load faster if its an external file, but portal 2 needs to load it anyway, so if it doesnt load it at startup, then it will load (and maybe lag) when it starts to play it. I prefer to load 1-2 sec longer but to not have lag ingame.

-= Check out my maps: workshop, and their .vmf sources: homepage =-