------------------------------------------------------------------------------
                             Viking DM&CTF v0.90
                      http://www.planetquake.com/viking

         	    bugreports, questions, suggestions to
		            thedd@planetquake.com
------------------------------------------------------------------------------

About Viking................................................................1
Requirements................................................................2
Installation................................................................3
Server variables............................................................4
User classes................................................................5
Available commands..........................................................6
Server data files...........................................................7
MOTD files..................................................................8
Map cycling.................................................................9
Fun names..................................................................10
Credits....................................................................11


------------------------------------------------------------------------------
1 : About Viking
------------------------------------------------------------------------------
Viking is a mod for Quake2 3.14+. The main purpose with Viking is to give 
administrators more power over their Quake2 servers, as well as extending 
the current DM/CTF gameplay by adding new features.

It uses a number of config files to do this, all of them stored in the
dir you put Viking in. The reason why I'm using so many files is that they 
are also being modified by Viking at various times, and if I would put all 
data in one file you would have problems modifying it when Quake2 is
running.


------------------------------------------------------------------------------
2 : Requirements
------------------------------------------------------------------------------
Viking is available for Win32 and Linux servers. You need Quake2 v3.14 on
your system, and to run Viking CTF or DM with grapple/tech you also need 
Zoid's Threewave CTF for Q2.

Viking is mainly meant to be a server-side mod, but it includes some optional
features that require clients to have extra files.

If you run Viking DM/CTF with VWeap enabled, clients need to download the 
weapon models from http://www.planetquake.com/viking/dl.shtml or
http://www.telefragged.com/tsunami.

Note that the Viking code supports VWeap on all models (including any custom),
but only male/female/cyborg weapon models are included in the client file
(pak2.pak). The pak2.pak file is constantly updated to support more models,
you'll find the latest version at http://www.telefragged.com/tsunami.


------------------------------------------------------------------------------
3 : Installation
------------------------------------------------------------------------------
The Viking mod supports both DM and CTF servers. It is recommended that you
place Viking in the Quake2\ctf directory, otherwise you will not be able to
run a Viking CTF server or a Viking DM server with grapple or tech.

So, before you install Viking, rename your Quake2\ctf directory to
Quake2\ctfold. THIS IS VERY IMPORTANT! Then unpack all Viking files into 
Quake2\ctf and copy all files (except those that already exist in Quake2\ctf) 
from Quake2\ctfold to Quake2\ctf.

If you want to uninstall Viking, just remove the Quake2\ctf directory 
and rename Quake2\ctfold to Quake2\ctf again.

Of course, if you only intend to run Viking DM, you can place the mod in any
Quake2 subdir of your choice.


------------------------------------------------------------------------------
4 : Server variables
------------------------------------------------------------------------------
These are the new server variables:


vweap
	set to "1" enables viewable weapons. Clients must have the 'client
	pack' installed for this to work.
	This variable shows up in "serverinfo".

hud_freq
	decides how often Viking HUD should update. Default is "2", which
	updates the HUD every third frames.

id_x       
	this is the x position on the hud where you want the player id to 
	appear. it can be 0..320, although a setting of 320 will wrap the 
	text to the left side.

id_y
	same as above, but for y axis. It can be 0..240.

id_dist
	the max distance (in metres) it should be possible to id someone.

light_comp
	the id function is based on how dark/light it is where the player you 
	are aiming at is standing. The game uses an integer between 0 and 
	about 150 to tell how bright it is, where 0 is totally dark and 150 is 
	very bright.
	when Viking decides if you should be allowed to see a persons id, it 
	takes the light_comp and multiplies it with the persons light value, 
	and the resulting value is how near (in metres) you have to be to see
	the id. If you are standing within that range (and id_dist is higher 
	than that range), Viking shows you the id.

	light_comp defaults to 1.0. Lower it, and you will have to stand 
	closer to see someones id. Make it higher, and you can be farther 
	away.

	The id_dist will always be the max range from where you can see a 
	person, so light_comp will actually decide how light sensitive the id 
	function is.

funnames   
	Determines wether clients should be allowed to use fun names on the 
	server. Defaults to "1". This variable shows up in "serverinfo".

