Weapons Factory Server Setup


How To Download the 4.2 Server Software
See What's New for 4.2

These instructions will show you how to set up a Weapons Factory server. You should also follow these instructions if you are setting up a single player game to use the Weapons Factory eraser bots.

Setting up a Basic Weapons Factory Server

Before you can set up a Weapons Factory server, you should first understand how to set up a normal Q2 server. It is important to understand that there two types of Q2 servers. For both server types, you need to download and install the Weapons Factory server software.

  • Listen - A listen server uses the normal Q2 game. In this mode, of the players acts as the "host" and lets other players connect to their Q2 game. You also need to follow these instructions if you want to play WF as a single player game with WF eraser bots.

    To run a listen server, you start Q2 just as you would if you were going to play. You then use the Q2 menus to start a server. Before you do that though, you need to add an option to your Q2 startup icon to make it use the Weapons Factory mod. So here are the steps to set up a listen server:

    • Make sure you have the latest Q2 patches from id Software. Q2 updates can be found at ftp://ftp.cdrom.com/pub/idgames/idstuff/quake2
    • Download and install the latest WF client files into your quake2\wf directory if needed
    • Download and install the latest WF server files into your quake2\wf directory
    • Make sure the team10.class file has been unzipped into your quake2\wf directory
    • Download and install map files you wish to use into your quake2\wf\maps directory
    • Change your Q2 startup icon. Go to the icon properties, select the "Shortcut" tab, and edit the "Target" field to add this at the end of the line: "+set game wf +set deathmatch 1"
    • Start Q2 using the modified Q2 icon
    • Bring up the Q2 menu and select "Multiplayer". Then select "Start network server".
    • You can fill in a number of server settings, including the initial map. Unfortunately, you can't pick any of the WF maps from this screen. Don't worry about it - just select the "begin" option.
    • Join a team and pick a class.
    • If you want to change maps, type "gamemap 2fort8wf" in the console (or whatever map you want). You are now running as a WF listen server.
    • Have other people connect to your game by giving them your IP address. They can connect to your server by typing "connect " in their console window.
  • Dedicated - Dedicated servers are the most common way to set up a public server. In dedicated mode, a separate machine acts as the server, and players connect to it from separate machines. The key difference between listen servers and dedicated servers is that dedicated servers only show the console window - you can't play as the server administrator. Also, dedicated servers are the only kind of server that can register with the Q2 master servers to be visible from GameSpy. To set up a dedicated WF server, do the following:
    • Make sure you have the latest Q2 patches from id Software. Q2 updates can be found at ftp://ftp.cdrom.com/pub/idgames/idstuff/quake2
    • Download and install the latest WF client files into your quake2\wf directory if needed
    • Download and install the latest WF server files into your quake2\wf directory
    • Make sure the team10.class file has been unzipped into your quake2\wf directory
    • Download and install map files you wish to use into your quake2\wf\maps directory
    • Start a dedicated server by using this command line (or from an icon):
      quake2.exe +set dedicated 1 +set game wf +set deathmatch 1
    • Join a team and pick a class.
    • If you want to change maps, type "gamemap 2fort8wf" in the console (or whatever map you want).
    • Have other people connect to your game by giving them your IP address. They can connect to your server by typing "connect " in their console window.

If you need some more information on how to set up a Q2 server, visit http://www.planetquake.com/q2s-faq. Admins using Linux may want to check http://www.linuxquake.com. We also recommend the news group "rec.games.computer.quake.servers". Here you can post server questions and seek answers. You can also subscribe to the Q2 server mailing list.

At this point, you should have a basic WF server up and running. The remainder of the document describes all of the various WF server options.

Setting up a LAN Network

For basic information on how to set up a Local Area Network, check out Gamers.com.

Special Linux/Unix Installation Instructions

A few additional steps are required to get Weapons Factory working under Linux or Solaris. You'll get the best results by running your server under the root login. If you are upgrading, be sure to copy your server config file and wfserver.ini file to a safe location, or they will be overwritten.

  • As with NT, you must first get and configure a standard Quake2 server Be sure to install the binaries that include the CTF option.
  • Make a "wf" subdirectory off your Quake2 directory.
  • Download the WF server and Client files. The server files come in both *.tar.gz and *.tar.Z flavors.
  • Uncompress the server files by copying the archive into the Quake2 directory.  Type the following command to uncompress the binaries into the WF directory:   zcat wfserver42.tar.gz | tar xvf -
  • Now, copy the Client files into the WF directory. Uncompress the archive by typing:  unzip wfclient42.zip
  • Now that the files are uncompressed, change the ownership of the files to the root user.  Change to the WF directory, and type:   chown root.root *
  • Check to be sure all files are named with lower case letters.

