Portal 2

Portal 2

31 ratings
How to add custom sounds and textures to your workshop map
By Salzmann69
UPDATED FORMATTING AND COMMENTS - 5/20/23
   
Award
Favorite
Favorited
Unfavorite
Sounds
First to do this you must have at least basic knowledge of hammer.

First download Pakrat: http://www.bagthorpe.org/bob/cofrdrbob/pakrat.html

Your sound file must be the .wav format(example: sound_test.wav) and be 16 bits, once you create it put it in:
"<game install dir>\steamapps\common\Portal 2\portal2\sound"

If hammer is running restart it and load the sound browser window and search for the file, if it doesn't work try to make a new file in portal2\sound (example: portal2\sound\testfile) and place your sound in that file, if the sound does not play there is a high chance it won't work when packed either, be sure it plays in game before packing


if it does work, now you have to load pakrat, make sure that the sound is in

"<game install dir>\steamapps\common\Portal 2\portal2\sound"

and that the map file(.bsp) is in:

"<game install dir>\steamapps\common\Portal 2\sdk_content\maps"

if you don't do this it won't work, load pakrat and find your map file(.bsp) if its not there you need to compile your map just hit F9 in hammer, be sure you run a final compile and this is the version you want to publish, any changes to the map or recompiling will require this process to be repeated

Once you have pakrat loaded press file/preferences and set the "Game Root Directory" to:

"<game install dir>\steamapps\common\Portal 2\portal2"

And once your map is loaded press "auto" and it will say "<# of files> has been found on the disk would you like to add them?" Press Ok and then press File/Save BSP, now it should be packed now run the map, now post it on the workshop and it should work.