wbanflags
	Works like dmflags, use this variable to ban weapons on the server.
	These are the corresponding numbers of the weapons:
	Shotgun			1
	Super Shotgun		2
	Machinegun		4
	Chaingun		8
	Grenade Launcher	16
	Rocket Launcher		32
	Hyperblaster		64
	Railgun			128
	BFG10K			256

	Default value is 0, allowing all weapons.
	To ban grenade launcher and BFG, you would set wbanflags to
	272 (16+256).
	This variable shows up in "serverinfo".

startweapons
	This has the exact same syntax as wbanflags, but is used to specify
	what weapons the clients should start with.
	Default is 0.

ctf
	Set to 1, Viking will run as a CTF server.
	Set to 0, Viking will run as a DM server.

tech
	Set to 1, enables Threewave CTF 'tech' powerups. This variable can
	be used both with DM and CTF.
	Note that Viking must be installed in the Quake2\ctf directory for
	tech to work.

grapple
	Set to 1, allows the clients to use the Threewave CTF grappling hook.
	Set to 2, gives the client the ability to use the grapple off-hand
	by binding a key to +grapple (bind x +grapple).
	This variable can be used both with DM and CTF.
	Note that Viking must be installed in the Quake2\ctf directory for
	tech to work.

quickswitch
	Set this to 1 for faster weapon switching. You still have to wait for
	some weapons to power down before they can be switched (like the
	chaingun).

motd_time
	Specifies for how long the MOTD should be displayed.

grapple_speed
	The speed of the grapple in flight.
	Threewave CTF default is 650.

grapple_pull_speed
	How fast the player is pulled in by the grapple.
	Threewave CTF default is 650.


