How to setup halflife deticated server Part-2
Posted by transistor62 on January 10 2009 14:22:01

Clan Battle Mode

 

 

Clan Battle mode is supported by TFC for clan matches.  It keeps tracks of all players joining, disconnecting, scoring, and killing each other.  At the end of the game, it dumps these stats   into the console for the players to see.  To start a server in Clan Battle mode, use "tfc_clanbattle 1".  When players join a team on a Clan Battle server, that player will be assigned a Battle ID, i.e., Battle ID 101.  This unique number identifies that particular player in the game and is displayed throughout prematch mode as well as when a player respawns after dying in normal Clan Battle mode.  Players need to remember their ID because in the event of getting disconnected, they can use their ID and reconnect to the game where they left off - meaning the game will remember their previous stats and apply them to the player when he/she rejoins.  If a clan or team wanted to substitute a player, then when one player leaves, the second player can join with the same ID as the previous player and continue where the last player left.  To join a server after being disconnected from a game or as a substitute player, open the console and first type "setinfo tf_id <Battle ID>".  Then, type "connect <ip addy>" to get back into the server.  Many clans and teams like to run a practice round to warm up before playing the actual match.  For this, the "tfc_clanbattle_prematch <minutes>" line will allow players to frag each other without achieving any of that level's goals.  Also, it is always a pain when trying to play a private clan match when people in the public keep joining if you are running on a public server.   The server admin can use "tfc_clanbattle_lock 1" to lock the game as soon as the prematch period ends and the real match begins.  The only people who will be able to rejoin the game are those whose Battle ID's match the ID's of people that were disconnected during a match.

 

Linux Server

 

 

To begin, I am no Linux guru, and to get explicit linux "how to's" for you server admins, I had to enroll the help of another.  So, I would like to take this opportunity to thank Tim "Night-Shade" Fletcher for his Linux wisdom contributions.

          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
export LD_LIBRARY_PATH=/path/to/halflife:$LD_LIBRARY_PATH
cd /path/to/halflife
./hlds_l $*

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

 

 

Everybody, admins and players alike, seems to want to know how to use spectator mode.  Unfortunately, spectator mode is inoperable, and from what I understand, it will not be fixed.  There are no plans to ever make spectator mode work.