//----------------------------------------------------------------------
// i4Games BunnyTrack Training
// Copyright (c) 2004-2005 Medic (Yannick Delwiche).
//
//   medic@i4games.net - http://www.i4games.net
//
//   v. 2.1 - 2005-04-12
//
// Copying and redistribution is strictly prohibited without the written
// permission of Yannick Delwiche (medic@i4games.net).
//----------------------------------------------------------------------

Table of Contents
-----------------

  1. Introduction
  2. Requirements
  3. Try it out!
  4. Support
  5. Installation
  6. Console Commands
  7. Disclaimer
  8. Credits and Acknowledgements


1. Introduction
---------------

The i4Games BTTrain mutator is an addon for Unreal Tournament which lets
you train BunnyTrack (BT) maps with the help of teleporter which leads
you to the different rooms of a map.


2. Requirements
---------------

- UT server
- Web server that can be reached by the UT server*

* If you do not have a webserver or if you do not want to configure the
  teleporters yourself, you can contact me for a possible syndication
  with i4Games. I will then take care of your server configuration.


3. Try it out!
--------------

If you want to first check how it practically looks, connect to this
server:

  gs5.i4games.net:6877 (or 195.95.38.185:6877)


4. Support
----------

If you need help with this mutator or simply want to talk about it, feel
free to visit the official i4Games BTTrain forum here:

  http://www.i4games.net/forum/viewforum.php?f=12


5. Installation
---------------

Extract the .int and .u files into your UT System folder and add the
following line in your UnrealTournement.ini at the end of the
[Engine.GameEngine] section:

  ServerPackages=i4Games_BTTrain_2a

The BTTrain mutator should be available in the mutators list the next
time your restart UT.
For server admins, the mutator is i4Games_BTTrain_2a.BTTrain.

The following UnrealTournament.ini code can be set:

  [i4Games_BTTrain_2a.BTTrain]
  FetchURL=localhost/example_fetchurl.php?
  SetURL=localhost/example_seturl.php?
  TeleportEffect=True

FetchURL is the URL that will be called to retrieve teleporters
information for the current map. The mutator will append "map=CTF-Map"
to the URL so that your script can determine what coordinates to return.

The first line of the returned data must be the number of rooms. Then it
must be followed by lines of this form:

  <team>\t<room>\t<t_x>\t<t_y>\t<t_z>\t<t_r>\t<d_x>\t<d_y>\t<d_z>\t<d_r>

One line of this kind per teleporter must be returned. \t means a
tabulation character.

  <team> is the team number for the teleporter (0 = red, 1 = blue)
  <room> is the id of the room (zero-based)
  <t_x>  is the position of the teleporter in the X-axis
  <t_y>  is the position of the teleporter in the Y-axis
  <t_z>  is the position of the teleporter in the Z-axis
  <t_r>  is the orientation of the teleporter
  <t_x>  is the position of the destination in the X-axis
  <t_y>  is the position of the destination in the Y-axis
  <t_z>  is the position of the destination in the Z-axis
  <t_r>  is the orientation of the destination

The destination is the player position and orientation at the start of
the room.

SetURL is the URL that will be called to save the current teleporters
information to the server. The mutator will append the following
parameters to the URL:

  map=CTF-Map    > filename of the map
  title=My%20Map > title of the map

And it will POST the following variables:

  tx[i]=0.0      > X coordinate of teleporter #i
  ty[i]=0.0      > Y coordinate of teleporter #i
  tz[i]=0.0      > Z coordinate of teleporter #i
  tr[i]=0.0      > orientation of teleporter #i
  dx[i]=0.0      > X coordinate of destination #i
  dy[i]=0.0      > Y coordinate of destination #i
  dz[i]=0.0      > Z coordinate of destination #i
  dr[i]=0.0      > orientation of destination #i

There will be as much tx[], ty[], etc. as there are rooms.


6. Console Commands
-------------------

IMPORTANT: It is highly recommended to bind these commands!
YOU MUST BE LOGGED AS ADMINISTRATOR BEFORE USING THESE COMMANDS!

The [id] means that you can specify a numeric index or not. If you don't
specify it, you will be prompted to complete the mutate command in the
mini-console.

> mutate btteleport

    Teleports you to the location you are pointing to.

> mutate btsnap

    Snap your position/rotation to the grid.

> mutate btteleporter [id]

    Spawns a teleporter for room #id where you are. Your orientation
    should be the opposite of the orientation a player should have to
    use this teleporter.

> mutate btdestination [id]

    Sets the room #id entrance position and orientation according to
    your own position and orientation.

> mutate btcanteleport

    Prevents you from being teleporter. It is useful when you are
    working with the BTTrain teleporters.

> mutate bteffect

    Enable/disable teleport effect.

> mutate btalign

    Aligns the teleporters according to the first and last teleporters
    positions. You don't have to create the intermediate teleporters
    before; they will be created automatically.

> mutate btsave

    Saves the teleporters and destinations to the server.
    If you haven't set the SetURL and if you are in a local session then
    it will create a file in your System directory (CTF-BT-MapName.txt)
    and wite the teleporter coordinates into it. This file will be a
    unicode-encoded text file which will contain a series of console
    commands that can be understood by the BTTrain mutator. You can
    later fetch its data by typing "exec CTF-BT-MapName.txt" in the
    console while logged as administrator.

> mutate btcoords

    Show your current coordinates and the current number of rooms.

> mutate btdelete [id]
    
    Delete the teleporter and the destination for the room #id.

> mutate btgoto [id]

    Goto room #id. Use "mutate btgoto start" to respawn at the beginning
    of the map.

> mutate btclear

    Delete everything.

> mutate btshowplayerstarts

    Show/hide player start points.

> mutate btmakeotherteam

    (Not yet implemented.)
    Generates the teleporters for the other team.


7. Disclaimer
-------------

This mutator and its examples are provided as-is without warranties of
any kind, either express or implied, including accuracy, fitness for a
particular purpose, reliability, or availability.
i4Games and Yannick Delwiche disclaims any liability for any damage,
including loss or corruption of data or security breeches, arising out
of use of this mutator.


8. Credits and Acknowledgements
-------------------------------

Concept: y0ni & Medic
Coding: Medic
Testing and moral support: Couille Noire

The i4Games BTTrain mutator is Copyright  2004-2005 Yannick Delwiche
The i4Games logo is Copyright  2003-2005 i4Network SC
i4Games is a trademark of i4Network SC
All other trademarks and trade names are the properties of their
respective owners, and do not imply owner's endorsement of this product,
or guarantee full compliance with owner's standards.  
