Left 4 Dead

Left 4 Dead

38 ratings
Install and configuring dedicated server [Windows]
By СТЕНОБИТКА
Step-by-step guide from installation to server startup and modification, according to your preferences

Руководство на русском языке тут
   
Award
Favorite
Favorited
Unfavorite
Before we start
To avoid any errors while running the server, you need to install the following software:
Microsoft .NET Framework 4[download.microsoft.com]
Install depending on the bit depth of your OS (both do not need to be installed):
Microsoft Visual C++ 5-8-10-12-13-17 Hybrid Redist x86[drive.google.com] Microsoft Visual C++ 5-8-10-12-13-17 Hybrid Redist x86-x64[drive.google.com] Original thread on the forum oszone[forum.oszone.net] (russian language)

! Important
If you do not install the above software, you may encounter errors related to the server crash (for example: server crash when changing the map without any logs with an error, etc.)
Downloading and installing server
Download steamCMD utility:
Unpack the utility in any folder, for example: C:\steamcmd
Run steamcmd.exe and wait until the utility is updated to the latest version



Downloading the server:

Option # 1: Downloading the server manually by entering commands in turn
login anonymous force_install_dir. app_update 222840 validate quit
Explanations on the commands:
login anonymous - login to the server without an account force_install_dir - the server installation folder (the dot means that the server is installed in the steamcmd folder and will be located in the folder steamapps\common\) in order to install to another folder you need to specify the exact path app_update 222840 validate quit - the server ID is specified, the validate command starts checking the files for matching the original ones, the quit command closes steamcmd after downloading the server

Option # 2: Creating a script to automatically start the server installation

In the folder steamcmd create a text file run.txt and enter the line:
steamcmd +login anonymous +force_install_dir. +app_update 222840 +quit
Save the file, change the extension from .txt to .bat you will have the file run.bat

Open the file run.bat and wait until the server is loaded


When the server is fully downloaded, you will see the following in the console:

Installing basic mods and configuring them
After downloading the server, we proceed to install the basic mods that will be the basis of the server

METAMOD:
Download metamod from one of the links below:
Stable version[sourcemm.net] Beta version[sourcemm.net]
For metamod version 1.10 and above, you must additionally download the file metamod.vdf for Left 4 Dead under the link:
vdf[sourcemm.net]
Go to the link above, select Left 4 Dead in the drop-down list and click the Generate metamod.vdf button



Save the file metamod.vdf it will still be needed later

SOURCEMOD:
Download sourcemod from one of the links below:
Stable version[sourcemod.net] Beta version[sourcemod.net]

Installing metamod and sourcemod on the server:

Installing metamod:
Open the root folder of the server, go to the folder ...\left4dead\ copy the contents of the metamod archive to the folder ...\left4dead\addons\; as a result, you will have the folder ...\metamod\ in the folder ...\addons\ and the file metamod.vdf, here we also copy our file metamod.vdf which we created on the site metamod[sourcemm.net] (copy with replacement)
The metamod setup is complete

