          Making Total Conversions of Turbo Sliders


  This document explains how you can make total conversions of Turbo
Sliders. As explained in README-mod.txt, almost everything in the game
can be modified. You can add new tracks with custom graphics, add new
cars, play PunaBall, missile battles or XBumbz - all within Turbo
Sliders. If, however, this is not enough, you can make a total
conversion. It means replacing all default cars, tracks, tiles,
graphics, sounds and music. In a way, it means you can make your own
game based on Turbo Sliders. Turbo Sliders 2.0 supports this without
having to overwrite any original files. Original Turbo Sliders and
any number of mods can co-exist in the same installation directory. 
Different mods can even use the master server to advertize their 
games, even though joining players must be running the same mod.


GENERAL ARCHITECTURE

  A total conversion modification installs itself in Turbo Sliders
directory by adding a directory named mod_<name> where <name> is the name
of the mod. This directory must contain info file mod.dat and it must
at least have directories named data, tracks and cars. Cars, tracks and
tile definitions must all be defined inside the mod directory hierarchy.
Optionally, mod can also redefine samples, music files, menu images and 
fonts but if they are not present, original ones are used. Mod is started 
by running sliders.exe with command line parameter "-mod <name>". Original
Turbo Sliders and all mods share player data, macros, language files, logs
and server scripts. Hardware, network and other global options are shared
in sliders.ini but mods have their own game specific settings redefined
in game.ini.


MOD INFO FILE

  Mod root directory must have a text file named mod.dat which contains
basic mod properties. It must at least contain lines "Name <name>" and
"Version <n>". The name must be 1-20 case-sensitive letters or numbers
without whitespace.  The name must also be the same as the directory
name after "mod_". The minimum version number is 1 and mods with different 
version numbers can't join each other's games. These are all supported
properties that can be defined in mod.dat:

Name <name>      - Name of the mod (required)

Version <n>      - Version number of the mod (required)

MinTSVersion <n> - Minimum Turbo Sliders version, minimum is 200 which means 
                   2.0.0. 205 means 2.0.5, 220 means 2.2.0 etc.

URL <url>        - URL of the mod home page 

TilesFile <file> - If you want the editor to be able to create new files,
                   this file must exist in directory data and it is used as
                   the default include file for all new tracks. Otherwise,
                   new tracks have to be manually created. Editor can still
                   open and edit existing tracks.

MaxTrackSize <n> - Maximum track size, minimum and default is 2000 
                   and maximum is 4000. Note that increasing the size from
                   the default 2000 may seriously affect memory consumption and
                   loading times.

Here is an example mod.dat file. If the name of a mod is mymod and it
is in directory mod_mymod, the contents of mod.dat in that directory
could be:

Name mymod
Version 1
MinTSVersion 200
URL http://www.turbosliders.com/
TilesFile tiles2.til
MaxTrackSize 4000


REQUIRED DIRECTORIES

  The mod directory must contain directories tracks, cars and data.
No original Turbo Sliders cars, tracks or tiles are used unless they
are also copied in these respective mod directories. There must be
at least one car defined and all tracks must only use tiles that are
defined either in tracks directory or in mod data directory. Tile
graphics and patterns must also be defined in mod directories. The ones
that are under data are believed to be present for everyone playing
the same mod version. As with original Turbo Sliders, files that are
inside tracks directory hierarchy are automatically downloaded by
clients if they don't have the files.

  When the mod is run, directories ai, records25 and videos are created
when needed. If new cars or tracks are downloaded when playing a mod,
they are put inside the mod directory hierarchy.


OPTIONAL FILES AND DIRECTORIES

  All audio files (sound/* and music/*) can either be redefined in the 
mod directories or if they are not found, original ones are used. The
same applies to font files (data/font11d.png, fontbig.png and fontmed.png)
and certain full screen images (info.jpg, menu.jpg, quit.jpg and title.jpg).
Note that even if you redefine them, original title and info images are 
briefly shown when a mod is started. If there are AI players, their 
AI lines must be defined in the ai directory. File data/aiplayers.dat is
used if found, otherwise the original one is used.

  Settings are divided in two files, sliders.ini and game.ini. Sliders.ini
contains data that is common to all mods and the original game. Game.ini
contains game specific data that is saved in the mod directory. When 
installing a mod, installer may or may not put a default game.ini file in
the mod directory.


RUNNING GAME AND EDITOR

  To run mod named <name>, both game and editor must have -mod <name> 
as their first two command line parameters. It is recommended that 
the mod installer automatically creates shortcuts for these. Note that
if you use editor in a command line mode and want to open for example
file "mod_tst/tracks/track.trk", the file name is given as relative to
the mod directory: "editor -mod tst tracks/track.trk"


MAKING AN INSTALLER

  You are free to make your installer any way you want but using NSIS
is recommended (http://nsis.sourceforge.net/). The installer should ask 
where the current Turbo Sliders installation is and then create a new 
directory under it. The installer MUST NOT change any original Turbo Sliders
files - it may only add files under the mod directory. There is an included 
example NSIS script file named mod.nsi in this directory. Read its comments
for more help.

