How to make your custom soundscapes work on the workshop

KaydemonLP

L5: Dapper Member
Nov 17, 2015
204
63
So I've seen a lot of workshop maps have somethign akin to
"THIS MAP HAS CUSTOM SOUNDSCAPES, WHICH DO NOT WORK WITH MAPS FROM THE WORKSHOP!
FOR WORKING SOUNDSCAPES DOWNLOAD HERE: X"

So I investigated and figured out a way to fix this problem. This guide will assume you already know how to pack files into maps.

First off, you need to actually upload the map to the workshop, it can be private, we just need it to get a workshop ID.

Once you did this, open its workshop page and copy the ID located at the end of the URL

upload_2020-5-29_18-23-56.png


Now, take your existing soundscape and rename it to:
"mapname.ugcWORKSHOPID.txt"
in this example it would be "koth_databank_b5.ugc2112251255.txt"

Now make a folder inside your scripts folder called:
"soundscapes_workshop"
and place the txt inside that.

Pack your map with this file now with your preffered method, keeping the local filepath
( aka "scripts/soundscapes_workshop/filename.txt" ).
This is how our example looks
upload_2020-5-29_18-30-18.png


Lastly, update the workshop entry with the new bsp.

Your map should be good to go now!
To test it, simply get your latest update to the map and use the console command
"map workshop/id"

I'd personally also put in the unaltered soundscapes file in case someone pulls it directly and puts it in maps.
 

puxorb

L69: Emoticon
aa
Dec 15, 2013
531
799
This is helpful! I always thought it would be somthing simple like this. I was avoiding putting my map on the workshop for so long because I had to link to somewhere else. I might have to recompile to make the fix unless there's a way to replace a .txt in an already packed map.
 

KaydemonLP

L5: Dapper Member
Nov 17, 2015
204
63
I might have to recompile to make the fix unless there's a way to replace a .txt in an already packed map.
A repacked map can be decompressed with the same parameter used to compress it in bspszip
Pakrat can edit filenames and filepaths of already packed assets ( however, when i did that originally, the txt got corrupted, so id suggest removing the txt and manually readding it with the proper name and path )
 

puxorb

L69: Emoticon
aa
Dec 15, 2013
531
799
I need to do this for level_sounds.txt instead of soundscapes. How should I change the filename?

Also why does this effect custom sounds but not particles?
 

KaydemonLP

L5: Dapper Member
Nov 17, 2015
204
63
I need to do this for level_sounds.txt instead of soundscapes. How should I change the filename?
That i did not look into, from what i can tell it should be
maps/workshop/mapname_level_sounds.ugcWORKSHOPID.txt

Also why does this effect custom sounds but not particles?
I am not sure, but there's two Functions to get a mapname one does just the filename itself, the other the full name and path with all the extras. Valve probably used the Full path when searching for level sounds and soundscapes, whereas only used the filename for particles.
Just speculation though.
 

KaydemonLP

L5: Dapper Member
Nov 17, 2015
204
63
Valve also has a bit of code that searches for the embedded nav file thats just called "embedded.nav", its looked up in a really wierd way to make sure that there's no embedded nav file outside of a BSP
 

GreenyDTH

L1: Registered
Aug 14, 2019
17
1
Sorry to bump, but I have two questions.
1. Does this work with sounds that use ambient_generic?
2. Where can I find soundscape or levelsounds so I can modify them into the txt files?