=============================================================================
 MutateSpec + Advanced WebAdmin interface
 November 5, 2012
 Version: 0.2b
 ----------------------------------------------------------------------------
 Description:
 -----------
 Lets you switch from an active player back to spectator-mode
=============================================================================
 Full name: Mutate Spec
 Required: WebAdmin
 Compatiblity: NOT TESTED (works in 2.1, could be lower)
 Version: 0.1 beta
 Size: ~ 267KB + 38KB
 Comment: /
 Credits: FakeTruth (investigated his WebAdmin settings code)
-----------------------------------------------------------------------------
 Coded by RattleSN4K3
 Mail: RattleSN4K3@googlemail.com
=============================================================================

Detailed description:
--------------------------------------------------------
This mutator will add the ability for any player to change from the
player-mode back to the spectator-mode. You can do this by typing a command
into the console, with the use of the mutate command or by clicking the
"Spectate" button in the in-game menu. In addition, a server admininstrator
can specify whether or not specators are allowed to switch back
to player-mode.

The mutate commands are configurable.

You can also use the lite version which will feature the switching only
(no delay for re-switching).


Available console commands:
 -= Switches to spectator =-
    - spec 
    - spectate
    - spectator

 -= Switches to active player =-
    - join
    - play
    - player
    - becomeactive

Available mutate commands:
 -= Switches to spectator =
    - mutate spec 
    - mutate spectate
    - mutate spectator

 -= Switches to active player =-
    - mutate join
    - mutate play
    - mutate player



Features:
--------------------------------------------------------
- Allow switching to spectator
- UI integration
- Full net support
- Full compatibility to other mutators
- Works for instant action games
- No replacement of Pawn, PlayerController classes (or anything)
- Configurable via Ini file
- Configurable via UI scene
- Configurable via WedAdmin
- ServerActor to keep server pure
- Optionally: Restoring stats on switching back to spectator
- Optionally: block spectators to become active players 
- Optionally: delay for changing back to player/spec



Installation:
--------------------------------------------------------
- Copy the Config file "UTMutateSpec.ini" into your config folder
  .\My Games\Unreal Tournament 3\UTGame\Config
- Copy the archive folder "Published" into this directory:
  .\My Games\Unreal Tournament 3\UTGame\



Usage:
--------------------------------------------------------
Mutator:
- Method 1:
  - Start the game
  - Add the mutator "Mutate Spec"
  - Enjoy.
- Method 2:
  - add this line to the command line arguments:
    ?mutator=MutateSpec.MSMutator

ServerActor
- Method 1:
   - Open UTEngine.ini in your UTGame\Config folder
   - add this line to the section [Engine.GameEngine]:
     ServerActors=MutateSpec.MSServerActor
- Method 2:
   - Open the WedAdmin
   - Navigate to the following adress
     /ServerAdmin/settings/serveractors
   - Add the following line to the textbox shown
     MutateSpec.MSServerActor
   - Click save. After a restart, the serveractor will be loaded.



Configuration:
--------------------------------------------------------
You can either change value of the ini file or goto the WebAdmin section
"/ServerAdmin/settings/mutators", select "Mutate Spec" out of the selection
box and wait until a new page is generated. This page allows you to change
values on-the-fly.

The webadmin interface is only available for LAN/online games not
Instant-Action.


- AllowPlayer={true|false}
  Whether or not to allow switching to active player
  (Default: true)

- AllowSpec={true|false}
  Whether or not to allow switching to spectator
  (Default: true)

- DelayedJoin={true|false}
  If set, a spectator need to wait the time specified by "QueueTimeJoin" in
  order to become an active player again.
  (Default: true)

- DelayedSpec={true|false}
  If set, an active player need to wait the time specified by "QueueTimeSpec"
  in order to become a spectator again.
  (Default: true)

- NoDelayForInstantAction={true|false}
  If set you can switch directly in Instant-action games.
  (Default: true)

- RestoreStats={true|false}
  Whether or not spectators should get their stats back on switching back to
  an active player
  (Default: true)

- JoinCommands=<Key>
  <Key> will be used for the mutate command as "join" command. You can add
  multiple lines.

- SpecCommands=<Key>
  <Key> will be used for the mutate command as "spec" command. You can add
  multiple lines.

- QueueTimeJoin=<number>
  A postive number for the time a spectator needs to wait until the one is
  allowed to switch back to player.
  (Default: 60.0)

- QueueTimeJoin=<number>
  A postive number for the time a player needs to wait until the one is
  allowed to switch back to spectator.
  (Default: 20.0)



Default config:
----------------------------
[MutateSpec.MSConfig]
AllowPlayer=True
AllowSpec=True
DelayedJoin=True
DelayedSpec=True
NoDelayForInstantAction=True
RestoreStats=True
QueueTimeJoin=60.000000
QueueTimeSpec=20.000000
JoinCommands=join
JoinCommands=play
JoinCommands=player
SpecCommands=spec
SpecCommands=spectate
SpecCommands=spectator



Known issues:
--------------------------------------------------------
- if "becomingactive" is blocked (due to delayed joining) a clientmessage is
  shown twice
- UI scene elements are out of the panel when the resolution is very low
  (height < 480)



Changelog:
--------------------------------------------------------
v0.1 - Initial version
- Basic mutator for allowing switching, blocking and hooking into the
  in-game menu
- Added serveractor to keep the server pure
- Created config file
- Added WebAdmin interface

v0.2
- Fixed: Clients messages shown on switching (with time)
- Fixed: Crash on disconnecting out of the ingame menu
- Fixed: Join command not working when delayed joining is active
- Fixed: WebAdmin package got downloaded
- Fixed: Saving config on WebAdmin settings did not stored the value
  of QueueTimeSpec
- Fixed: minor bugs
- Added: UIScene Config menu
- Added: Option to restore stats on switching to spec



FUTURE FEATURES:
--------------------------------------------------------
- Custom localized message