Part 4 : Extras.  Host and MOTD banners, Exclusive servers and lobby.

How do you change the banners on your server?.. How do you connect to your server if you create a new lobby ?..  Yes,  I had those same questions when my server was up and running,  the first one about the banners was an easy one.. the one about creating a new lobby and connecting to your server.. that one required some Console magic. was no problem after Valve fixed the Steamgroup servers.


This is part 4 of a 4 part series on how to set up and config a Left 4 Dead 2 dedicated server on CentOS Linux.

Part 1 : Setting up the environment and installing the server

Part 2 : Firewall configuration

Part 3 : Monitoring the dedicated server.

Part 4 : Extras.  Host and MOTD banners, Exclusive servers and lobby.


4a ) Banners.

For this I have to thank the guys at Left4Dead411.com who wrote a good summary on the best way to go about creating MOTD and Host banners for Left 4 Dead 2.  Their article can be found here http://left4dead411.com/left-4-dead-server-motd.

The Host and MOTD banners are in fact just webpages that are displayed ingame in their boxes,  what most people do is show an image but you could in theory put whatever you want there as long as it’s a web page.

But for this we will go with the basics,  a simple image for both Host and MOTD.  For this to work you need to be able to host web pages,  many ISP’s offer basic web hosting to their customers.  For the HOST Banner go and create a graphic that is 605×121 pixels and for the MOTD create a 1076×538 pixel image. Upload them somewhere,  and create two webpages,  they can be named whatever but for simplicity’s sake I’ll go with host.jpg and motd.jpg for the images and host.html and motd.html for the pages.

Both webpages have the same source code but with the path to different image (one for the MOTD and the other for the Host banner) :

<html>
<head><title>Left 4 Dead 411</title></head>
<body style="margin:0px;padding:1px;background:#000000;">
<img src="<path to my image>" style="width:100%;height:100%;" />
</body>
</html>

Next we need to edit the host.txt and motd.txt files on the server,  these files are located in left4dead2/left4dead2 folder,  NOT the folder where server.cfg is located.  In each file you put the url to the respective html file.  After this is done you restart the server and the changes should take effect.

If I am unclear about this check out the original Left4Dead411 article.

4b ) Hosting lobby games to your server

EDIT : It seems that Valve has fixed the steamgroup servers.  You can now host a lobby and choose SteamGroup server as server type and choose your server that way. I’m leaving this here since the steamgroup servers might break again in some future update and this might come in handy then.

Valve being the laid back types they are have shitty support for SteamGroup servers,  you’d think it would be simple to start a lobby and use your server to host the game but you’d be wrong.  In order to use your private server to host a lobby game you need Console magic.

To enable console you have two options,  the easy one means starting the game and going to Options -> Keyboard/Mouse -> and enabling “allow developer console”,  then restarting the game and then you press the ” ´ ” key, which is on the left side of 1 for most keyboard layouts, to open the console.  This however doesn’t work for me since I have a weird keyboard layout (Icelandic) so what I do to get the console is I added “-console” to the Launch Options for Left 4 Dead 2, This starts the console automatically when I open the game,  however it disappears after I go into some menu and I’ve given up on trying to remap the console key to some key other than ” ´ “. So I just do my magic when I start the game if I intend to play with some friends on the server.

EDIT : To almost fix the console for non-US keyboard layouts you need to enter the command “bind \ toggleconsole” in the console that appears when you start the game with -console. This enables the console for the ” ´ ” key. I know this sounds weird since \ is nowhere near that button but it works for me and others who have tried it.  However the console will not work in the main menu or lobby,  only ingame which is useful for most situations like executing rcon commands.

What is the magic you ask?.  It’s a simple console command that forces you, as the lobby leader, to connect to a specific server.  Open the console and type in “mm_dedicated_force_servers <your ip address>:<Port>” for example

mm_dedicated_force_servers 123.123.1.12:27016

After this you start the lobby as normally (Play with Friends -> Create Lobby). Make sure the Server type is “Official Dedicated“, I know there is a “steamgroup server” in the list of server types but that doesn’t work as retarded as that is. Next edit your game settings, change the map, difficulty etc. etc, invite your friends, if you want you can make this a public game and then press start when you’re ready.  you should now be connecting to your server.

That’s it for this series,  Now go and have some fun :)

Tagged with: