          ___   ___     _____      _____     _____     _____
         /   | /   |   / __  \    / __  |   / __  \   / __  \
        / /| |/ /| |  / /  | |   / /  | |  / /  | |   \ \ |_|
       / / | , / | | | /   / |  / /   / | | /   / |  _ \ \
      / /  |__/  | | | |__/ /  / /___/ /  | |__/ /  | |_\ \
     /_/         |_| \_____/  /_______/   \_____/   \_____|
                        UTils V302 by PJMODOS


[=====------      WHO WHAT WHY       ------=====]
MODOS Utils are server actors that was originaly created by me for
my UT server:
TeamBalancer - Actor for better team balance on public servers.
MODOSScoreBoard - Changes ScoreBoard to show more info.
SplashLogo - Allows you to display texture (logo) at begin play.
             If you don't know how to create UT2003 texture package
             with logo see LogoHowto.txt.
AutoMapRestart - Actor for MapVote servers - you can set maximum
                 empty server timeout after which will be loaded one
                 of DefaultMaps. This is useful when player votes for
                 some unpopular map and noone stays on server.

See History for latest changes.


[=====------       INSTALLATION       ------=====]
Installation is easy, just unpack files to your UT2003/System
directory and start editing the server .ini file.

If you have ConfigManager 1.7+ you can configure everything in webadmin.


Add the following lines to the [Engine.GameEngine] section:
ServerActors=MODOSUtils302.TeamBalanceSA
ServerActors=MODOSUtils302.MODOSScoreBoardSA
ServerActors=MODOSUtils302.SplashLogoSA
ServerActors=MODOSUtils302.AutoMapRestart

First line is for TeamBalancer, second is for MODOSScoreboard, third for SplashLogo and fourth for AutoMapRestart.

If you use MODOSScoreBoard or SplashLogo you must include
this line too:
ServerPackages=MODOSUtils302

And if you use SplashLogo you must include this:
ServerPackages=logopackage
(replace logopackage with name of your texture package)

TeamBalancer configuration -  add the following section to the
same server .ini:
[MODOSUtils302.TeamBalanceSA]
Mode=1
bForceKill=False

MODOSScoreBoard configuration -  add the following section to the
same server .ini:
[MODOSUtils302.MODOSScoreBoardSA]
ShowBonusInfo=1
CustomScoreBoardReplaceWhat[0]=
CustomScoreBoardReplaceWith[0]=
...
CustomScoreBoardReplaceWhat[4]=
CustomScoreBoardReplaceWith[4]=

And SplashLogo configuration -  add the following section to the
same server .ini:
[MODOSUtils302.SplashLogoSA]
LogoTexture=logopackage.logotexture
LogoDrawTime=10.0
LogoText=
PosX=-0.01
PosY=0.4
(replace logopackage with name of your package and logotexture with name of your texture)

MODOS AutoMapRestart configuration -  add the following section to the
same server .ini:
[MODOSUtils302.AutoMapRestart]
MaxTimeout=5
DefaultMaps1=DM-Antalus
DefaultMaps2=
DefaultMaps3=
DefaultMaps4=


[=====------          SETUP          ------=====]
Detailed description of configuration.

TeamBalancer configuration:
- Mode       : 1 = when player write "say eventeams" or "say balanceteams"
               2 = after scoring event in BR, CTF, DOM
               3 = both above
               4 and more = every x seconds
- bForceKill : False = TeamBalancer will try to only restart player if possible
               (not possible in DeathBall). This means player will not loose his
               weapons, ammo, adrenaline, shield etc.
               True = allways kill player.

MODOSScoreBoard configuration:
- ShowBonusInfo                     : If set to 0 it shows standard FPH, set it to 1 and it will show
                                      NetSpeed instead of FPH.
- CustomScoreBoardReplaceWhat[0..4] : These two are used for custom ScoreBoards,
- CustomScoreBoardReplaceWith[0..4] : if you have some mod with own scoreboard on
                                      your server then you can use scoreboard
                                      plugin (eg if you have DeathBall then it looks like this):
                                      CustomScoreBoardReplaceWhat[0]=DeathBall.DB_DeathBall
                                      CustomScoreBoardReplaceWith[0]=MODOSScoreBoardDB302.MODOSScoreBoardDB
                                      If u use custom scoreboard you must also add
                                      it to ServerPackages (eg ServerPackages=MODOSScoreBoardDB302).

SplashLogo configuration:
- LogoTexture  : Package and texture name.
- LogoDrawTime : How long is logo showed in seconds.
- LogoText     : Text that will be displayed under logo.
- PosX         : X position on screen (logo is displayed at screen_width * PosX)
- PosY         : Y position on screen (logo is displayed at screen_height * PosY)
                 If it's greater then zero then logo and text are left (top for PosY) aligned,
                 it's lower then zero then logo and text are right (bottom for PosY) aligned,
                 if it's -1 then logo and text are centered.

AutoMapRestart configuration:
MaxTimeout   : If server is empty for MaxTimeout minutes then map will be changed to one of DefaultMaps.
DefaultMaps1 : Set most
DefaultMaps2 : popular
DefaultMaps3 : maps
DefaultMaps4 : here.

[=====------         CONTACT         ------=====]
If you find bugs, or think of changes/new features feel free to
email me.

