| |
ConfiguringNow 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:
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
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:
Remember that you need to install these maps first (later in the guide). Just putting names won't install them. Modt.txt
But a HTML enabled motd.txt may contain HTML code with colors like this:
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
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:
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):
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:
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!
| |