Downloading the Weapons Factory server software

NOTE!!! If you are upgrading from an older version, make sure you create a backup version of your server.cfg and wfserver.ini files. This version will replace those files.

Download problems? If you have any trouble downloading from the links below, go to this site: ftp://ftp.cdrom.com/pub/idgames2/planetquake/captured/weaponsfactory/ . You'll have to make a note and download the individual files that you need.

wfserver42-nt.zip Win 95/NT - Version 4.2 Server Files. (You must also download wfclient42.zip from the downloads page)
wfserver42-unix.tar.gz Combined Linux/Solaris server for WF 4.2. Includes updated documentation and installation instructions for WF 4.2. .tar.gz version. (You must also download wfclient42.zip from the downloads page)
wfserver42-unix.tar.z Combined Linux/Solaris server for WF 4.2. Includes updated documentation and installation instructions for WF 4.2. .tar.Z version for people who don't have gzip. (You must also download wfclient42.zip from the downloads page)

Quick Start Dedicated WF Server

Once you've downloaded the WF server files, you can start a dedicated WF server by starting Q2 like this:

quake2.exe +set dedicated 1 +set deathmatch 1 +set game wf +set gamedir wf
Thats all there is to it. The rest of this document describes all of the various server options.

What's New in 4.2?

Just about everything! We've made some major changes (hopefully for the better) to help make administering WF servers easier. Almost all of the WF specific settings have moved to the WFSERVER.INI file. Previously, the wfserver.ini file was used only for the map list. It now controls almost all aspects of the WF server including:
  • Individual settings to replace the WFFLAGS variable
  • Scoring
  • Class Limits
  • Message of the day
  • Banned Word List
  • Defining the class definition file to use

Keep in mind you still will need a server.cfg file for setting variabes like DMFLAGS, frag limits, time limits and the initial map to load. But you no longer need to set the WFFLAGS variable. Each WFFLAGS option now has it's own setting line in the wfserver.ini file.

What makes a good server?

  • A good admin.  Check your server often.  Play there.  Listen to your users.  Resist the urge to be a tyrant.
  • A fast network connection.  ISDN or telephone modems won't cut the mustard.   Cable modems can, in some circumstances, work well.  But it depends on your cable company's quality of service.
  • A good machine. You don't need a Cray to run a first class server.  But you won't get good results on a 486 either.  Linux servers tend to need less horsepower than NT servers, but both need an adequate machine.  A pentium 200+ should be able to run a 16 player game pretty well with enough memory.  128 megs is ideal on Linux - NT may require more depending on what else you have running on the machine.

Advanced Weapons Factory Game Options

Included in the WF distribution files are two sample server configuration files - server.cfg and wfserver.ini. The biggest change for WF server administrators in version 4.2 is that most WF specific settings are now done by setting options in the wfserver.ini file. Each of the sections in this file are described. When editing the wfserver.ini file, remember that anything after a / character will be ignored. This is usefull for adding comments to the file.

If you are running multiple WF servers from the same machine, you can select different configuration files to use on startup. Lets say you want to run two dedicated WF servers on the same machine with different configuration files. You could do this with the following commands:

quake2.exe +set dedicated 1 +set game wf +set deathmatch 1 +set port 27910 +set wfconfig server1.ini +exec server1.cfg

quake2.exe +set dedicated 1 +set game wf +set deathmatch 1 +set port 27911 +set wfconfig server2.ini +exec server2.cfg

In this case, server1.ini and server2.ini are modified copies of the wfserver.ini file. The server1.cfg and server2.cfg are modified copies of the server.cfg file.

WFSERVER.INI - [general] Section

