Frequently Asked Questions
How do I enable the console?
The console is disabled by default and the easiest way to get to the console is to navigate to Options>Keyboard>Advanced
and check the box for Enable Console
. Pressing the tilde/grave key, "~", will open up the console. You may also rebind the console, using the toggleconsole
command. Ex. bind "c" "toggleconsole"
How do I enable developer mode?
After you have access to the console, you may use the command developer 1,2
to toggle dev-mode. Using zero will turn dev-mode off, using 2 enables all features.
The command ent_messages_draw 0,1
, which is also useful for helping to debug and trace entity actions in-game.
I tried using a command, but it said I needed to enable "cheat" mode. How do I enable cheats?
The cvar for enabling cheats is the same as Half-Life, sv_cheats 1
and of course, use zero to turn it off.
How do I find a cvar or command in-game or I forgot a command I was working with earlier, how do I find it?
Source has a feature which will allow you to literally find commands and cvars within the console itself, chances are you will never forget that command again.
Simply type find
and follow it by the keyword you are looking for and press your return key. The results, color-coded, will be listed in your console.
You may also use the old-fashioned syntax, cvarlist mp_
to search for commands starting with a specific set of numbers or letters or even symbols. In the above example, the console will print every resulting command that begins with mp_
Also, typing the first few letters of a command will enable a drop-down list of commands that can help auto-complete your typing, this is also useful to browse specific types of commands.
I can't find the r_speeds command, where or what is it?
function has been replaced by a new one called +showbudget
. In order to use this effectively, you should bind it to a key (bind "b" "+showbudget"
). This will allow you to press that key and toggle the read-out on or off. This new command will help pin-point some troublesome areas during mapping. This requires sv_cheats
to be set to 1.
I heard there are some commands to change rendering and help troubleshoot in-game, what are they and how do I use them?
There are several commands which can be used in-game, with sv_cheats
set to 1.
- mat_bumpmap 0, 1 - toggles rendering bumpmaps (requires cheats enabled)
- mat_specular 0,1 - toggles rendering specular reflection (requires cheats enabled)
- mat_leafvis 0,1 - toggles drawing a wireframe box around the current leaf, useful for debugging visibility in your map
- mat_wireframe 0,1 - toggles drawing a wireframe box on geometry (for checking brush splits), (requires cheats enabled)
How do I bind keys or what is bind-toggling?
To bind a key in Source, it is essentially the same as usual, following the syntax bind "p" "jpeg"
will literally 'bind' the specified key to take a screenshot, compress it in jpeg format and place it in your game's folder.
Source introduces a nice feature called bind-toggling
. Basically it works the same as a bind, however it is used to toggle instead of impose an action, such as press-and-release. In order to bind-toggle, you need to use the bindToggle
command. Ex. bindtoggle "o" "mat_show_texture_memory_usage"
- this bind will turn the command on and off each time you press the 'O' key. The command itself places a small area on your HUD which reads the amount of texture memory currently being used. In theory this command works with any normal boolean command (using 0 and 1 to designate on or off).
Where do I see my current FPS or similar info?
The commands to measure FPS are similar to the original Half-Life and thusly, the statements about them are likely true as well. To simply measure fps, you may use the command cl_showfps 2
, however in the original Half-Life this method was not always deemed "accurate".
Alternatively, to see your bandwidth use as well, you may use the command net_graph 1,2,3
where 3 will not deduct any FPS from normal gameplay. You may also change the position of the netgraph, by using the command net_graphpos 1,2,3
What is the "material texture list" and how do I access it in-game?
The materials texture list is a feature that can be used for a variety of purposes. One of the most obvious is to view the used textures in a map to see how they mix with other textures in-game. The command is actually a press-and-release type, like +showbudget
, so you will need a key to work this properly (it will take up most of the screen and prevent movement usually). Bind the command using the following example, bind "t" "+mat_texture_list"
At the top are four checkboxes. Directories will show you the structured folders the textures are stored in and using the box to show texture memory usage changes the mat_show_texture_memory_usage
cvar to display the figure on your HUD.
How do I take screenshots or how do I take certain types of screenshots?
By default, your screenshot key will take a screenshot, compress it and save it as a JPEG image. This is the normal way to take screenshots in Source and the command is simply jpeg
. Ex. bind "F12" "jpeg"
To change the quality or compression factor for future JPEG screenshots, use the command jpeg_quality 90
where 90 represents the default compression of 10%. This means your picture will still maintain a quality level of 90, this is a very decent JPEG with minimal loss of quality.
To take an unaltered TARGA (*.tga) screenshot, you would use the screenshot
command, similar to the snapshot command from Half-Life 1.
All screenshots are numbered and placed in the appropriate game's "screenshots" folder. Targa screenshots are not named according to the map name.
How do I place spawn-point entities or How do I configure the Hammer editor for a specific game/mod?
Foyleman wrote out the steps in the forums and here they are.
- Go to the Options dialog of the editor.
- Select the appropriate game you wish to work with.
- Under Game Data Files, there is a list of installed *.FGD files, add or remove the files you wish by clicking the appropriate button.
- Restart the Hammer editor for the changes to take effect.
In Counter-strike, I cannot join a team or How do I add spawn points to my map?
In order to actually join a game on a map in Half-Life 2 you need a spawn point. By default, you will be using the info_player_start
entity for Half-Life 2.
For Half-Life 2: Deathmatch you will need to use info_player_deathmatch.
For Counter-strike, you will need to use info_player_terrorist
While all *.FGD files should include the info_player_start
entity, only game-specific configs will include their respective entities. To map for Counter-strike, you need to use cstrike.fgd
, for Half-Life 2: Deathmatch you will need hl2mp.fgd