Saturday, December 6, 2008

Left4Dead MOTD Banners

Wanna customize your Message of the Day (MOTD) and Host Banners in Left4Dead? Well, here's how to do it ...

Originally I followed this guide but I ran into issues with the host banner which displayed html code rather than the image that it pointed to.















In the above screen you can see my customized host and MOTD banners along with the names of the files that control which images you see - host.txt for the host banner and motd.txt for the MOTD banner. These files are located in the /hlds/l4d/left4dead directory on your server.

Now the images that you select will be resized depending on the screen resolution of the players connecting to your server. So I made my images the following sizes (which should support a resolution of 1920 x 1080:

host banner - 605 x 121

MOTD banner - 1076 x 538

So I created both of my banners as .jpg files and uploaded them to photobucket.

Next we need to look at the html template that we need that will point to the images that we uploaded.

<html>
<head><title>Left 4 Dead 411</title></head>
<body style="margin:0px;padding:1px;background:#000000;">
<img src="URL for host or banner image" style="width:100%;height:100%;" />
</body>
</html>

Copy and paste this into two new files named host.html and motd.html - just make sure that you change the "URL for host or banner image" part according to your URLs for the host or banner images on photobucket.

Upload host.html and motd.html to some webspace that allows public access - I used Sitesled to host mine for free!

On the server you just need to edit host.txt to contain the URL to your hosted host.html file and then edit motd.txt to point to your motd.html URL.

Now in theory you should be able to put the contents of the .html files that we created directly into the host.txt and motd.txt files on your server and have it work - but I found that (for whatever reason) the host banner simply would not work - it displayed html code instead of the banner image. That is why I hosted mine as .html files - and once I did that everything worked.

The only additional issue that I had is that the motd image seems to be resized smaller and then streched slightly (rather than being viewed at its native size) at higher reolsutions - so my advice (if you experience this issue) is to keep your text fairly large so that your MOTD does not look bad.


So here you can see what the host banner looks like in game by pressing the Tab key.

25 comments:

Jesse said...

I couldn't for the life of me figure out why the html in the text files wasn't working...and then I found this guide.

Thanks a bunch!

~ Ged

CTerrian said...

Is there a way to edit MOTD on local computer? In other words, if I use my game computer to host a game (not dedicated), can I edit the MOTD?
Currently, mine looks like this:
http://f.imagehost.org/0509/motd.jpg

Mike said...

@ Jesse

You are welcome - glad that it helped!

Mike said...

@ CTerrain

I see no reason why you can't try to edit your local files.

First make a back of them before you change them (just in case).

The files that you are looking for are in C:\Program Files\Steam\steamapps\common\left 4 dead\left4dead - assuming that you have Steam installed on your C:\.

If you edit these files as per the guide and host your images / html on some free webspace it should work the same way

CTerrian said...

Okay, I've got mine working, but I don't see the "host" banner. I've added "http://www.oldephartz.com/cterrian/host.html" on my site, and the picture is "http://www.oldephartz.com/cterrian/host.jpg", but when I hit "H" in the game, only the MOTD is shown.
Forgive my nOObneSS.

Mike said...

4When you say you don't see it do you mean that the area for the banner does not exist or that the image that you specified doesn't appear there?

Your image is the right size - so what does your host.txt on your local drive say and your host.html on your webspace also?

CTerrian said...

I was using the "Local Computer" option in the lobby, and that only uses the MOTD. Since I setup a dedicated server in my basement, I now see the Host and MOTD. Thanks for your help. Now I have another problem. I can't seem to login via the console to make changes like sv_cheats 1 or 0. I've set the rcon_password in the server.cfg, but the server isn't responding to my commands.

Mike said...

Well is this is in your server.cfg

rcon_password "pw"

Then when you load up L4D and connect to your server. Open the console and type:

rcon_password pw

Then hit enter.

You should then be able to issue rcon commands ...

CTerrian said...

Hey Mike, if you could email me at trichoufio@farifluset.mailexpire.com
I could show you my server.cfg. Don't worry about me having the email address posted, as it will only last a couple of hours. ;)
But I have more questions. Thanks.

Mike said...

The best thing to do is post your questions in the appropriate forum here: http://www.left4dead411.com/forums/index.php

I am a member of this forum also.

MiG said...

Well I tried the file share site and did not get a answer. I am using mediafire to host my files.I have done all the steps but I am not clear about the HTML info. I have a host and motd text on my desktop with the links from mediafire. I open them with internet explorer and have saved them as Webpage complete html and HTML only. I have uoloaded them to mediafire and I copy the share links and put those links in my host and motd text files. then I upload them to our server and I get a blank screen for the motd and the host windows. What am I doig wrong??? USMCc*M][G

Mike said...

Are your hosted .html files publicly available i.e. available without logging in to the website?

Post your code if you like ...

MiG said...

Thanks Mike for the quick response.
My name is Mike also. I am not sure on that one.Doh!!! I tried the sitesled link and the site its self. Do you know of any other free host?
Thanks again for folloing this blog so well..

Mike said...

You could try http://xtreemhost.com/

MiG said...

Hey Mike I created an account with extreem and I saved the files as HTML. I uploaded the files to extreem and copied the code for each file to a motd and host file for our server. the images do not show up but the text code does.
I am going to try something different and hope it work.Do I need to save the files,to upload to extreem as HTML only or HTML complete?
I tried to post the html code here but it will not let me...


There is also the direct link code and the IMG code. Did I use the correct code?
thanks for your patience and help here....
TY Michael [USMCc]*M][G
www.usmcc.com

Mike said...

What program are you using to edit your html? I just copied and pasted in to notepad and saved as .html

I would use the direct link code so that it looks exactly the same as the examples I provided (but with your image links instead of mine).

MiG said...

I have notepad but I do not have an option to save as a html file.I have been opening my files with IE and then saving them as HTML complete or HTML only...

usmccmig said...

Hey Mike. Good News. I downloaded a text editor called Notepad ++.
I was able to save the text as HTML and uploaded it and now my MOTD image shows uo on our server but the HOST image does not. It shows the text code only. I did what you suggested anf made the images the size that you suggested.
Got any other thoughts on this?
Thanks again
Michael...

Mike said...

Glad that it is half working at least!

Without being able to see exactly what you are doing I'm not sure why the host one is not working for you ... :-(

MiG said...
This comment has been removed by the author.
MiG said...

I have tried everything including redoing everything for the HOST banner.here is our server ip and you can see what is happening...
68.232.166.188:27015 USMCc Left4Dead Server.
If you can email me I can send you the code I have for my host image and see if there is something wrong with it.
Email = michael.kastner@gmail.com
Thanks Mike
USMCc*M][G

MiG said...

Here is the darnest thing. When I put the code for my HOST banner in our forums the HOST image shows up.. This has me baffeled.

CTerrian said...

Email me your HTML code. As a fellow retired veteran, I'll host it for ya.
qyolnintoo@garrifulio.mailexpire.com

MiG said...

Thanks CT got it workin' now.
Here is a Question for you and Mike. Is there a way to have the MOTD as a flash movie. Real short..
Is there a way to embed the link???
Thanks again guys...

Mike said...

AFAIK there is no way to embed flash ...