Home
Discussion Forums
Introduction
Starting Up
Updating
Configuration
Server Hardware
CVARs
Networking
Remote Admin
Voice Compression
Ressource Tweak
Custom Maps
Promoting
Metamod
Admin Mods
Bonus Stuff

Configuring

Now that you got your server running all properly, it's time to customize and configure it. The configuration is mainly done in three different files:

  • mapcycle.txt
    The file which contains the rotation cycle order for your maps.
     

  • server.cfg
    The main configuration file that contains configuration variables (CVAR) and also commands to run other files configuration files.
     

  • motd.txt
    The message of the day file (the screen that's displayed when you join a server). Not really a configuration but more a customisation.

 

Please note that I'm going to be using the Counter-Strike game's files as example throughout this website (Why? 1. It's my favorite game 2. It's very popular). These important files are placed in the mod's directory... In C:\HLServer\cstrike if you're running a dedicated server and in C:\Program Files\Steam\SteamApps\YOUR EMAIL\counter-strike\cstrike if you're on Steam.

Mapcycle.txt
Let's get started by editing the first file which is mapcycle.txt... Open the file in a simple text editor such as Notepad and this is what you should see:

de_airstrip
cs_havana
de_chateau
de_aztec
as_oilrig
cs_siege
de_cbble
de_dust
cs_747
de_prodigy
cs_assault
cs_office
cs_italy
cs_backalley
cs_militia
de_train

If you've played Counter-Strike a bit you probably guessed that this is a map list, and you're right! This is the map rotation list for the server. This means that if you boot your server with no default map (that means putting no -map MAPGOESHERE parameter) your server will then load the first map on the list and will go on like that in order. If you do use the GUI or instructed the server to start with a map then the server will load the first map on the list during the mapchange. If you supply the default map, after the time is finished it will load the first map from the list and so on. To make your server more popular, leave only the popular maps on the list... And if you ever install custom maps you can add those to the list. Use only one map per line.

Here's how custom maps would appear on the list:

rats_final
aim_map
awp_map

Remember that you need to install these maps first (later in the guide). Just putting names won't install them.

Modt.txt
Motd.txt file contains the message of the day! This is the introduction screen when somebody joins your server. There's a cool new feature in 1.6 that allows you to put HTML code... But that's supported only in a couple of games (Counter-Strike and Day of Defeat). A non HTML motd.txt would look like this:

MESSAGE OF THE DAY
Welcome to Counter-Strike 1.5

Map Rotation For This Server:


de_airstrip
cs_havana
de_chateau
de_aztec
as_oilrig
cs_siege
de_cbble
de_dust
cs_747
de_prodigy
cs_assault
cs_office
cs_italy
cs_backalley
cs_militia
de_train

But a HTML enabled motd.txt may contain HTML code with colors like this:

<p><font size="2"><font face="Courier"><font color="#FF0000">MESSAGE OF THE DAY</font><br>
<font color="#FFFF00">Welcome to Counter-Strike 1.6<br>
<br>
Map Rotation For This Server:</font></font><br>
<font face="Courier"><br>
</font></font><font size="2" face="Courier" color="#00FF00">
de_airstrip<br>
cs_havana<br>
de_chateau<br>
de_aztec<br>
as_oilrig<br>
cs_siege<br>
de_cbble<br>
de_dust<br>
cs_747<br>
de_prodigy<br>
cs_assault<br>
cs_office<br>
cs_italy<br>
cs_backalley<br>
cs_militia<br>
de_train</font></p>

HTML may seem complicated but there are a lot of tutorials for beginners (search on Google!). Remember that you can always use a WYSIYWG (what you see is what you get) editor to create your code. If you don't want to use HTML code for your message, simply write it in plain text and it will work.

Remember that this file is limited to 1KB of space and HTML may not contain any Flash nor JavaScript.

Server.cfg
This is where the real fun begins! The server.cfg file allows to configure your server using CVARS, which are basically variable or in other terms, options. Let's open up this file and see what we get:

// Use this file to configure your DEDICATED server.
// This config file is executed on server start.

// disable autoaim
sv_aim 0

// disable clients' ability to pause the server
pausable 0

// default server name. Change to "Bob's Server", etc.
hostname "Counter-Strike 1.6 Server"

// maximum client movement speed
sv_maxspeed 320

// 20 minute timelimit
mp_timelimit 20

sv_cheats 0

// load ban files
exec listip.cfg
exec banned.cfg

Let's try to understand this file by disection. You can see that the lines that start with // contain phrases after... These lines are called comments (comments to help you know wich option is where for faster editing) and you begin a comment line by putting two frontslashes just like this:

//This is a looooooooooooooooooooooooooooooooooooooooong  looooooooooooooooooooooooooooooooooooooooong looooooooooooooooooooooooooooooooooooooooong looooooooooooooooooooooooooooooooooooooooong looooooooooooooooooooooooooooooooooooooooong looooooooooooooooooooooooooooooooooooooooong looooooooooooooooooooooooooooooooooooooooong comment line that has been wrapped to the next line, it's still one comment!
//This is another comment line
//And another
//I think I'm attacked by comments!!!!
//These lines can contain any character such as !@#%@#$^%#@~#!!@#~)(#@!&*%

I'm sure that you're saying to me that I forgot to the multiple lines for the first comment... Sorry but you're wrong this time, it's because that line is wrapped. Some text editors simply make a new line out of one one line so that you wouldn't have to scroll horizontally. Take away the "Wrap Text" option in Notepad and see what you get!

Next stop, the variables. In HLDS, the only way you can configure your server properly is by using variables... Most of the variables use Boolean values (1=yes and 0=no) Here are some examples of boolean variables (I included some "comments" to allow you to know what's happening):

//Diable autoaim
sv_autoaim 0
//Don't let people pause the server
pausable 0
//My server's name
hostname "The supa serva"
//Maximum movement velocity in pixels
sv_maxspeed 320
//20 minutes time per map
mp_timelimit 20
//disallow cheats
sv_cheats 0
//allow flashlight
mp_flashlight 1

I hope that you understanded that: one variable per line! Remember that you can also type variables and their values in the HLDS console or using RCON, but be warned that these settings won't be there when you restart your server and that's why I always recommend to use configurations files. After variables come the file loadings:

//load the banned players list
exec listip.cfg
exec banned.cfg

This prooves that you can even have multiple config files! Maybe you want a fun mode... So you could create a fun config file (fun.cfg), stick it to the same directory as config.cfg and then use the command "exec fun.cfg" in the console to execute the fun config. To have this working, you must have your custom configuratio files in the same directory as server.cfg or in other words, the game's root directory.

Also, in all configuration files, you can have put any console command you want... Even say!

For more variables, visit the CVARs section of this guide!

 


Home • About HLDS 101 • email • Contact • Terms Of Service • Legal Credit • Donate • Clan Hosting • Advertising • Paid Support