TF2 can't find a sound file I packed into the map

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,696
2,580
So... we still have problem, it turns out. Using VIDE to pack content into my map seems to have gotten everything except one of the sound files. It's referenced not by the map itself but through a custom level_sounds.txt override. Packing level_sounds.txt itself was no problem, since it clearly knows it's supposed to be looking for the custom sound file when I trigger it. But there's no sound, and the console says it can't find it. It was packed from the same location as the other sounds, which all work correctly. It's listed right there in the pakfile. I really don't know what else I could try at this point.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,258
999
VIDE doesn't scan your script files for other files to pack. It seems only to scan the BSP. You will always need to manually pack those files that are not referenced directly in your map or do not share the map's filename in some form.

Solutions:
  • Make up your own BSPZIP text file manually or using Egan's new utility that scans an existing map's pak file
  • Put all your content in a map-specific folder and include it using the VBSP parameter -embed
  • Use CompilePal's pack tool. It scans your script files for assets, packs only the model skins that are used in your map, and includes more assets that are referenced in the map such as custom rope textures. It is a true one-button comprehensive packer. You don't have to use it to compile the map, you can deselect the other steps.
I recommend CompilePal. I would marry it.
 

tyler

aa
Sep 11, 2013
5,102
4,621
I wish CompilePal was easier to use though. Every time I open it I have to remember how to use it again. It's not needlessly complex like VIDE is (why do we have to essentially save a packed BSP three times!?) but the UI is completely mystifying to me. The interactions to select compile options are so weird. Maybe I'm missing something.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,696
2,580
That's just it, though: I knew VIDE wasn't going to grab the file automatically since it wasn't directly referenced anywhere in it, and packed it manually, and the game still can't find it.
 

tyler

aa
Sep 11, 2013
5,102
4,621
Decompile Watergate and look at the custom sound directory structure/file types, is all I can say. I only say Watergate because it's recent, and works, and definitely has lots of custom audio files.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,258
999
Maybe the sound file became corrupt when it was packed?

I think you mentioned you converted a wav to an MP3 recently. You might want to try deleting all your sound.cache files from all your sound/ directories in tf/ including those in custom/. I had trouble with sounds I had converted a while ago and had to do that. For the release map I changed the filenames of the offending sounds so clients wouldn't have to do the same if they'd played previous versions. That map was also using a custom soundscript.
 

tyler

aa
Sep 11, 2013
5,102
4,621
Oh, I know TF2 is picky about sound files too--it might need to be a specific kind or bitrate of MP3/WAV.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,696
2,580
You might want to try deleting all your sound.cache files from all your sound/ directories in tf/ including those in custom/.
That might have done the trick, because it's working properly now. Looks like I might have to do that every time I pack the map in the future, too, because after another compile to add some stuff I had left out, I had the same issue until I had re-wiped the sound caches and packed again. Oy vey. Well, working is working, and that was the last technical hurdle. Crossing my fingers that the map gets featured on their Halloween show.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,258
999
As far as I know, Workshop maps still don't actually use packed custom sound scripts or soundscapes. So you might find they don't work anyway if you load your map from the Workshop.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,696
2,580
I'm not posting it there so that's not an issue. It's meant for a specific community server. Disappointed to hear that though.
 

ics

http://ics-base.net
aa
Jun 17, 2010
841
543
As far as I know, Workshop maps still don't actually use packed custom sound scripts or soundscapes. So you might find they don't work anyway if you load your map from the Workshop.

Same goes for .nav files for bots and such. Workshop never loads them/they don't run from workshop map origin file even though they are packed in the bsp.

As for sounds. Ever since TF2 went vpk files, loading even some custom sounds that are in the game are pain it the ass. You can't even preview or play them in ambient generic. You have to exract them from vpk's, place them in proper location and even then some files refuse to play ingame.