Note: sometimes the sound won't play when first packed, this doesn't mean that you did anything wrong, try to post it on the workshop under hidden(if you don't want to really post it yet) now have a friend test it or load it on another computer to test it.

This does not work on some source games: Left for Dead 2, and any game that uses the .vpk workshop uploader.

This works on the following games: Portal 2, CSGO and any game that uses the .bsp workshop uploader just change the directory to <steam dir>\Steam\steamapps\common\<game name>\
Textures
Texture creation:
Download VTFedit: https://developer.valvesoftware.com/wiki/VTFEdit
Now find a image that you want be the texture(.img .png .jpg) now load VTFedit and press file / import or press: Ctrl+i, now find the image, and press ok on the next window now press file/save as... and save to: <steam dir>\Steam\steamapps\common\Portal 2\portal2\materials
now press tools/Create VMT File, and press Create and save to: <steam dir>\Steam\steamapps\common\Portal 2\portal2\materials, And name it the same as the first one only put .vmt at the end, if you change the name it will not work.

Texture Packing:
When you do this make sure to use the texture in the map (e.g: apply it to a wall in the map with hammer)
Place the texture(.vtf and .vmt) in: <steam dir>\Steam\steamapps\common\Portal 2\portal2\materials
And place the map file(.bsp) in: <steam dir>\Steam\steamapps\common\Portal 2\sdk_content\maps
And run Pakrat and do the same as sounds, but in case you can't look up:

"load pakrat and find your map file(.bsp) if its not there you need to compile your map just hit F9 in hammer. And once you have pakrat loaded press file/preferences and set the "Game Root Directory" to "C:\Program Files (x86)\Steam\steamapps\common\Portal 2\portal2"
And once your map is loaded press "auto" and it will say "<# of files> has been found on the disk would you like to add them?" Press Ok and then press File/Save BSP, now it should be packed now run the map, now post it on the workshop and it should work."

Now it should work, if not or you have a better way please comment and I'll look at updating the guide.
OLD GUIDE BACKUP/ARCHIVE
THIS IS THE OLD GUIDE IN CASE IT GOT BROKEN WHEN UPDATED, if the most up to date version fails for you try to follow this one

Sounds First to do this you must have at least basic knowledge of hammer. First download Pakrat: http://www.bagthorpe.org/bob/cofrdrbob/pakrat.html Your sound file must be the .wav format(example: sound_test.wav) now once you create it put it in: "C:\Program Files (x86)\Steam\steamapps\common\Portal 2\portal2\sound" If hammer is running restart it and load the sound browser window and search for the file, if it doesn't work try to make a new file in portal2\sound (example: portal2\sound\testfile) if it does work, now you have to load pakrat, make sure that the sound is in "C:\Program Files (x86)\Steam\steamapps\common\Portal 2\portal2\sound" and that the map file(.bsp) is in: "C:\Program Files (x86)\Steam\steamapps\common\Portal 2\sdk_content\maps" if you don't do this it won't work, load pakrat and find your map file(.bsp) if its not there you need to compile your map just hit F9 in hammer. And once you have pakrat loaded press file/preferences and set the "Game Root Directory" to "C:\Program Files (x86)\Steam\steamapps\common\Portal 2\portal2" And once your map is loaded press "auto" and it will say "<# of files> has been found on the disk would you like to add them?" Press Ok and then press File/Save BSP, now it should be packed now run the map, now post it on the workshop and it should work. Note: sometimes the sound won't play when first packed, this doesn't mean that you did anything wrong, try to post it on the workshop under hidden(if you don't wan't to really post it yet) now have a friend test it or load it on another computer to test it. This does not work on some source games: Left for Dead 1/2, and any game that uses the .vpk workshop uploader. This works on the following games: Portal 2, CSGO and any game that uses the .bsp workshop uploader just change the directory to <steam dir>\Steam\steamapps\common\<game name>\ Textures Texture creation: Download VTFedit: https://developer.valvesoftware.com/wiki/VTFEdit Now find a image that you want be the texture(.img .png .jpg) now load VTFedit and press file / import or press: Ctrl+i, now find the image, and press ok on the next window now press file/save as... and save to: <steam dir>\Steam\steamapps\common\Portal 2\portal2\materials now press tools/Create VMT File, and press Create and save to: <steam dir>\Steam\steamapps\common\Portal 2\portal2\materials, And name it the same as the first one only put .vmt at the end, if you change the name it will not work. Texture Packing: When you do this make sure to use the texture in the map (e.g: apply it to a wall in the map with hammer) Place the texture(.vtf and .vmt) in: <steam dir>\Steam\steamapps\common\Portal 2\portal2\materials And place the map file(.bsp) in: <steam dir>\Steam\steamapps\common\Portal 2\sdk_content\maps And run Pakrat and do the same as sounds, but in case you can't look up: "load pakrat and find your map file(.bsp) if its not there you need to compile your map just hit F9 in hammer. And once you have pakrat loaded press file/preferences and set the "Game Root Directory" to "C:\Program Files (x86)\Steam\steamapps\common\Portal 2\portal2" And once your map is loaded press "auto" and it will say "<# of files> has been found on the disk would you like to add them?" Press Ok and then press File/Save BSP, now it should be packed now run the map, now post it on the workshop and it should work." Now it should work, if not or you have a better way please comment and I'll look at updating the guide.
16 Comments
grathe Oct 26, 2018 @ 7:38am 
You also can use BEEmod
TChapman500 Oct 23, 2018 @ 1:12pm 
Can you do a more advanced tutorial that includes creating custom overlay textures?
Salzmann69  [author] Jul 3, 2017 @ 12:02am 
idk a lot about sound files or sound file creation
Random__Furry Jul 2, 2017 @ 11:30pm 
Thanks for the guide, but I guess you could have mentioned that the WAV file must be 16 bits.
Nepcat Mar 9, 2017 @ 5:27am 
d
Souper Mar 4, 2017 @ 1:50pm 
What about unpacking then?
Salzmann69  [author] Mar 4, 2017 @ 1:45pm 
Even if that sounds like a decent idea, I don't think you can pack anything in a .vmf file, and besides don't pack anyting unitl your done with the map and ready to post it, its not worth it, now I may be wrong, and maybe you can pack stuff is a .vmf file but I don't know how, sorry.
Souper Mar 4, 2017 @ 1:36pm 
So the contents are in the map, and you don't have to repackage the sounds and textures everytime you want to test the map.
Salzmann69  [author] Mar 4, 2017 @ 1:25pm 
Why would you do that?
Souper Mar 4, 2017 @ 12:40pm 
What about packing into .vmf files?