Last edit: 12/27/2019
I created this guide because my friends & I wanted to do some 5 player campaign co-op. When searching the internet for a complete guide all I found were multiple support threads with details hidden within. Any "complete" threads I found either had techniques that no longer worked or did not give enough details to begin with. After finally getting this to work and having 20+ tabs open I thought I would make it easier for those who want to do the same. There may be typos, some stuff may be unclear, or I may have forgot something since I did this a month ago now but please comment and let me know. I will fix it and try my best to keep this updated as any software versions change. I took the time to bother writing this up and am open to suggestions so please be nice in the comments. I did not write all of the below text. Some was copy/paste since I was not going to re-write just to claim it as my own. I tried to give credit where I took information but if I forgot anything just let me know.
Please note, I only tested this with all friends on my physical LAN so I cant promise it will work the same if everyone is connecting over the web.
Some of the below text came from this guide:
<- Link Dead with Steam Forum change
I used the console version of the dedicated server. Download the Windows SteamCMD program here: https://steamcommunity.com/linkfilte...r/steamcmd.zip
Now the first thing you want to do is extract this program to a directory like C:\SteamCMD
After you have done this, open a command prompt within the folder where you previously extracted or navigate to it in the prompt
Once the command prompt is in the right folder type "steamcmd" without the quotes then press enter. The program will update itself then give you a Steam> prompt.
At the Steam> prompt, type "login anonymous" without the quotes
At the Steam> prompt, type "force_install_dir c:\L4D2DS" without the quotes which will tell SteamCMd where to download the files. You can change L4D2DS to whatever you want.
Next type "app_update 222860 validate" without the quotes which will download the Dedicated Server files. 222860 is the ID for L4D2.
After it has finished downloading your server will need a server.cfg file to run. Create a new plain text file named "server.cfg" without the quotes in the C:\L4D2DS\left4dead2\cfg folder.
Here is the cfg file I used: https://od.lk/d/MjRfMjc2MDY4NV8/server.cfg
There is a lot of extra stuff in there since I grabbed someone else's file as a base online but it doesn't hurt and gives you an idea of what you can do.
You should give your server a name in this file next to hostname.
You can also set the max players you want next to sv_maxplayers. At some point you may hit a cap.
Create a shortcut:
To start your server it is easier to use a shortcut. From your desktop open the right click menu and select > new > shortcut. Enter the following into the target field "C:\L4D2DS\left4dead2\srcds.exe -console -game left4dead2 +map c5m1_waterfront" without the quotes. From my limited understanding the server needs a map or it wont start up. When I tried to take the map out my server no longer worked correctly. If you want to see other map names you can find them in the L4D2 maps folder.
Start the server with the map you wish to play. If you want to play a custom campaign map like I did you can use the VPK.exe in the free "L4D2 authoring tools" (download via steam) to break down a custom VPK file and find the map name for your mod in the maps folder. You just drag the .vpk file onto vpk.exe within the "\Steam\steamapps\common\Left 4 Dead 2" folder and it will extract into a new folder of the same name as the vpk files. I did this for the Death Mountain Zelda mod and found the map name for the first chapter was "dthmnt_village". If I wanted to start mid-way through I could use "dthmnt_temple3rdfloor" just as an example. There are guides out there on how to use the tools to open a VPK, it's very easy.
Installing the mods:
We will need to install some mods to get the 5+ player co-op to work.
Metamod, Sourcemod & L4DToolz:
The below text was copied from the following link since they did a better write-up than I would. Go there for more details. Their 5+ player co-op instructions didn't work for me though:
<- Link Dead site seems to be down
SourceMod is server modification for any game that runs on the Half-Life 2 engine. It is a powerful, highly optimized platform for scripting plugins and handling server administration. The default package comes with a base set of plugins, but there are over 450 plugins in the community. These parts of the guide will explain how to install SourceMod and MetaMod to your game. First we need to download the latest stable version of Sourcemod https://sm.alliedmods.net/smdrop/1.1...59-windows.zip. Open the zip folder and you will see two folders addons and cfg. Extract the addons and the cfg folder to your desktop and goto L4D2DS\left4dead2\addons. Open the addons folder on your desktop and move both the MetaMod and SourceMod folder to your games addons folder. Now Open the cfg folder on your desktop and move the SourceMod folder to L4D2DS\left4dead2\cfg . You can now delete both the empty folders from your desktop.
First we need download the latest version of MetaMod from here https://mms.alliedmods.net/mmsdrop/1...71-windows.zip . Open the zip folder and extract the addons folder to your desktop again. Open it up and you will see a folder named MetaMod inside, move this to L4D2DS\left4dead2\addons. When asked if you want to merge the folders select yes. Finally we need to create a MetaMod.vdf for Left4 Dead 2 here https://www.sourcemm.net/vdf. Save it to your desktop and then move it to L4D2DS\left4dead2\addons.
Go here and download L4DToolz https://forums.alliedmods.net/showpo...postcount=1210 . Open the Zip folder and you will have 2 folders extract them both to your desktop and then move them to L4D2DS\ledt4dead2\addons, When asked to merge select yes.
In order to make the extra player slots useable you will need Bebop. You can grab the non-compiled version here https://forums.alliedmods.net/attach...7&d=1259334888 or grab this version I have already compiled https://od.lk/d/MjRfMjc2MDY3OV8/bebop.smx. Either way the .smx file needs to go in the L4D2DS\left4dead2\addons\sourcemod\plugins folder. The following will also need to be in your .cfg file like it is in mine.
sv_removehumanlimit "1" <- (It looks like this is no longer needed however leaving it in the .cfg won't hurt)
L4D(2) SuperVersus (Optional: If you want extra health packs):
When playing 5+ player co-op you may want extra health packs and to tweak enemies HP.
Download it from here: https://forums.alliedmods.net/showthread.php?p=830069
Copy l4d_superversus.smx to addons/sourcemod/plugins/
Copy l4d_superversus.cfg to \l4d2ds\left4dead2\cfg\sourcemod
You can edit this cfg file how you choose.
It was recommended that I add a few fixes to correct the following: Witch - when you have a clone of a survivor and one of them startled the witch. There is a high chance that the witch will attack the wrong clone. Charger Bump - If a charger hits a survivor clone and the next one survivor in its way is the same survivor model it will get stuck. Campaign Ending score - scoring goes bad when you have clones as well. You will see same scores for two survivors at the ending credits. If these are important to you Spirit_12 shared links to the files. Grab l4d2_bugfixes.zip here: https://github.com/Satanic-Spirit/l4...fixes/releases and defibfix.zip here: https://github.com/Satanic-Spirit/defib-fix/releases . Extract and merge both the extensions & gamedata folders from each archive into the l4d2ds\left4dead2\addons\sourcemod folder.Play using your server:
Now on the client computer. Launch the game.
Note: Since we want 5+ player co-op the instructions here will be different than using a server for a normal 4(max)-player game.
When creating a game through the lobby I could NOT figure out how to get more than 4 people in. Even after following many different tutorials to attempt to enable this the game would still say it was full after 4 people joined and the server would go into a "reserved" status. I saw a post that stated to use "sv_steamgroup_exclusive 1" in my server.cfg file however from the PC, when starting a game through the lobby on my server, the map would start to load and then I would be returned to the L4D2 title screen. If I comment out this option in my cfg file the server would load but that defeats the purpose since I cant have 5+ co-op.
BUT I did not give up. I tried connecting directly to my server and I did however get it working by selecting "Campaign" and to "Play on Steam Group Server". Your server should be somewhere near the top of the list with a low ping assuming it's physically in your home. Mine popped right up with the name I had set in my cfg file.
From here just have everyone connect to your server this same way and you all should be in. You can also have them connect by opening the console on their Client PC and typing in "connect xxx.xxx.xxx.xxx" without the quotes and replace the x's with your server's IP.
We set the map earlier in the shortcut when starting the server and this was done because when connecting to the server this way you don't get the option to pick a map. There are some console commands you can use to change maps if you google but specifying it in the shortcut worked well enough for me and how little I will use 5+ co-op.
Going Idle - What to do?!:
At one point we took a break and a couple of us went idle while we were all in the safe room. When we moved the mouse to join back in the screen asked which side we wanted to play (Infected vs Survivors). Not sure what infected would have done since we were playing co-op but the first guy was able to chose survivors however after 4 people were back in, the game would not let the 5th select either option and he had to drop back to the title screen. He tried to join again through the same way mentioned above but was given an error along the lines that "the game was no longer active" despite us knowing it was. The server still showed as unreserved in its console as well.
To solve this I went to my server's command window and entered "sv_steamgroup_exclusive 0" to put the server in a reserved status. From there I entered "sv_steamgroup_exclusive 1" to put it back to unreserved and he was able to join again the same way he originally did. Just a tip in case you experience this. Update
I had the same issue happen when my friends were over last weekend and unfortunately the "sv_steamgroup_exclusive" trick didn't seem to work. Perhaps this command no longer works in 2019. I tried but could not re-create the scenario a second time after they left but saw someone online suggest a work around. If you add "sv_cheats 1" & "sb_all_bot_game 1" to your server.cfg then the game should stay running even if everyone goes idle, just make sure you are in a safe room. Also if the (Infected vs Survivors) popup shows I found that if you just click survivor, spam mouse clicks to complete the "press fire to join the game" before it pops up again, and then select survivor a second time the popup will go away and you will be back in game.
If you want to at any time see your server's reserved status you can type in "status sm" without the quotes into the server's command console window. Next to "<not hibernating>" you will see either "<reserved>" or "<unreserved>".
Though this may seem like A LOT it's not actually very hard. I messed up and had to repeat these steps several times when figuring this out. Most could probably do this in under 15 minutes minus download time.
Updating your server
L4D2 updates are still coming and to run the server you need to have the latest version. If you let your server sit without playing for a few months you will most likely need to update the next time you wish to use it. As of the last date I listed on top you can safely update your server by doing the following.
The first thing I do is take a copy the entire L4D2 server folder and save it someplace separate. This way if the update breaks the L4D2 server I have a backup I can revert to.
Now what you want to do is navigate to the folder where you extracted the SteamCMD (C:\SteamCMD) and open a command prompt.
Once the command prompt is in the right folder, like you did before, type "steamcmd" without the quotes then press enter. The program will update itself then give you a Steam> prompt.
At the Steam> prompt, type "login anonymous" without the quotes
At the Steam> prompt, type "force_install_dir c:\L4D2DS" without the quotes which will tell SteamCMD where to download/update the files. Change L4D2DS to whatever you ued previously.
Next type "app_update 222860 validate" without the quotes which will download/update the Dedicated Server files. 222860 is the ID for L4D2.
After this you are done, go ahead and boot your updated server.
Below are the versions I run in case future versions break anything:
L4D SuperVersus v1.5
L4D SuperVersus v1.5.4
Metamod Source v1.10.3
Metamod Source v1.10.7
L4DToolz v22.214.171.124h (Note:
v126.96.36.199RC3 did NOT work for me)
Bebop 0.2 beta