Installing sourcemod:
Open the root of the server folder, go to the folder ...\left4dead\ copy the contents of the sourcemod archive to the folder ...\left4dead\addons\; as a result, you will have the folder sourcemod in the folder ...\addons\ and also in the folder ...\left4dead\cfg\ will be the folder ...\sourcemod\ with the configuration files (I'll talk about them later)
Installing sourcemod complete

Initial configuration of mods:

The metamod setting is not required, so go to configuring the sourcemod

Configuring sourcemod

Adding an administrator to the server:

Go to folder by path ...\left4dead\addons\sourcemod\configs\
Open the file admins_simple.ini and add at the end of file this line:
"STEAM_1:1:10869027" "99: z"
Explanations:
The first quotes point to steam ID (in the format Steam2 ID) The second quotes indicate the immunity and the flag, in the example above, root is indicated, administrator with full rights
In addition to steam ID, you can use IP address or Player nickname (you can set a password, in order to avoid getting rights by another player with the same nickname)

Examples:
"!127.82.30.105" "bce" "USER" "abc" "password"
Immunity is assigned in the range from 0 to 99, i.е. an administrator with a smaller number can be kicked/banned by an administrator with a large number

Description of flags:
"Reservation" "a" //Reserved slots "Generic" "b" //Generic admin, required for admins "Kick" "c" //Kick players "Ban" "d" //Banning players "Unban" "e" //Removing bans "Slay" "f" //Slaying players "Changemap" "g" //Changing the map "Cvars" "h" //Changing cvars "Config" "i" //Changing configs "Chat" "j" //Special chat privileges "Vote" "k" //Voting "Password" "l" //Password the server "Rcon" "m" //Remote console "Cheats" "n" //Change sv_cheats and related commands "Root" "z" //Root is a magic access flag that grants all permissions
To learn your steam ID, start the game with the bots, press Esc, press ~ (tilde), open the console, type status
status hostname: [Your_server_name] version : 1.0.3.4 6830 insecure udp/ip : 192.168.0.23:27015 [] os : Windows Listen map : l4d_hospital01_apartment at ( 1974, 853, 494 ) players : 1 humans, 0 bots (4 max) (not hibernating) (unreserved) # userid name uniqueid connected ping loss state rate adr loopback# 2 1 "Your_nickname" STEAM_1:1:10869027 00:32 33 0 active 30000 # 3 "Francis" BOT active # 4 "Louis" BOT active # 5 "Zoey" BOT active #end
This steam ID add to the file admins_simple.ini with indicate the immunity and flag

You can go on a more difficult path, learn steam ID on the site:
Steam Calculator[steamdb.info]
Use any other site, I just give an example of one site, do not consider it for advertising

In the left box, insert your profile ID or link to your profile



There will be something like this https://steamproxy.net/id/76561198969735404/ click the button "Get disappointed in your life"

As a result, you will receive information about your profile, as in the example below:



The field Steam2 ID is shown in the screenshot above, and there is your steam ID

On this we have completed adding the administrator to the server
Initial server configuration
At this stage we have prepared server that needs to be pre-configured:

Creating a script to start the server in console mode

Create the file RUN.txt in the server root folder, open it and add the line:
@echo off cls echo Protecting srcds from crashes... title srcds.com Watchdog :srcds echo (%time%) srcds started start /wait /high srcds.exe -console -game left4dead +map l4d_vs_hospital01_apartment echo (%time%) WARNING: srcds closed or crashed, restarting... goto srcds
Save and change the extension to .bat, you will get the file RUN.bat

Explanations:
console - the server starts in console mode game - actually our game Left 4 Dead map - current map
Note, depending on the game mode, you need to correctly write map name

Examples:
For the "Co-op" mode: l4d_hospital01_apartment For the "Versus" mode: l4d_vs_hospital01_apartment For the "Survival" mode: l4d_sv_lighthouse
Explanations:
Maps for Cooperative mode: l4d_xxxxx01_xxxxx Maps for Versus mode (contain "vs"): l4d_vs_xxxxx01_xxxxx Maps for Survival mode (contain "sv"): l4d_sv_xxxxxx

Configuring server.cfg:

This is the main configuration file, from this file all server settings are read when starting and / or changing the map on the server

Go to folder by path ...\left4dead\cfg\ create a text file server.txt open it and enter the lines:
hostname "Server_name" //Server name rcon_password "password" //Password for server management (RCON) sv_lan "1" //1-Internet + LAN, 0-LAN mp_gamemode "versus" //Game mode (coop, survival, versus) z_difficulty "hard" //Difficulty (easy/normal/hard/impossible) sv_allow_lobby_connect_only "0" //Allow connection to the server directly

Save the changes in the file, change the extension .txt to .cfg, now we have server.cfg file

Also in this file can contain common cvars and cvars of plugins (about this we will talk later)

This completes the initial configuration of the server
Starting the server
At this stage, we have a configured server ready to run.

To start the server, double click on RUN.bat, the console will start and all information about the server will be displayed in it:



After the server is started, the following commands are available:
stats - server statistics (use of CPU, FPS, number of clients, etc.) status - server status (detailed information about the server: server name, version and build of the server, server IP, OS type, current map and clients information) version - version and build of the server exit - restart the server

Let's check whether metamod and sourcemod are installed correctly:

type in the console:
meta and then sm



So if the server in the console shows the information as in the screenshot above, setting the mods is correct, if you get unknown command, then you did not correctly install the mod(s), you need to return to the chapter "Installing basic mods and configuring them"

In addition to the basic commands meta and sm, other commands are available, which are indicated in the screenshot above
Running the server and client on one PC
In fact, starting a server and client on one computer is not desirable, in terms of using large computer resources and server stability. But if there is not yet one computer at hand, we will use the same computer to install, configure plugins, as well as test the changes made

! Important
The usual behavior when trying to start the server and the game on one PC: the game may not start, or the server will throw an error or not start at all.

There is a solution :)