The WFFLAGS settings in previous versions of WF are no longer needed. Instead, each option is controlled by a specific line in the [general] section of wfserver.ini. Here are the settings that can be controlled in the [general] section:

	[general]
	classdef = team10.class   / Defines the class definition file to use.
	map_voting = 0            / allow map voting?  Will use the current map list to vote from
	zbot_detect = 0           / Stop those zbots!
	weaponfilename =          / Used to change default damage/speed of weapons and grenades
	frag_logging = 0          / if 1, turns on frag logging
	logfilename = std.log     / Name of the frag log file
	ref_password =            / If it's blank, nobody can be the ref
	floodertime = 5           / messages typed quicker x seconds will be considered flooding 
	unbalanced_limit = 0      / prevents teams with too many people from taking fag. 0 = no checking
	zoid_flagcap = 0          / set for old style flag captures
	auto_team_balance = 0     / Turns on automatic team balancing
	anarchy = 0               / special mode for death match instead of ctf play
	no_fort_respawn = 0       / disable same fort respawn? (the rest are probably not usefull)
	no_decoys = 0             / decoys disabled?
	no_flying = 0             / flying disabled?
	decoy_pursue = 0          / no longer usefull
	no_turret = 0             / turrets disabled?
	no_earthquakes = 0        / earthquakes disabled?  (not used)
	no_player_classes = 0     / don't think this works any more
	friendly_fire = 0         / does not determine damage, but targeting of weapons
	no_grapple = 0            / grapple disabled?
	no_homing = 0             / homing missles disabled?
	

Notes:

  • classdef - If no class definition is specified at startup, WF will load the team10.class file. WF ships with 3 class files:
    	team3.class - Old WF2.1B style
    	team6.class - 6 classes, well armed
    	team10.class - True TF style classes
    	
  • auto_team_balance - Team Balancing is a server option that seeks to balance the damage players receive based on the current team score (captures only, not frags). It is only active when either team has at least three captures. It works by adding or subtracting 10% of the damage for each point difference.

    It is not noticeable until the point difference is at least 3 or 4. When it gets to 8 or 9, it rocks.

    Examples:

    Your team is down 3 points, you will receive 100% - 30% = 70% damage
    Your enemy will get 130% damage

    Your team really sucks and is down 15 points,
    You will receive 100% - 80% = 20% damage (there is a 20% minimum)
    Your enemy will get 250% damage (no maximum)

    Your team is winning by 6 points, you will receive 100% + 60% = 160%
    The losers on the other team receive only 100% - 60% = 40%

    This has undergone extensive play testing on out internal LAN. It stopped the whining about teams.

  • unbalanced_limit

    You can now prevent unbalanced teams from being able to capture the flag by using the unbalanced_limit setting. The setting number determines how unbalanced the teams can be before the flag pickups are disallowed.

    For example, lets say you set the unbalanced_limit to 3. If the blue team has 3 or more players greater than the red team, the blue team will not be able to pick up the red flag. The default setting is 0, which means no limit will be imposed.

    Note that setting this value should be dependant on the max players you allow for your server. For example, if you run 64 players on a server, you would probably want to set the unbalanced limit higher, say to 5. For smaller servers, you may want to set the limit to 2 or 3.

  • floodertime - WF has built-in flood control to limit how fast players can type messages. Without this control, players can flood servers with messages which can cause lag. To set how long a player must wait between messages, set the floodertime variable to some number of seconds. For example, if you set the flood protection time to 8, players have to wait 8 seconds between messages. Setting floodertime to 0 will disable flood protection. Note that the flood control also works with the wfplay and wfplay_team commands to prevent players from flooding the server with sound commands.

  • zbot_detect - ZBot is a program that helps players cheat in Q2 games by auto-aiming and firing their weapons.  Some of the big advantages the ZBot has over human players is that it can see through walls, and fire the instant they have a clear shot.

    The way ZBot works, is that it intercepts commands from the player, and either passes them on to the server, or interprets them itself.  The ZBot-specific commands either start with "!", or "impulse".  These are used to control the ZBot, and are not passed on to the server.

    The zbot detection works by passing a ZBot-specific command to the client, and then waiting to see if that command is passed back to the server.  If the server does not receive the command, it assumes that the player is a zbot user.  Older versions occaisionally incorrectly identified users with poor network connections as ZBot users.  Weapons Factory uses a newer version of the code that takes poor network connections into account, resulting in very few false detections.

WFSERVER.INI - [motd] Section

