Portal 2 SDK Tutorial 16 (Adding Custom Sounds)
Uploader Comments (MrJohnLanz)
All Comments (31)
-
Damn, well that works. Thanks a lot - I've been looking everywhere for a quick solution.
-
@rocketrascal34 snd_updateaudiocache if you don't want to rebuild all of it.
-
To get sounds to work, place them in the directory. Then load the game, and snd_rebuildaudiocache. fixed?
-
You don't have to restart hammer, rather just press "refresh sound" in the sound selection window. Worked for me, at least.
-
Thanks! works perfectly!
-
@MrJohnLanz Just drag and dropp the folder you intend to package onto the Portal 2\bin\vpk.exe file. :P It will create the archive in a second right next to where the original folder is. The only thing you need to watch out is that the folder you drag onto the vpk.exe will act like if it was the portal2 folder (inside Portal 2), so the files you put inside it need to have the exact locations as if they were in the portal2 folder.
-
It is also possible to add new directories into the sound browser without restarting hammer by selecting "file - reload sounds" in the hammer toolbar.
-
@RighteousGames Worked it out, did something amazingly stupid, saw a text document named the same as my map so i just write out my soundfiles in there... i assumed it was .txt, but infact it was a .log but it appeared the same so... But good job on these brilliant tutorials :)
Thanks for this tutorial it was useful as always, there is just one little thing I'd argue with: this method isn't precisely about "creating custom sounds" it just explains how we can pack our own sounds inside the .bsp itself, thus making them easier to publish. But I believe, creating a .vpk archive and putting the sounds into that, is a lot easier than your way and the result is the same: one file that contains the map AND the custom sounds as well.
macihun93 7 months ago
@macihun93 I couldn't figure out how to create a .vpk because my tools for packing it wouldn't work. trust me I tried.
MrJohnLanz 7 months ago
Thank You so much. I was going crazy with this...
Also: the same what adamwestmagic715 asked below (I guest that VPK is useful for isn't it?)
EgonCom 7 months ago
@EgonCom yeah the .bsp has the sound wrapped in it
MrJohnLanz 7 months ago
If I wanted to send a .bsp of a map with a custom sound in to someone, will it have that sound incorporated into it, or will they need the additional sound file as well? If the latter, will they require the same file structure?
adamwestmagic715 7 months ago
@adamwestmagic715 after you do the steps involved, the sound will be in the .bsp
MrJohnLanz 7 months ago