email: ut2003servers mailing list or pjmodos@parba.cz
web: http://pjmodos.parba.cz
You can find me on IRC as PJMODOS at:
    #Unrealscript on ETG (irc.enterthegame.com) after 21:00 GMT
    and pls query me - don't spam on channel.


[=====------        THANKS TO        ------=====]
Evolution
TNSe

and everyone who reported bug


[=====------         LICENCE         ------=====]
You may freely distribute this archive, as long as it remains PERFECTLY intact.

If you wish to create a modification based upon the code contained within the
MODOSUtils.u package then you may contact me first.

You may not sell, broadcast, or otherwise market this mod without permission.
You may advertise and encourage the use of this mod as much as you see fit.

This modification is provided completely as is. You run this modification
completely at your own risk. I accept no liability for loss or damage
(to your equipment or sanity) due to the installation/use of this modification.


[=====------      COMPATIBILITY      ------=====]
MODOSUtils should be compatible with most MODs out there, but
I decided to create list of known compatible and incompatible MODs,
so please if you find any compatible or incompatible MOD, mail me it's
name and version to pjmodos@parba.cz.

Known compatible MODs:
DeathBall (tested with 1.4b) - with ScoreBoard plugin
TTM2003 (tested with beta1) - except MODOSScoreBoard cause there isn't ScoreBoard Plugin for TTM atm

Known incompatible MODs:
None known


[=====------     VERSION HISTORY     ------=====]
V302
+ Added AutoMapRestart (on user request)
+ Added support for ConfigManager 1.7+ (http://www.organized-evolution.com/Ladder/)
+ Retourn of ShowBonusInfo to MODOSScoreBoard (you can have netspeed on scoreboard).
+ PacketLoss now shows properly
+ Team average ping and PL now shows properly
+ Center position (-1) in SplashLogo now works.
+ TeamBalancer now try to only restart player if possible (it's not possible in DeathBall),
  you can override this by setting bForceKill=True.
+ Many small bugfixies and code improvements


v3b1
* First version for UT2003
- no AutoRecorder
+ Mode in TeamBalancer
+ PosX and PosY in MODOSScoreBoard


*** UT1 versions bellow this line ***

v2.3
+ Fixed bug in ClickBoard - green flag didn't show in DM and LMS in
  tournament mode
+ Fixed bug in TeamBalancer - now never change the team of a person
  carrying the flag

v2.2
+ Fixed bug in ClickBoard
+ Fixed bug in SplashLogo

v2.1
+ Completely rewritten demoenhacing code. This mean that bug with 
  crashing UT when spectator was in game while recording is fixed.
  Also "unlimited spectators can join when maxpectators is more than zero"
  bug is fixed. And last thing changed with new demoenhacing code is
  that MODOSViewFC now don't work (I'm not replacing spectator but only
  scoreboard and hud so I can't write functions which can be called from console)
+ Changed ShowNetSpeed to ShowBonusInfo (you can select netspeed or efficiency,
  for more read documentation above). If you want more options than netspeed 
  and efficiency write me (with my new replication code I can add anything now).

v2.0
+ Fixed problems with my custom spectator used for demoenhacing
+ Added function for spectators to fast switch to FlagCarrier or
  best fragged (type MODOSViewFC in your console or bind it to some key)
  in my custom spectator in MODOS ScoreBoard (also work in demos)

v2.0b3
+ Fixed problems with Valhala Avatar (new NetSpeed replication code from UsAaR33)
+ Serverside demos recorded with MODOS ScoreBoard will be enhaced with it
  (Standard server demos have DM HUD without ScoreBoard, demos with 
  MODOS ScoreBoard have correct HUD and MODOS ScoreBoard)
+ Information message when player is forced to change team in TeamBalancer
+ Months(%M), Days(%D), Hours(%H), Minutes(%I) and Seconds(%S) are now 
  with leading zeros in AutoRecorder

v2.0b2
+ Fixed "Clickboard is active even if tourney mode is not" bug
+ Option to turnoff Clickboard
+ SplashLogo should now work but it seems that it will not show logo
  in first map (after starting server) after first join.
+ Another bug in configuration of MODOS ScoreBoard fixed (netspeed should now work)
+ Any "mutate" command cause "Cannot start demorecording now" message bug fixed

v2.0b
+ Added SplashLogo
+ Added clickboard (green flag shows at player name when he is ready in
  tournament mode) to MODOS ScoreBoard (thx to TNSe who gives me code for PureFlag)
+ NetSpeed is showed properly in MODOS ScoreBoard from now
+ Each teams average ping and packet loss in MODOS ScoreBoard
- Removed limitation for user request only after game starts - now
  user requested demos can be recorded before game starts in tournament mode
+ Information if demo can be recorded or not when user request it
+ Posbility of password protected user requested demorecording
  (MUTATE SERVERDEMO PASSWORD)
+ Added some bugs I am sure :)))

v1.7
+ Bug in configuration of MODOS ScoreBoard fixed

v1.6
+ Fixed "Eagle Head" bug
+ Added option to show NetSpeed in MODOS ScoreBoard (requested by coop)
+ Some small improvements in code.

v1.5b
+ Added MODOS ScoreBoard (requested on UT servers mailing list)

v1.0
+ Added DemoNameFormat configuration in AutoRecorder
+ Fixed bug in TeamBalancer

v0.7
* First release 


Copyright (c) Petr Jelinek (PJMODOS)
