How to find the correct file paths?

  • If you're asking a question make sure to set the thread type to be a question!

spacenoobs

L1: Registered
May 10, 2014
22
0
What is the correct file path for custom sounds?

Hi everyone...

so I'm building a nice map and I've put months of effort into this! OK so... I put a custom sound (in one area, not map-wide) into the map... but I can't get the custom sound to play :(

Here are the paths I'm using...

BTW I never DID figure out the file paths... the system just is so confusing I gave up trying to understand it.

I'm using bspzip...

sounds\misc\abc.mp3
E:\Users\theodore\Desktop\tf2 map stuff\custom mats\abc.mp3

In hammer the mp3 is being refered to with this path:

misc/abc.mp3

it's not working...

So I also tried entering these commands on the commandline
play sounds\misc\abc.mp3
play sounds\abc.mp3
play misc\abc.mp3
none of them played the sound!
 
Last edited:

Tumby

aa
May 12, 2013
1,084
1,192
Sounds that are outside of the 'appdata/common/team fortress 2' folder can not be played by the game.
Sounds 'obviously' go in the sound/ folder. Important note: Hammer can not preview .mp3s but it will still find them. If the sound brower can not find a sound, you are doing it wrong.
Also, you should keep your .vmf files in the default location of team fortress 2/content/mapsrc (folder names have changed a tiny bit since an update but only affect new installations. its still pretty much the same)

EDIT: Reread your post multiple times. Kinda hard to understand what's going on with all these "..."
Are you sure you are using an ambient_generic entity? If the sound is placed in tf/sound/misc/abc.mp3 it should show up as misc/abc.mp3. Make sure the sound is actually being told to play. If you want to play a sound multiple times, it might happen that you have to stop it first. Try playing around with already existing sounds just to make sure that your entity setup is correct.
 
Last edited:

spacenoobs

L1: Registered
May 10, 2014
22
0
I'm not sure what you are saying... it should be a pretty simple answer...

OK let's try simplify the question...

Given this path, in hammer...

misc/abc.mp3

What should be the path to give to bspzip... It's obviously NOT "sounds\misc\abc.mp3" as that's not working.
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Stop. Why are you using bspzip??
Bspzip is for placing files inside a bsp which you only need to do when sending the level to someone else.

Instead you should be making sure that the file you want to use are in the correct folder for TF2 to find them.

C://program files/steam/steamapps/common/team fortress 2/tf/sound/

Use that for your custom sounds. Both hammer and tf2 will find them if they are there.


Bspzip is not necessary to get hammer or tf2 to play custom sounds. Only when publishing a map.

If you truly are ready for bspzip:
C://program files/steam/steamapps/common/team fortress 2/tf/sound/misc/abc.mp3
Should become this once the file is packed inside the bsp:
sound/misc/abc.mp3
And then, as before, from hammer that's:
misc/abc.mp3
 

spacenoobs

L1: Registered
May 10, 2014
22
0
Stop. Why are you using bspzip??
Bspzip is for placing files inside a bsp which you only need to do when sending the level to someone else.

Because I'm sending the level to someone else ;)


If you truly are ready for bspzip:

I've been ready all my life...

C://program files/steam/steamapps/common/team fortress 2/tf/sound/misc/abc.mp3
Should become
sound/misc/abc.mp3
And then, as before, from hammer that's:
misc/abc.mp3

THANKS! I'll assume it works but I'll say later if it really works.
 

henke37

aa
Sep 23, 2011
2,075
515
It is fine to use bspzip for audio even when testing locally. The build tools have no need to access the custom content in that case.