------------------------------------------------------------------------------
5 : User classes
------------------------------------------------------------------------------
Viking gives the administrator a way to give clients extra privileges, by
promoting them to Voiced users or Operators. Voiced users aren't able to use 
commands that directly affect other players (such as 'cmd kick' or 'cmd ban'). 
Furthermore, if a Voiced user wants to change gameplay in any way (using 'cmd 
nextmap' for instance), a vote system will assure that the majority of the 
privileged users (operators+voiced users) agree before the command is 
executed.
Operators have much more control. They can kick or ban players, promote 
unprivileged clients to voiced users, and may use the same commands as voiced
users without having to go through the voting procedure.
The server administrator is still the guy in charge, though.

On dedicated servers, the administrator must type 'sv' in front of the Viking
commands. Example:
sv maplist

On non-dedicated servers, the administrator is also an operator.


------------------------------------------------------------------------------
6 : Available commands
------------------------------------------------------------------------------
Most of these commands are only available to the administrator.
Operators and Voiced users should use the menu system.
You can reach the menus by using the "inven" command when you have joined a
game. Inven is bound to [TAB] by Quake2 default.

These are the Viking commands.

[mask] is name@ip. For example, the mask for Thodd at ip number 123.45.67.8
is Thodd@123.45.67.8. You can use wildcards (*) and joker signs (?) in masks.

Note: To use the admin commands on a dedicated server console, you must type 
      'sv <command>'.

hud
	Toggles the VikingHUD on/off.
	Bind this command to a key (I use ctrl). 

maplist (administrator only)
	Shows a list of the maps in the current cycle.

cyclelist (administrator only)
	Shows a list of the map cycles the server runs.

ban [mask] (administrator only)
	Bans [mask] from the server.

unban [mask] (administrator only)
	Removes the ban on [mask].

banlist (administrator only)
	shows a list of banned users.

addop [mask] (administrator only)
	Adds [mask] to the user_o.txt file.

rmop [mask] (administrator only)
	Removes [mask] from the user_o.txt file.

oplist (administrator only)
	Shows the contents of user_o.txt.

addvoice [mask] (administrator only)
	Adds [mask] to user_v.txt

rmvoice [mask] (administrator only)
	Removes [mask] from user_v.txt

voicelist (administrator only)
	Shows the contents of user_v.txt


The command "players" is extended to show net name and IP if used by an
operator. It is also available at the dedicated console.


------------------------------------------------------------------------------
7 : Server data files
------------------------------------------------------------------------------
Viking stores data in a few files in the dir you installed Viking to.
All files except for maps.txt and motd.txt consist of none or more lines of 
text on the format user@ip (see description of [mask] above). All lines must 
end with newline.

IP_allowed.txt
	masks that are allowed on the server.
	*@*.*.*.* lets anyone in.
	A*@*.*.*.* will let people whose names begin with 'A' in.
	*@123.45.67.? will let people whose ip is 123.45.67.0--9.
	This is the only file you have to create manually.
	It is read every time a client tries to connect.

IP_banned.txt
	masks that are banned on the server.
	*@*.*.*.* bans everyone.
	A*@*.*.*.* bans all people whose names begin with an 'A'.
	*@123.45.67.? bans people whose ip is 123.45.67.0--9.
	Read every time a client respawns or joins a game.

user_o.txt
	masks of users who are operators.
	*@*.*.*.* makes all connecting clients operators.
	A*@*.*.*.* makes all people whose names begin with an 'A' operators.
	*@123.45.67.? makes people whose ip is 123.45.67.0--9 operators.
	Read every time a client respawns or joins a game.

user_v.txt
	masks of users who are voiced.
	*@*.*.*.* makes all connecting clients voiced.
	A*@*.*.*.* makes all people whose names begin with an 'A' voiced.
	*@123.45.67.? makes people whose ip is 123.45.67.0--9 voiced.
	Read every time a client respawns or joins a game.

dm_maps.txt/ctf_maps.txt
	In this file, you can specify which maps should be used on the server.
	Each entry in this file must look like
	:Cycle Name
	map1
	map2
	map3
	[...]
	This file is only read when you start the Viking server.

motd.txt, v_motd.txt, o_motd.txt
	"Message of the day" files.	
	These files are read every time the motd is shown to a client.


Do not edit any of these files manually (except for maps.txt, motd.txt and 
IP_allowed.txt), since erratic entries seriously can screw up the server.


------------------------------------------------------------------------------
8 : MOTD files
------------------------------------------------------------------------------
 Viking uses 3 MOTD files, one for each user class. These files can be plain
text, but you can also use the Q2 fun characters in them. I have included
sample motd files in the package.

o_motd : the motd operators see
v_motd : the motd voiced users see
motd   : the motd regular users see


------------------------------------------------------------------------------
9 : Map cycling
------------------------------------------------------------------------------
 This mod supports multiple (unlimited) map cycles, with unlimited maps.
Each cycle should be given a descriptive name.
You define a map cycle in the file 'maps.txt' like this:
:Cycle name
map1
map2
map3
[..]
mapn

If you remove the 'maps.txt' file, Viking will use default map cycle.
When the server starts, it will use the first map cycle in the file. However,
for compability with future Viking features, you also have to add
'+map map1' (for the example file above) for Quake2 to load the first map in
the first cycle. If you don't do this, Quake2 will load the first default map
(usually base1) at startup, but load the next map in the map cycle (map2 in 
the example) when it switches maps.

NOTE: With Viking CTF, you can play CTF on any id map, not only Q2CTF1..5.
      You can even play on custom maps, but make sure the clients know where
      to download them in that case.


------------------------------------------------------------------------------
10 : Fun names
------------------------------------------------------------------------------
Viking includes a feature that lets clients use fun chars in their names.

For clients, it works like this:

Using Q2NM (you will find it at http://qnm.telefragged.com when it's finished)
you create the fun name you wish to use on servers that support this standard.
This name is saved to a .cfg file, usually named funname.cfg. This file should
be put in the Quake2\baseq2 directory.

Then, you add '+exec funname.cfg' (without the ' signs) to the Quake2 start
line. Thats it!

The Viking server only uses the fun name as an alias for the client. It does
not use fun names to any of the data files (IP_banned.txt, user_v.txt, 
user_o.txt) since it still uses each clients 'net name' (the one you write
in multiplayer setup, or change with the 'name' command) internally for IP
control etc.


------------------------------------------------------------------------------
11 : Credits
------------------------------------------------------------------------------
Thanks to the following people :

* Hentai (hentai@intelegenesis.com) for the VWeap patch
* David 'crt' Wright for most of the menu code
* Tony Browneller for supporting Viking with Q2NM and helping out with
  converting fun chars to ascii in the dedicated console.
* Stefan "Eavy" Schwarz for the CTF+ code
* All of you who have helped me find and correct bugs, and who have given
  suggestions for this mod.