Running a dedicated Turbo Sliders server
----------------------------------------

  Most people should not need to read this file. If you want to
run a server, in most cases you can just start server normally
in the main menu. This file explains how one can run a dedicated
Turbo Sliders server which does not have any overhead for graphics.

  Dedicated server is only experimental at the moment and many
things presented may seem (and quite frankly, are) cumbersome.
So read on only if you are an expert and know what you are doing.


CREATING A DEDICATED SERVER DIRECTORY

  Two Turbo Sliders processes should not be run at the same time
in the same directory as this could result in the ini, player and
record files being modified by two processes at the same time.
Because of this, you must first create a new Turbo Sliders directory.
The easiest way is just to copy the whole sliders directory (with
its subdirectories) or to extract the installation packet to another
location.

  In addition to this, you must mark the directory to be a dedicated
server directory. This is done by creating a file 'autoserver.srv'
in the sliders directory. The file can contain anything but it must
exist. After this, you cannot any more run the game in normal mode in 
this directory.


RUNNING SERVER

  Automatic server is started with the command line option "-autoserver 1".
To make starting server easier in Windows, I suggest you create a shortcut 
for this. When the server is in autoserver mode, it automatically 
performs commands defined in 'macros.ini' in different situations. 
The file can also be edited to change the times the server waits in different
situations.


COMMANDS AND SHUTTING DOWN

  Now comes the ugly part. To make the server perform other admin commands
than the automatic ones in 'macros.ini', you must put them in a file
named 'autoserver.cmd'. The server periodically checks if this file
exists, and if it does, it performs the line that is in the first line 
(and only that one), and then, removes the file. Note that this may
take some time and you cannot have two commands at the same time.

  For quitting the server, I suggest you make the following file
(and name it for example "quitserver.bat"):

del autoserver.cmd
echo /quit > autoserver.tmp
rename autoserver.tmp autoserver.cmd

  The rename stuff is there to make it a bit less probable that the
server process happens to read the file before it has been completed.
You can also try simply "echo /quit > autoserver.cmd" but there might
be a slight probability that it fails.

  If you just kill the server process, some data files can get corrupted
and you must delete autoserver.lck before the next time you start 
the server. The lock file is there to make it hard to run two autoserver
processes at the same time.


CONFIGURING 

  The easiest way to configure the game is to use the macros file.
The Reg script in 'macros.ini' can be used to define settings
for the particular cup. The default reg script defined in 'macros.ini' 
automatically creates cups with ten randomly selected tracks from 
the main tracks directory. You can also use other macro files by using
the command line option '-macros <macrofile>'. Thus, you can specify 
ini files for different tracks, different laps etc.

  Another way is to use the main ini file. Automatic server uses the same 
configuration file 'sliders.ini' as the main game. So you can either edit 
this file or edit the settings running the normal game in this directory 
and changing the settings using menus (remember that you must first delete 
autoserver.srv to be able to do this and then recreate it). 

  Note that with automatic server, the server never stops using
the master server if it has been configured to use it. Normal servers
stop if there is a fatal error or three successive non-fatal errors.
Thus, it is important to make sure that the master server is actually
working when using automatic server.

