Hello Gamers!
I bet we all like this game! So here are some of the examples how to make it better!
To enable console, set the developer console to enabled in game menu.
Commands can be chained using ";".
Example: bind x "sv_cheats 1; z_spawn boomer; z_spawn hunter; z_spawn smoker; z_spawn mob; sv_cheats 0; vocalize playerhurrah;"
will toggle cheats on/off and drops you a pretty surprise when X key is pressed.
You can store your commands in a "autoexec.cfg" or "myCommands.cfg" file you create in a text editor like Notepad and put it in C:\Program Files\Steam\steamapps\common\left 4 dead\left4dead\cfg. It will get executed when your server runs. You can also execute a particular config file, e.g., "die.cfg", by using "exec die.cfg" in the console.
sv_cheats 0
thirdpersonshoulder - toggles character view mode (bugged shotgun sounds)
bind <key> "<action>" - binds an action / multiple actions to a key
example: bind x "vocalize smartlook" (very handy in game)
kick <character> - kicks the selected character from the game
example: kick Zoey (getting rid of the bots)
sb_add - fills empty bot slots with fresh bots (spawns kicked bots)
crosshair - toggles crosshair visibility - 1337 mode (boolean 0/1)
net_graph <number> - shows connection, fps and other info overlay in game ( no overlay 0 - full info 4)
map <name> - loads selected map while in game menu (start with "l4d" to get console hint on map name)
changelevel <name> - loads selected map while in-game (start with "l4d" to get console hint on map name)
mm_dedicated_search_maxping <value> - as a Lobby Leader, you can specify the max ping values for server search (default 250)
spectate - moves you to the spectator mode (also handy in VS to change autoswitched players back)
cl_playerspraydisable - toggles player spray texture visibility (boolean 0/1) - thx to ZENTRiERER <hVn>
voice_recordtofile - starts/stops recording microphone inputs to voice_micdata.wav in game dir (boolean 0/1)
startmovie <parameters> - starts recording the gameplay (explore the parameters in console)
example: startmovie testmovie jpg wav jpeg_quality 75
endmovie - stops the recording
record <demoname> - records a demo (.dem file)
stop - (stops demo recording)
playdemo <demoname> - replays a saved demo file
demoui / demoui2 - opens up demo playback control interface
disconnect - disconnects you from the server
retry - retries connection to the last server used (bugged atm)
status - shows user and other information in console (only usable in-game)
example: team_desired "Survivor Bill"
openserverbrowser - opens up the classical server browser
report - opens up an overlay with info about the current game
hide_message_panel - hides the report overlay
find <string> - searches the console commands for the specified string
_restart - reboots the engine
mm_dedicated_force_servers "ip1ort1" - forces a specific server connection from a lobby leader
sv_cheats 1
noclip - fly mode
thirdperson - Tomb Raider camera view
god - IDDQD mode (boolean - 0/1)
kill - kill yourself with generic damage
explode - kill yourself with explosive damage (same effect as kill)
z_spawn <character> - spawns a desired character or mob at your cursor (or parameter "auto" to spawn it out of view, see ex. 2)
example1: z_spawn witch / z_spawn mob
example2: z_spawn "tank" auto
z_common_limit <number> - changes the limit of zombies drawn at one time
give <item> - equips your character with item or effect desired
example1: give molotov / give ammo / give health (anti-knockdown)
example2: give oxygen_tank / give propane_tank / give gas_can
givecurrentammo - refills your current main weapon ammunition
sv_infinite_ammo - current weapon gets infinite ammunition (boolean 0/1)
nb_delete_all - clears all infected, bosses and bots in the area
director_force_panic_event - calls a horde
director_panic_forever - neverending panic event trigger (boolean 0/1)
nb_blind - infected become blind (boolean 0/1)
cl_drawhud - removes HUD elements from screen (boolean 0/1)
boom - spawns an active pipebomb at your feet
fire - spawns an active molotov at your feet
warp_all_survivors_here - instantly ports everyone to cursor position (handy when the bots are a bit away)
sb_takecontrol - you take control of the bot desired
example: sb_takecontrol Bill
z_tank_has_special_blood - changes tank's blood to a darker sample (boolean 0/1)
z_gun_kick <value> - adds a kick effect to all the guns
sv_crash - if an admin ever screws with you on a sv_cheats 1 server, use this to crash him
host_timescale <value> - changes the game flow speed (useful for video editing)
cl_glow_blur_scale <value> - controls the halo size around characters/objects, use 0 to disable the glow entirely
sb_dont_shoot - survivor bots will no longer be able to fire (boolean 0/1)
sb_dont_bash - survivor bots will no longer be able to melee (boolean 0/1)
ent_setname <name> - sets a name for the targetted entity (even a player)
ent_fire <entity> <commands> - executes commands on specified entity (thx to AbyssMaker)
example: ent_fire griefer ignite will set the "griefer" on fire
z_gun_swing_vs_amt_penalty - toggles the melee fatigue VS functionality (boolean 0/1)
hidehud <parameter> - hides parts of the HUD
example: hidehud 4 - hides the whole HUD
r_drawviewmodel - toggles visibility of your 1st person view model - eg. arms, guns... (boolean 0/1)
vs_max_team_switches <value> - sets the maximum allowable team switches during a round
Useful Examples
L4D Community Autoexec
A configuration file with many gameplay related improvements, glow pulsing effects, netcode tweaks, thirdperson mode, etc. based on community scripts and updated regularly.
Newest releases along with full info can be found here.
Lamb 2 Slaughter fix
sv_cheats 1;
achievement_reset L4D_ACHIEVEMENT_INCAP_AFTER_SAFEROOM;
sv_cheats 0;
For the people with Lamb 2 Slaughter achievement not showing on their Steam Left 4 Dead stats page, these commands are a working fix. More details here, many thanks to FredWP. You WILL HAVE TO get this achievement again in-game, but afterwards it will show on the stats page correctly.
thirdpersonshoulder accuracy fix
Bind "insertkeyhere" thirdpersonshoulder;
c_thirdpersonshoulderoffset 0;
c_thirdpersonshoulderaimdist 720;
c_thirdpersonshoulderheight 10;
cam_ideallag 0;
This centers the wrong aim camera for the thirdpersonshoulder view mode, has to be input to autoexec.cfg.
Enhanced red crosshair: (sv_cheats 0)
cl_crosshair_alpha "100" (default 255)
cl_crosshair_red "255" (default 138)
cl_crosshair_green "0" (default 182)
cl_crosshair_blue "0" (default 220)
cl_crosshair_thickness "1" (default 2)
cl_crosshair_dynamic "1" (accuracy/recoil autosizing - default 1)
This setting WILL stick on game reset. Feel free to edit the colors to your liking ofc.
Scoreboard with NetGraph: (sv_cheats 0)
bind "TAB" "+sb";
alias "+sb" "+showscores; net_graph 5";
alias "-sb" "-showscores; net_graph 0";
This will toggle a net_graph 5 / net_graph 0 command on TAB press. Thanks to eram & linfosoma.
Also has to be used in autoexec.cfg or else, otherwise the alias binds will be lost on game reset.
Joining your OWN/SPECIFIC server: (sv_cheats 0)
mm_dedicated_force_servers "server_ip:server_port";
or
sv_search_key "<yourserverkey>";
(usable in lobby by a Lobby Leader)
or
connect "server_ip:server_port";
to join a game in progress.
Single player Campaign Infected play: (sv_cheats 1)
sv_cheats 1;
director_force_versus_start;
mp_gamemode versus;
sb_all_bot_team 1;
Then press the default "M" key to switch to Infected. Bots will progress normally through the level and you can own them to your liking. Keep in mind that single player campaign maps don't have zombie ladders visible, however still functional. With "z_spawn" special and normal infected key binds this really turns to sort of a Zombie Dungeon Master.
Single player VS Infected play: (sv_cheats 1)
sv_cheats 1;
mp_gamemode versus;
sb_all_bot_team 1;
changelevel <level>; (console offers you level name hints, VS maps start with l4d_vs_)
Press default "M" to join Infected.
Hunter Walljump single player training: (sv_cheats 1)
sv_cheats 1;
director_force_versus_start;
mp_gamemode versus;
director_no_death_check 1;
jointeam 3;
wait 50;
nb_delete_all;
z_spawn hunter;
to spawn as a Hunter (no need for "give health" after the newest patch). You can find the advanced walljump techniques pioneered by Kaizoku in this thread. A video showing some of the highly advanced jumping can be seen here. You can see a jump curving tutorial here.
A Hunter City training map can be downloaded here.
A Hunter Training map (perfect for learning from scratch) to be found here.
Character/Item glow: (sv_cheats 0)
Variables here.
These vars WILL be changed to default values on game reset unless you specify them in autoexec.cfg (l4d/cfg folder). More on this here. Setting these values to 0.0 will remove the glow completely for a more "realistic" experience.
My Glow script: (sv_cheats 0)
This script file changes the default glows to much more recognizable and logical ones, original thread and code here. Many thanks to fakyio for the effort.
Creating props: (sv_cheats 1)
Prop_dynamic_create;
Prop_physics_create;
Details here.
Rambo mode v1.5: (sv_cheats 1)
sv_cheats 1; nb_delete_all; director_force_panic_event; director_panic_forever 1; callvote ChangeDifficulty Hard; z_common_infected 50; z_gun_kick 1; hidehud 4; vocalize playerincoming;
Enjoy the pain and glory.
Personal Rosetta radial command menus: (sv_cheats 0)
Original thread here.
A preformatted "Fort Builder" radial menu by Dusty33 here.
Achievement progress check: (sv_cheats 1->0)
sv_cheats 1; achievement_status; sv_cheats 0;
To check your achievement progress in game. Failed achievements will be marked "FAILED" in console (unexpectedly).
Pitch Black mode (disabling fog): (sv_cheats 1)
sv_cheats 1; fog_override 1; fog_enable 0;
Amazing feature, only really usable indoors though (outdoors like Blood Harvest reveal horizon textures).
Incremental demo recording:
Very handy script for game footage recording, can be "downloaded" here. Has to be copied to autoexec.cfg. You can toggle start & stop demo recording with F8 the script uses or change it to something else.
Useful Vocalize Samples
laZee has parsed the data and wrote an incredibly useful Vocalize Command Browser for you - see it here. This should solve out all the "what is the vocalize for this & that" questions. Keep in mind that a lot of those commands are conditioned (require a certain place/event) and will not work universally.
You can find most of the working character specific vocalize lines here.
Common useful vocalize samples include...
SmartLook
AskForHealth2
PlayerStayTogether
PlayerHurryUp
PlayerWatchOutBehind
PlayerIncoming
Numpad Key Codes
1 = kp_end
2 = kp_downarrow
3 = kp_pgdn
4 = kp_leftarrow
5 = kp_5
6 = kp_rightarrow
7 = kp_home
8 = kp_uparrow
9 = kp_pgup
0 = kp_ins
Period = kp_del
Enter = kp_enter
Plus = kp_plus
Minus = kp_minus
Slash = kp_slash
* = kp_multiply
Debugging variables
vcollide_wireframe - renders physics collision models in wireframe (boolean 0/1)
sv_showfootsteps - shows client and server footsteps (boolean 0/1)
z_debug_spawnable_areas - draws areas mobs can spawn from (boolean 0/1)
z_vomit_debug - visualizes the Boomer vomit trajectory (boolean 0/1)
condump - dumps the console output to a .txt file
cam_showangles - prints view and camera info to screen when in thirdperson
sv_showhitboxes <entity> - sends server-side hitboxes for specified entity to client
cl_ent_bbox - shows the bounding box for the entity you crosshair-aim at (thx to nrpBrain)
director_report - opens us an overlay with director status report
GL HF in powing the pub