Portal 2

Portal 2

31 arvostelua
How to add custom sounds and textures to your workshop map
Tekijältä Salzmann69
UPDATED FORMATTING AND COMMENTS - 5/20/23
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
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 kommenttia
grathe 26.10.2018 klo 7.38 
You also can use BEEmod
TChapman500 23.10.2018 klo 13.12 
Can you do a more advanced tutorial that includes creating custom overlay textures?
Salzmann69  [tekijä] 3.7.2017 klo 0.02 
idk a lot about sound files or sound file creation
Random__Furry 2.7.2017 klo 23.30 
Thanks for the guide, but I guess you could have mentioned that the WAV file must be 16 bits.
Nepcat 9.3.2017 klo 5.27 
d
Souper 4.3.2017 klo 13.50 
What about unpacking then?
Salzmann69  [tekijä] 4.3.2017 klo 13.45 
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 4.3.2017 klo 13.36 
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  [tekijä] 4.3.2017 klo 13.25 
Why would you do that?
Souper 4.3.2017 klo 12.40 
What about packing into .vmf files?