Create a shortcut to the file left4dead.exe (the main game file), usually the default game path:
C:\Program Files (x86)\Steam\steamapps\common\left 4 dead\left4dead.exe
Place the shortcut on the desktop, open the properties, in the field "Object" add a line after the closing quotes:
[blank]appid 500 -steam -novid
Explanations:
appid 500 - ID of our game Left 4 Dead in the steam -steam - indicates that the game is launched allegedly via Steam -novid - video skipping (optional)
Click OK

! Important
In order for the game to run without errors, the Steam client must be running (in any case without it you will not run the game)

Now you can try to start the server and the client (the game) at the same time. Do not forget to run the game with the shortcut that we place on the desktop:



Recommendations:
  • For the convenience of server testing, change the cvar sv_lan "1" in the file server.cfg to "0" for testing the server inside the local network, in order to avoid the connection of unwanted clients to the server or to set a password for the entry, the choice is yours
  • Start the game in windowed mode based on the size and resolution of your monitor, so you can conveniently monitoring the server console without detaching yourself from the server testing
Installing plugins
Plugins for metamod:
metamod website[sourcemm.net] forum alliedmods[forums.alliedmods.net]
Plugins for sourcemod:
sourcemod website[sourcemod.net] forum alliedmods[forums.alliedmods.net]
Also do not forget to go to the forum of not approved plugins:
forum alliedmods[forums.alliedmods.net]

! Important
To view the forum you need minimum knowledge of the English language, as well as do not forget to review all comments to the plugin, because you can skip the useful tips, bug fixes and new versions of plug-ins (unfortunately not all authors update the topic and to find a new version of the plugin you have to scroll through more than 100 comments, which is not always convenient)

Installing plugins for sourcemod:

Structure of sourcemod
Default path ...\left 4 dead\addons\sourcemod\
  • configs - folder of configuration files
  • gamedata - folder for files *.games.txt used by plugins
  • logs - folder for logs
  • plugins - folder of plugins
  • translations - folder for storing language plugin files
  • ...\left 4 dead\cfg\sourcemod - folder with configuration files of plugins

Consider the installation using the plugin for example "SuperVersus":
plugin page[forums.alliedmods.net]
Click to the link, scroll to the end of the post, click on Get Plugin, download the file l4d_superversus.smx copy the file in folder plugins, default path:
...\left4dead\addons\sourcemod\plugins\
Start the server with the file RUN.bat, wait for the full load, close the server. Return to the server folder, proceed along the path:
...\left4dead\cfg\sourcemod\
Find the file l4d_superversus.cfg, open it and start editing for your needs.

Structure of cfg files generated for customizing plugins
(in rows from top to bottom):

1. Description of the cvar
2. Default value
3. Minimum value of cvar
4. Mmaximum value of cvar
5. Cvar with value

Example of the configuration file l4d_superversus.cfg