The Message Of The Day section is used to replace the top text of the Team and Class menus. Up to three lines can be defined, as in this example:
	[motd]
	WEAPONS FACTORY SERVER
	*Hosted by John Smith
	http://www.johnsmith.com
	

Note: You should try to keep each line to 27 characters or less, otherwise it wont fit on the menu graphic. You also have your choice of colors for the text - white or green. To use white text you don't have to do anything special. For green text, simply put a "*" as the first character of the line.

WFSERVER.INI - [maplist] Section

With the maplist feature, you can create a list of maps that the server will cycle through. To enable this feature, set the "" field in the [general] section, and enter the names of the maps below the "[maplist]" line like this:

	[maplist]
	2fortme2
	2fort8wf v
	blastoma2wf
	cancer1wf    
	

Note! You no longer need to use the "sv maplist" to start the map list. It will automatically start if the map list is defined in the wfserver.ini file.

You can define a map that will not be in the normal rotation, but will be availabe if people vote for it. Just put a The "v" after a mapname

You must ensure that EVERY map is spelled exactly.  Errors in the maplist will cause the game to crash at map change.  On unix systems, mapnames are case-sensitive.   Do not add the .bsp file extension to the list entry.

WFSERVER.INI - [banwords] Section

The banwords section lets you ban the use of inappropriate language. Just list the words that you don't want to be used on your server like this:

	[banwords]
	dork
	jerk	
	 ass
	foureyes
	

Note: - The whole typed message will be rejected if any banned words are used, even if they are parts of another word. For example, if you ban the word "ass", then people will not be able to use the word "class". One way to get around this problem is to put a space before the word, like " ass".

WFSERVER.INI - [classlimits] Section

The classlimits section lets you limit the number of people that can select a specific class for each team. In this example, the engineer is limited to three per team:

	1 =  99	/ recon
	2 =  99	/ nurse
	3 =  3	/ engineer
	4 =  99	/ marine
	5 =  99	/ cyborg
	6 =  99	/ arsonist
	7 =  99	/ gunner
	8 =  99	/ sniper
	9 =  99	/ spy
	10 = 99	/ mercenary
	

Note: - Class numbers are used to limit classes rather than names because different class definitions from MOCK authors can be used. Also notice the comments (after the "/" character) at the end of each line that document the class name.

WFSERVER.INI - [scoring] Section

The scoring section lets you change the frags awarded for each type of score. Note that the default scoring values have not changed in version 4.2. The current default frag scores are:

Point Name                Default Value  Description
------------------------- -------------  ---------------------
frag_points                     1        points for a frag
suicide_points                  -1       points for a suicide
sentry_points                   1        points for killing a sentry gun
capture_bonus                   15       what you get for capture
team_bonus                      10       what your team gets for capture
recovery_bonus                  1        what you get for recovery
flag_bonus                      0        what you get for picking up enemy flag
frag_carrier_bonus              2        what you get for fragging enemy flag carrier
carrier_danger_protect_bonus    2        bonus for fragging someone who has recently hurt your flag carrier
carrier_protect_bonus           1        bonus for fragging someone while either you or your target are near your flag carrier
flag_defense_bonus              1        bonus for fragging someone while either you or your target are near your flag
return_flag_assist_bonus        1        awarded for returning a flag that causes a capture to happen almost immediately
frag_carrier_assist_bonus       2        award for fragging a flag carrier if a capture happens almost immediately	

Other WF Configuration Settings

This section describes additional configuration settings that are not controlled in the wfserver.ini file.

IP Banning

A set of new server commands have been added to allow server admins to ban specific users based on their IP address. The commands have the same format as id's CTF mod. They are:

  sv addip (ip address)         - adds an ip address to the ban list

  sv removeip (ip address)      - removes an ip address from the ban list

  sv writeip                    - writes the ban list to ban list file

  sv listip                     - lists the currently banned ip addresses

  sv testip (ip address)        - test a given ip address against the ban list

Each time an ip address is added or removed from the ban list, the list is written to the ban file located in the quake2\wf directory (called listip.cfg). Therefore, the writeip command is not really needed.  The listip.cfg file can be edited directly outside the game.

A new CVAR called "FILTERBAN" can also be set to change the behavior of the ban list. By default, filterban is set to 1 which means that any person with an ip address in the ban list will not be allowed to play. If you set filterban to 0, it means that ONLY people with ip address in the ban list will be allowed to play.

