This
page is split up into sections for easier access - if there is anything else
you would like to see on this page, let us
know. |
||||||||||||||||||||||||||||||
Requirements |
|
|||||||||||||||||||||||||||||
High Bandwidth Connection The most important factor in how well your server will run
is how fast your connection to the Internet is. When people connect to your
server to play, you have to share that bandwidth with them. At the very
minimum you need an ISDN connection (256 kb/s or more). Ideally a server will
be running through a DSL or T1 connection. If you run a server and the
bandwidth you are providing to the people that connect to you isn't enough,
they are going to experience lag because your machine can't send them enough
information. CPU Power Your computer is going to be doing a lot of work when
people connect to it, and the amount of work that it needs to do increases
dramatically as more people connect to your game. To be able to service a
full game, you are going to want at least a Pentium II 266, but the more CPU
power the better. RAM RAM is something that you really can never have enough of.
Any time your machine doesn't have enough RAM it will start using a swap
file, which is much slower. At the minimum you are going to want 64 MB of
RAM, but 128 would be ideal. |
||||||||||||||||||||||||||||||
The Basics |
|
|||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The Configs |
|
|||||||||||||||||||||||||||||
Although these are the four basic config files that a server uses, you can
create other configs to run as well. There are some server manager type
programs out there that will create their own config files, so don't be
afraid of these files or wonder why they exist as the server manager program
runs them in it's own execution. |
||||||||||||||||||||||||||||||
Beyond The Basics |
|
|||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Server & Client On
Same Machine |
|
|||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Teamplay |
|
|||||||||||||||||||||||||||||
So,
in using "mp_teamplay
21", that turns on teamplay, but
teammates take no damage from either direct or explosive weaponfire, because
the sum of those three settings equals 21.
Some mods are by default a teamplay mod, and therefore the "mp_teamplay
<#>" variable does not work. But, usually in these mods,
there is the opportunity to add more realism by adding the ability of
teammates to shoot each other. On the other hand, there are TK's (Team
Killers) which no one likes - these clients kill teammates to get their
weapons, ammo, special powers, etc. - so you can turn off this ability so
that teammates cannot harm each other. To allow the realism, add the
variable "mp_friendlyfire
1", and to disallow teammates
hurting each other, add "mp_friendlyfire 0" to the server.cfg.
Another necessary Teamplay cvar is "mp_teamlist
<teamname/modelname;teamname/modelname>". For example, say you wanted a team named The
Gordons using the gordon model, and a team named The Zombies using the zombie
model, you would use the line "mp_teamlist The Gordons/gordon;The Zombies/zombie". Many people forget to add the
teamnames - no problem, just add those in there and you should be good to go. |
||||||||||||||||||||||||||||||
Minimum / Maximum
Rates |
|
|||||||||||||||||||||||||||||
For
example, if you run a large maxplayer server, and do not want cable jockeys
stealing all the bandwidth and irritating the HPW's, then you can set the
maximum rate allowed on the server to 6000 by using "sv_maxrate 6000". This will not boot
any LPB's from the server, but does force them to a rate of 6000 or below,
allowing for a more even spread of the bandwidth between players. Similarly, if you wanted to run a server
specifically for a handful of LPB's, you can set the minimum rate allowed to
around 9000 using "sv_minrate
9000". This obviously
will not kick any HPW's from the server, but it does force their rate to 9000
and above, which will make their game almost unplayable, and maybe they will
drop on their own. You
can also use both in combination with each other. In playing
around with some servers, I found some interesting combinations. I
have a Counter-Strike server running with an 18 maxplayer
limit. It was fascinating playing with these settings and watching
how they dramatically affect player's pings. After a few hours, I
found the best combination for this particular server was sv_maxrate 6500 and sv_minrate 2000. With
a server with a larger
maxplayer limit, you may want to lower your maxrate to keep the bandwidth reasonable for all the
players. On the other hand, if you run a smaller more personal server for you and a few friends in the neighborhood, you
may want to make sv_maxrate
20000 and sv_minrate 9000. Similarily, if you run a LAN, you may want to skip using the sv_maxrate variable and only set sv_minrate 10000 or above. Also, if you run a server on a cable connection, you may have already noticed how much cable
connections seem to fluctuate. You may want to set sv_maxrate 8000 and
sv_minrate 4000. Whatever the number for the cable server, keep them closer together to lessen the fluctuating rates. **NOTE: I have gotten a bunch of emails (even some flames - sheesh, settle
down kids!) about my mention in the last paragraph of how I noticed a change
in people's pings when I played around with the settings. Although
these newly introduced settings do limit rates, they CAN affect ping as
well. Prime example: the server I did all of my testing on has an
OC3 connection which I can regularly connect to with an average 60 ping -
yes, I am an LPB. For this reason, I have always had my client
rate set to 20000. I began playing with the maxrate on this server
and set it to sv_maxrate 6000, at which point my 60 ping shot up to 250, and
I was getting major slideshow action. The server would only allow
me to play at a rate of 6000, but my game was pushing to get a rate of
20000. My ping did not return normal until I manually set my
client rate down to 5500. Then I was back to the ole 60 ping
whoopin' up on everyone. Later I went to another server that had a
maxrate of 40000 and my client rate was set to 3500. My ping was at
190, but after resetting my client rate to around 30000, my ping went back
down to 68. If the difference between the server rate and the
client rate settings are too large, then a conflict occurs, and in some cases
makes the game unplayable. You can manually change the client
rate, but if your connection does not allow you to match the server allowed
rates, then you may choose to drop from the server due to
unplayability. Get it? Got it?? Good!!! |
||||||||||||||||||||||||||||||
Rcon |
|
|||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Kicking / Banning |
|
|||||||||||||||||||||||||||||
We have all come across those obnoxious people who purposely kill teammates,
constantly spam messages or the obnoxious types who do not leave your server when
you forgot to make your clan match private. It is time to kick
them. But first, an important
warning: Do not be the obnoxious
server admin who just randomly kicks people for fun or because you are a
control freak. The only thing worse than an obnoxious client, is an
obnoxious admin. Think
before you kick - watch you server and
people's actions and reactions. If two people blame each other for
something, either kick them both, or keep an eye on them for awhile until you
can feel out the situation enough to make a fair assessment. Before we get into the kicking and banning, we need
to get familiar with how players are identified by the server. The
server assigns each player a "userid" (a number
generated by the server) and a "uniqueid" (this
number is unique per cd key and is assigned by WON, and will usually be
around 10 digits). To find these id's for a player, type "users" into the console. Kicking Only
Obviously, the most common way to kick a player is to simply type "kick <playername>", and *poof*, they are gone.
Unfortunately, this may not always be the quickest way to boot a player,
because some clients change their names to horrifically long names, or use
characters that HL does not pick up on, hence making their name unusable in
the kick command. When this happens, you can use the other method of
kicking by use of "userid" (this one I prefer). First
type "users" into the server console. This will
list all players and their corresponding "userid".
Find the id number of the player in question, and then type (make note of the
spaces, because the spacing must be exact) "kick
# <userid>" (as in "kick <space> # <space> <userid>", and once again, *poof*, they are gone. Banning Only
Kicking a player is only temporary, though. They can come back into the
server immediately if they wanted to... unless you ban them. Use
the "users" command to find their "uniqueid", and then ban them with "banid <minutes>
<uniqueid>", where
<minutes> is the number of minutes you want to ban the player from the
server. Use 0 minutes to make the ban permanent. For example, if
you wanted to permanently ban uniqueid 123456789, then you would type "banid 0 123456789". If you want to make sure that someone
is banned permanently even after your server has been restarted, be sure to
"writeid" before you quit the server to write the
banned uniqueid's to the banned.cfg. Then, add "exec banned.cfg" to your server.cfg, so
whenever you restart your server, it will read the uniqueid's listed in the banned.cfg and continue to ban them. Kicking And Banning At Same Time Sometimes
we come across that player that needs to be kicked and banned at the same
time, so they do not come back in after being kicked while we are frantically
trying to type in the ban commands. Now, we can do both in one
fell swoop. Type "users" to get the
players "uniqueid". Then use "banid <minutes>
<uniqueid> kick". And
*poof* - the player in question has been both kicked and
banned. Again, be sure to "writeid" in
the console next, and add "exec banned.cfg"
to the server.cfg. Getting List Of Banned Players It
is a good idea to keep a list of the users that you have banned permanently
from your server. The easiest way to do this is to "writeid" at the console before you quit the server to write the banned
user "uniqueids" to the banned.cfg
for. You can then open up banned.cfg to see who
all has been banned. Also, be sure to add "exec banned.cfg" to your server.cfg so that
everytime the map changes or the server restarts, it will reban those
uniqueid's. Removing Player From Ban If
you want to remove a player from the banned list, use the "removeid <uniqueid>" in the console. And be sure to
remove it from the server.cfg found in the directory of the mod you use for your
serverif you placed it there as well. VERSION 1.0.1.2 AND BELOW
We have all come across those obnoxious people who purposely kill teammates,
constantly spam messages or the obnoxious types who do not leave your server
when you forgot to make your clan match private. It is time to kick
them. But first, an important
warning: Do not be the obnoxious
server admin who just randomly kicks people for fun or because you like being
in control. The only thing worse than an obnoxious client, is an
obnoxious admin. Think
before you kick - watch you server and
people's actions and reactions. If two people blame each other for
something, either kick them both, or keep an eye on them for awhile until you
can feel out the situation enough to make a fair assessment. Kicking Only
The most common way to kick a player is to simply type "kick <playername>", and *poof*, they are gone.
Unfortunately, this may not always be the quickest way to boot a player,
because some clients change their names to horrifically long names, or use
characters that HL does not pick up on, hence making their name unusable in
the kick command. When this happens, you can use the other method of
kicking (this one I prefer). First type "keys" into the server console. This will list all players with
their CD Keys numbers to the left of their name, from 1 to <player
max>. Find the corresponding key number to the player in question,
and then type (make note of the spaces, because the spacing must be exact)
"kick
# <key#>" (as in "kick <space> # <space> <key#>", and once again, *poof*, they are gone. Banning Only
Kicking a player is only temporary, though. They can come back into the
server immediately if they wanted to... unless you ban them. Use
the "status" command to find their ip address, and then
band them with "addip
<minutes> <ipaddress>",
where <minutes> is the number of minutes you want to ban the player
from the server. Use 0 minutes to make the ban permanent. For
example, if you wanted to permanently ban ip address 24.95.92.138, then you
would type "addip 0
24.95.92.138". Also, be
sure to "writeip" before you quit the server to write the
banned ip address to the listip.cfg for later use. Last, add "filterban 1" to your server.cfg so
whenever you restart your server, it will read the ip addresses in the
listip.cfg and continue to ban them. Also, if the person you are trying
to ban has a dynamic ip addy, and changes it so they can come back in to keep
bugging you, then ban
their entire subnet. Back to our
example, if you wanted to ban the entire subnet of the ip address
24.95.92.138, you would type "addip 0 24.95.92".
Notice that the last set of numbers was left completely out. If
you check your "listip.cfg" after you "writeip", you will notice that it shows "addip 0.0 24.95.92.0" The zero on the end acts as a wild
card, and anyone whose ip address falls within that subnet is banned. |
||||||||||||||||||||||||||||||
Clan Battle Mode |
|
|||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Linux Server |
|
|||||||||||||||||||||||||||||
In the event that you have not yet downloaded the latest linux version of the
dedicated server, you can download
the linux server from Won.net. The latest version of the server
is 3014 (which is used with client version 1013). The full version is
at ftp://ftp.won.net/pub/half-life/server/linux/hlds_l3014.tar.gz,
and the update is at ftp://ftp.won.net/pub/half-life/server/linux/hlds_l10103014.tar.gz. Once
you have this downloaded, you need to create a directory for it: "mkdir /usr/games/halflife". Then you will change into that
directory using "cd
/usr/games/halflife". Once
there, you will untar the file with "tar xfzv /path/to/hlds_l3014.tar.gz" or "tar xfzv /path/to/hlds_l10103014.tar.gz" depending on which version you
downloaded. Now we need to get the server to access the shared library
(libhlwon.so) - this can be accomplished in one of two ways. The
first way (symlinking the libhlwon.so into /usr/lib/) is easier for linux
newbies to understand and use, as well as being good for people who want the
server up and running fast, and do not care to setup a script to set the
environment up first. While the second way (LD_LIBRARY_PATH
variable) is a little more complex, but is more unix complient: 1) Now, for the newbies, instead of copying around a huge lib, you can
just link the halflife shared library (libhlwon.so) into a system wide shared
library directory (/usr/lib) - this makes upgrades easier since you only need
to rerun ldconfig and not recopy the lib. You will link this by issuing
the command "ln -s
libhlwon.so /usr/lib/" in the command
line in the halflife directory. *Note: You will have to remove the old
lib if you have already copied it into the directory (as per the
linuxreadme.txt from Valve) and are trying to link on top of
it. Also, this way does require root access to the machine.
Next, rerun the ldconfig using "/sbin/ldconfig". 2) For the more complex oriented, before the server is started, set
the LD_LIBRARY_PATH environment variable to contain the location of the
library by running "export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/games/halflife". This also helps if you do not have
root access on the server box that you are using to run your Half-Life
server. A simple script can be made to do this, e.g.: #!/bin/sh Lastly,
it is time to run the server from the halflife directory: "./hlds_l +map undertow +maxplayers 16" (or for a LAN server: "./hlds_l +map undertow +maxplayers 16
+sv_lan 1 -nomaster"). When
the server program has finished loading, the words "WON Auth"
should appear to tell you that you have obtained authorization from WON and
you are ready to roll. If per chance you instead see "WON
Server", then this is a message from the WON gods that either you have
an outdated version of the server software or possibly a firewall or proxy is
hindering your attempts to reach the WON servers. For further help in Linux troubleshooting, please read through
the Linux
portion of the FAQ. |
||||||||||||||||||||||||||||||
Spectator Mode |
|
|||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||