// Change Difficulty // - // Default: "0" // Minimum: "0.000000" // Maximum: "1.000000" director_auto_difficulty "0" // Infected spawning rate Multiplier (multi*(survivors-4)). Requires director_auto_difficulty 1 // - // Default: "0.25" // Minimum: "0.000000" // Maximum: "1.000000" director_ci_multi "0.25" // SI HP Multiplier (multi*(survivors-4)). Requires director_auto_difficulty 1 // - // Default: "0.00" // Minimum: "0.000000" // Maximum: "1.000000" director_si_hpmulti "0.00" // In coop, spawn 1 more SI per extra player? Requires director_auto_difficulty 1 // - // Default: "1" // Minimum: "0.000000" // Maximum: "1.000000" director_si_more "1" // Delay in seconds added to z_ghost_delay_max for SI bots spawning in versus // - // Default: "5" director_si_more_delay "5" // Tanks HP Multiplier (multi*(survivors-4)). Requires director_auto_difficulty 1 // - // Default: "0.25" // Minimum: "0.000000" // Maximum: "1.000000" director_tank_hpmulti "0.25" // Once a player connects, 2: Put in random team, 1: Show teammenu, 0: Do nothing // - // Default: "2" // Minimum: "0.000000" // Maximum: "2.000000" l4d_autojoin "2" // Allow extra first aid kits for extra players. 0: No extra kits. 1: one extra kit per player above four // - // Default: "1" // Minimum: "0.000000" // Maximum: "1.000000" l4d_extra_first_aid "0" // Max amount of infected (will not affect bots) // - // Default: "4" // Minimum: "4.000000" // Maximum: "24.000000" l4d_infected_limit "12" // Should we clear Lobby reservation? (For use with Left4DownTown extension ONLY) // - // Default: "1" // Minimum: "0.000000" // Maximum: "1.000000" l4d_killreservation "1" // 3: Enable teammenu & commands, 2: commands only, 1: !infected,!survivor,!join only, 0: Nothing // - // Default: "3" // Minimum: "0.000000" // Maximum: "4.000000" l4d_management "2" // Respawn alive when joining as an extra survivor? 0: No, 1: Yes (first time only) // - // Default: "1" // Minimum: "0.000000" // Maximum: "1.000000" l4d_respawn_on_join "1" // Maximum amount of survivors // - // Default: "4" // Minimum: "1.000000" // Maximum: "24.000000" l4d_survivor_limit "12" // If player is afk on versus, 0: Do nothing, 1: Become idle, 2: Become spectator, 3: Kicked // - // Default: "1" // Minimum: "0.000000" // Maximum: "3.000000" l4d_versus_afk "1" // If less infected players than l4d_infected_limit in versus/scavenge, spawn SI bots? // - // Default: "1" // Minimum: "0.000000" // Maximum: "1.000000" l4d_versus_si_more "1"
So that you do not get confused, which plugin created this or another configuration file, at the beginning of .cfg file indicates which plugin created this file:
// This file was automatically generated by SourceMod (v1.9.0.6132) - This file was created by Sourcemod (version) //ConVars for the plugin "l4d_superversus.smx" - Cvars for the supervisus plugin
And so, after configuring the configuration file, save it, start the server and start testing the plugin.

To check if the plugin works correctly and / or is loaded, write in console sm plugins list
sm plugins list [SM] Listing 17 plugins: 01 "Admin File Reader" (1.9.0.6132) by AlliedModders LLC 02 "Admin Help" (1.9.0.6132) by AlliedModders LLC 03 "Admin Menu" (1.9.0.6132) by AlliedModders LLC 04 "Anti-Flood" (1.9.0.6132) by AlliedModders LLC 05 "Basic Ban Commands" (1.9.0.6132) by AlliedModders LLC 06 "Basic Chat" (1.9.0.6132) by AlliedModders LLC 07 "Basic Comm Control" (1.9.0.6132) by AlliedModders LLC 08 "Basic Commands" (1.9.0.6132) by AlliedModders LLC 09 "Basic Info Triggers" (1.9.0.6132) by AlliedModders LLC 10 "Basic Votes" (1.9.0.6132) by AlliedModders LLC 11 "Client Preferences" (1.9.0.6132) by AlliedModders LLC 12 "Fun Commands" (1.9.0.6132) by AlliedModders LLC 13 "Fun Votes" (1.9.0.6132) by AlliedModders LLC 14 "Super Versus Reloaded" (1.8.15.5) by DDRKhat, Marcus101RR, and Merudo 15 "Player Commands" (1.9.0.6132) by AlliedModders LLC 16 "Reserved Slots" (1.9.0.6132) by AlliedModders LLC 17 "Sound Commands" (1.9.0.6132) by AlliedModders LLC
As you see the plugin loaded, if you see in console before the plugin "Error" or "Disabled" then this means that the plugin is either not properly installed or has errors, try using the command sm plugins refresh (reload all plugins) to which the console responds:
sm plugins refresh - command to restart all plugins [SM] The plugin list has been refreshed and reloaded. - sourcemod response on reloading all plugins
After that, try the sm plugins list command again to check whether the status of the plugin has changed or whether it remains the same.

! Important
If the problem with the plugin remains, I recommend you to download it again or search for a new version (maybe there was a bug in the new version, this was fixed, but sometimes the problem remains, you can search for the old version), and also look for an alternative plugin with similar functions.

