Finding Where Content Is From
Intro
This article will explain how to fairly easily determine where a piece of content is coming from, i.e where precisely it is stored on your computer.
This can be useful to identify misbehaving addons and get rid of them.
whereis
This is the magic console command that can find where any game file is on your computer, including which addon exactly it comes from.
The developer console can be opened via ⇧ shift+escape or the tilde key `.
The usage format is as follows:
Here's an example:
This will display where the default main menu button hover sound is located on your PC, for example:
If an addon overwrites this sound, it will tell you what addon overwrites the file, like so:
The tricky part is to find the file path to give it. Below are some methods to find out the file paths for different content types.
whereis
.
Which slashes (/
or \
) are used is not important, they can be mixed.
Models
Models usually start with models/
folder. There are many different places a model path can be acquired, but the easier is to simply find the model in your spawnmenu in Sandbox (q by default) and right click on the spawnicon and press Copy to clipboard
:
This will copy the full path of the model to your clipboard, so the next step would just be to paste it to the whereis
command:
And voila, you now know where the model is located.
Other options
You can dump the entire list of loaded models using listmodels
console command.
Materials and Textures
Textures and materials usually start with materials/
folder. For these two, there's an easy way: mat_texture_list 1
. Entering this command will open a panel listing all currently visible textures.
Clicking on any of the textures will bring up a new panel with details about the texture, and the list of materials that use the texture.
The important part is the "Where Is" button in the top right corner of a texture sub-panel:
Simply click this button and then open your console, it should already contain the output of whereis
for the texture itself, as well as every material that uses it, like so:
mat_crosshair
Alternative way to get the material you are looking at is to use the mat_crosshair
console command. This will not work for models, but will work for map materials.
You will need to prepend materials/
and appent .vmt
to the path from the concommand's output:
Other options
You can dump the entire list of currently loaded textures via mat_dumptextures
console command, and the list of currently loaded materials via mat_dumpmaterials
. The lists will be huge and may not be entirely useful, but they are there.
Sounds
For sounds there are 2 options. Sound paths usually start with sound/
. Notice that it's "sound", not "sounds".
snd_showstart
Enter developer 1; sv_cheats 1
into the console for snd_showstart
to display anything.
After that enter snd_showstart 1
, and it will display every sound once, when it is starting to play, like so:
Once you see a sound path that looks relevant to your issue, copy it and add sound/
to the beginning, and paste the path into the whereis
command, for example for the sound )weapons\smg1\smg1_fire1.wav
, you'd enter the following:
Notice that we do not include the first symbol )
- that is one of several special symbols that change how the sound is played, and are not relevant to this article, so we simply skip them.
snd_show
The other option is snd_show 1
. This will display all currently played sounds in the top right corner of the screen, when playing on a map, like so:
This method also requires sv_cheats
, and the downside to this method is that you cannot easily copy the sound file path.
Otherwise the following steps are similar to the previous method, you'd just have to retype the path manually.