You can also ban a group of players on the same subnet. For example, if you wish to ban all players that have ip addresses starting with 199.111.222, just set the last number in the ip address to zero, like this:

sv addip 199.111.222.0

This one entry would ban 199.111.222.1 through 199.111.222.255.

At this time, subnets other than those using the last number (octet) of the ip address are not supported. For example, you cannot ban all 199.111.*.* players.

Since many players log on to ISP's that use dynamic IP addressing, it is often necessary to ban an entire network in order to prevent that user from merely logging off, and logging back on again with a new ip - at which time he can get into your server if you don't ban the whole network number.

GameSpy Support

To make your server show up in gamespy, you need to have it send periodic messages to a Q2 master server. To do this, enter the following lines into the console, or add them to your startup script:

set public 1
setmaster q2master.planetquake.com 

NOTE: This will only work for dedicated servers, make sure you are running Weapons Factory from your quake2/wf directory or your server will NOT show up in the GameSpy tab.   If your server is down more than a few minutes, it will be removed from the active master server lsit, and users will not be able to see it.  Please note, that users often update their lists only occaisionally.  Therefore, you should not expect your server to become instantly popular.  It may take a few days for the players to find you.

Most players will use the WF Custom Gamespy Tab.

Here is the Planet Quake Server List.

Voyager has set up a Weapons Factory server list for Gamespy. Follow this link to add your WF server to the server list page, scroll down, you need to send an email to shryqe.

You should also put "(WF)" in your server name. This will help older GameSpy tabs find your server.

Turning off CTF

It is possible to turn the Weapons Factory CTF mod into a pure deathmatch mod. This will remove the flags, teams, and team scoring. To do this, add the following option at startup:

+set ctf 0

Thats it!

Using Server Config Files

Server configuration files store all your game settings in one place, and make it simple to run your server with consistant settings from game to game.  This will be important to your users, who may become irrritated if you experiment too often with game settings.

The Weapons Factory distribution comes with a sample server configuration file called server.cfg. This file contains a basic configuration that you can use as a template to set up your own server config file.

NOTE:  Do not name your actual working server config file server.cfg.   Choose a name that will be difficult to guess, since knowledgable users may be able to download your config file if it is easily guessed.

Your config file name can be passed to the server on the command line.  Here's an example command line to give you an idea (NT version)    quake2 +set dedicated 1 +set game wf +set port 27910 +exec server.cfg +set noipx 1

Here's a Linux version (runs in background.  To run on console, use same command as the NT version):

nohup ./quake2 +set dedicated 1 +set game wf +set port 27910 +set gamename wf +exec server.cfg +set noipx 1 > /dev/null &

Editing the Config File

Open the file in a convienient text editor, and change it to reflect your desires.   You can enter comments in the file by starting the line with 2 / characters.   

//This is a comment line

We recommend that you do not change the dmflags setting.  You may get unexpected results.

First, set the wfflags variable.  17442 is a good starting setting (this will also enable frag logging and zbot protection.  To disable frag logging, use 17440).

Next, edit the Hostname, FTP, admin, system, inet, and os variables to reflect your servers information.  These values will be visible in gamespy.

Do not change the deathmatch variable unless you fully understand the settings.

Now, edit the maxclients variable.  This setting will determine the number of players that can play at one time on your machine. Resist the temptation to set this too high.  Overdoing it will make your server "laggy" to your players.

Next, edit the following variables.

fraglimit (number of frags before the map will change - try 150 for a start)
capturelimit (number of flag captures one team can make before the map will change - try 8)
timelimit (Time limit before the map will change - try 30 (minutes)).

Leave the zombietime variable alone.

If you want to have rcon access available, add the following line:

set rcon_password mypassword

Finally, add a line to load your maplist:

sv maplist wf/wfserver.ini 1    (the 1 will enable random map selection if no votes were received.)

That should do it.  Now save the file, and don't forget to use the name you saved it as on the command line when you start the game.

See sections above for additional variables that can be set, or for other values for these settings.

Support

Email support can be obtained from the contacts page.

If you are having configuration problems be sure to include your server.cfg in your mail message.

Copyright © 1998 Weapons Factory Software
WEAPONS FACTORY is a trademark of Weapons Factory Software for its software products.