When most plugins are installed, conflicts between plugins should not occur, but it happens that similar plugins (with similar and / or using the same cvar / functions) can conflict, which in turn affect the stability of the server.
Finally
I also recommend that you get acquainted with the list of cvars if you plan to make a very modified server (but be careful, some cvars in plugins can duplicate and / or perform similar actions, which can be conflicts, server crashes and etc.)
all cvars / commands in the list: 4429

Explanation of the cvar table:
1. The "Cvar" itself 2. The identifier of "cvar" (i.e. cmd means that the cvar is a command, and it can be executed only through the console, if there is a digit there is a variable that can be changed to the required one 3. The key of "cvar" (i.e. the key "cheat" means that this cvar can greatly influence the game situation, I did not find a full description of all these keys, so I will not describe the rest (just for now, maybe later) 4. The description of the "cvar" Examples: addip : cmd : : Add an IP address to the ban list. bind : cmd : : Bind a key. buddha : 0 : , "sv", "cheat", "nf" : Survivors take damage but won't die
Сhangelog
05.01.2018
- first version of this guide
- translate all content from Russian version of guide
- some small changes

13.09.2018
- correction of grammatical errors

14.10.2018
- corrected links
- added the section "Plans"

06.02.2019
- correct some mistakes

09.03.2020
- correct some mistakes
Plans
* Add a list and description to the most popular plugins for various game modes in my opinion
* The simplest examples for editing the source code of sourcemod plugins to fit your needs, and compiling
From the author
Many thanks to all people who share information, and who always lend a helping hand when it is needed.

This guide I wrote for those who wanted to create their own personal server (maybe even local, for playing with friends), but did not understand and / or did not get something, due to difficulties with English (or maybe other reasons ) gave up this difficult matter.

It took me a very long time to create my server (namely, to study materials on forums, attempts to create a server and its hosting, etc.)

But with the help of this guide you will not spend much time!

In any case, good luck in creating a server!

Forgive me for my imperfect English! Good luck, Have FUN!!!
17 Comments
СТЕНОБИТКА  [author] 15 Apr, 2021 @ 6:37am 
jpcapone, thanks
jpcapone 14 Apr, 2021 @ 7:07pm 
I just want to say thank you and WELL DONE!!!!
Efwaz 7 Apr, 2021 @ 11:40am 
oh ok, i understand, thanks you so much for your support, and time.
СТЕНОБИТКА  [author] 7 Apr, 2021 @ 10:14am 
Efwaz, if you see your server on gametracker.com , it means that it is visible all over the world and you have a white IP (in other words, a unique IP), but as to why your server does not show, it may be due to filtering, i.e. servers with the largest number of players are shown, empty ones may not be shown, try asking on the Steam forum about that, maybe someone knows how to deal with this
Efwaz 7 Apr, 2021 @ 6:00am 
welp, the sever is in gametracker, its one of the bottom of the list but there it is, but, what doy you mean with "white ip"?
СТЕНОБИТКА  [author] 7 Apr, 2021 @ 12:48am 
Efwaz, You can check the "visibility" of your server on the site https://www.gametracker.com/search/l4d/

Also, for the server to be visible, you need a white IP
Efwaz 6 Apr, 2021 @ 7:34pm 
Hi, i rent a server, already added plugins and so, but when i use the "openserverbrowser" to search for my sv in the general list, it doesnt appears, i even asked some friends to check it out but they didn't find it neither, but we realized that it shows up in the general list when theres people in it, maybe do you know about this issue and help me please? thanks
СТЕНОБИТКА  [author] 24 Nov, 2020 @ 5:04am 
Haigen, Some steps are required to configure the server, I wrote the instructions as clearly as possible
Haigen 23 Nov, 2020 @ 3:33pm 
Would all those steps be required if i only want to create a local server with mods (admin system to ban griefers steam ID)?
СТЕНОБИТКА  [author] 9 Aug, 2020 @ 12:23am 
TheUselessRobot, first check this

1. Start the server and check if your server is listed on gametracker.com

2. You must also have a direct connection (not through a router) and a white IP

And also you may need to set the cvar sv_allow_lobby_connect_only "1" to play through the lobby, try this as one of the options