==============================================================================
  TOSTProMod 1.6.7 - TO ProMod for Tactical Ops 3.4 (TOST45)
  Author: RDV   Contact: rdv404@proton.me
==============================================================================

One TOST package ("piece") with four modules:

  MR12       - MR12 / MR15 match mode like on matchmaking platforms: !ready,
               knife round, side swap, MR3 overtime, pauses, timeouts,
               surrender
  NadeTrain  - grenade training: grenade camera, infinite grenades,
               throw info, no grenade damage
  SpecHUD    - Promod-style spectator overlay: team HP bars, score,
               watched player's weapons + working TOST admin tabs for
               spectators
  TeamColors - per-player custom colors: teams, HUD, chat

Replaces the separate plugins TOSTMR12 2.8.0, TOSTNadeTrain 1.3.1,
TOSTSpecHUD15 15.0.0 and TOSTTeamColors7 7.0.0. ONE Pieces entry loads
all modules, and each module can be switched off on its own.

The package has a client part (SpecHUD, TeamColors): players download
TOSTProMod.u (about 630 KB, .uz about 170 KB) automatically when they join.

------------------------------------------------------------------------------
 QUICK INSTALL (server with TOST45 and ACE)
------------------------------------------------------------------------------

  1. Stop the server.
  2. System\TOSTProMod.u  ->  the server's System folder (next to ucc.exe).
  3. Add to the server ini:
       [Engine.GameEngine]              ServerPackages=TOSTProMod
       [TOSTTools45.TOSTMapHandling]    DefaultServerPackages=...;TOSTProMod
                                        (append to the existing list)
       [TOST45.TOSTServerMutator]       Pieces[x]=TOSTProMod.TOSTProMod
                                        (first free slot)
  4. Redirect\TOSTProMod.u.uz  ->  your HTTP redirect server (only if you
     use one; without it players download the file from the game server).
  5. Start the server and check the log: "Loaded TOST piece : TOST ProMod".
  6. A logged-in admin switches match mode on in chat: !mr12 on (or !mr15 on).
  7. Match server without bots: [s_swat.TO_DeathMatchPlus] MinPlayers=0.

  Details: section 3 (installation) and the following sections.



------------------------------------------------------------------------------
 CONTENTS
------------------------------------------------------------------------------

  1. Package contents
  2. Requirements
  3. Installation
  4. Upgrading from the old plugins
  5. Switching modules on / off
  6. MR12 module       - how it works, commands, settings
  7. NadeTrain module  - how it works, commands, settings
  8. SpecHUD module    - how it works, commands, settings
  9. TeamColors module - how it works, commands, settings
 10. All commands - cheat sheet
 11. Uninstall
 12. Code changes


==============================================================================
 1. PACKAGE CONTENTS
==============================================================================

  System\TOSTProMod.u                  - ready-to-use package
  Redirect\TOSTProMod.u.uz             - compressed version for an HTTP
                                         redirect server (only if you use one)
  README.txt                           - this file (English)
  INSTRUKCJA.txt                       - the same in Polish


==============================================================================
 2. REQUIREMENTS
==============================================================================

  - Tactical Ops 3.4 server with TOST45 (game: TOSTBase45.TOSTServerGame)
  - Built and tested on: TOST 4.5.2.6 (build 2434), Unreal Engine 469e,
    ACE v1.4c
  - ServerPackages must contain (they do by default): TOSTClient45,
    TOSTGUICtrl45, TOSTWeaponsClient45, TOST4TexSolid, TOST4TexTrans,
    TOST45TexSolid, TOST45TexTrans
  - Optional: TOSTHitparade45 (SpecHUD and TeamColors work together with it)


==============================================================================
 3. INSTALLATION
==============================================================================

1. Stop the server. Do not edit the ini while the server is running - the
   server may overwrite your changes when it saves its settings.

2. Copy System\TOSTProMod.u into the server's System folder
   (where ucc.exe is).

3. In the server config file (e.g. Server-TO340.ini) add the package in
   THREE places:

   a) section [Engine.GameEngine] - add the line (e.g. below the other
      ServerPackages):

         ServerPackages=TOSTProMod

   b) section [TOSTTools45.TOSTMapHandling] - in the DefaultServerPackages=
      line add ";TOSTProMod" to the list, e.g.:

         DefaultServerPackages=TOST45;...;NexgenACEExt14;TOSTProMod;...

      This matters: TOST rebuilds the ServerPackages list from this line.
      Without it the package may disappear from ServerPackages.

   c) section [TOST45.TOSTServerMutator] - put the package into the first
      free Pieces[x] slot (an empty entry, e.g. "Pieces[5]="):

         Pieces[5]=TOSTProMod.TOSTProMod

      Only this one entry - the other modules load by themselves.

4. (Only if the server uses an HTTP redirect) upload
   Redirect\TOSTProMod.u.uz to the redirect server.

5. Start the server. The log should contain:

       Log: Server Package: TOSTProMod
       TOST: Loaded TOST piece : TOST ProMod (Version 1.6.7)
       TOST: TOST ProMod: [ProMod] TO ProMod by RDV loaded, MR12 True, NadeTrain True, SpecHUD True, TeamColors True
       TOST: TOST NadeTrain: [NadeTrain] loaded, training OFF
       TOST: TOST TeamColors: [TeamColors] loaded, per-player colors, enabled True
       TOST: TOST SpecHUD: [SpecHUD] loaded, enabled True, update rate 10.000000, spectator commander 1
       TOST: TOST MR12: [MR12] loaded, mode OFF, MR12 overtime ON MR3 knife ON

   Each module must appear EXACTLY ONCE. If one appears twice, an old
   plugin is still in Pieces (see section 4).

   ACE adds the package to its list by itself (the package contains a HUD
   mutator):
       [ACEv14]: Found a new package containing a HUDMutator: TOSTProMod.u
       [ACEv14]: AutoConfig Added Package: TOSTProMod
   The line "PackageHelper: Found a dangerous call to native function 465"
   (text drawing) is normal - TOST, Nexgen and ACE itself trigger it too.

   On the first start the package writes its sections with default values
   into the ini (see sections 5-9).


==============================================================================
 4. UPGRADING FROM THE OLD PLUGINS
==============================================================================

If the old separate plugins are installed, with the server stopped:

  a) [TOST45.TOSTServerMutator] - clear the old entries (leave an empty
     "Pieces[x]="):
        Pieces[x]=TOSTMR12.TOSTMR12
        Pieces[x]=TOSTNadeTrain.TOSTNadeTrainer
        Pieces[x]=TOSTSpecHUD15.TOSTSpecHUD
        Pieces[x]=TOSTTeamColors7.TOSTTeamColors

  b) [Engine.GameEngine] - remove:
        ServerPackages=TOSTSpecHUD15
        ServerPackages=TOSTTeamColors7

  c) [TOSTTools45.TOSTMapHandling] - remove ";TOSTSpecHUD15" and
     ";TOSTTeamColors7" from DefaultServerPackages.

  d) To keep your settings, only rename the section headers:
        [TOSTMR12.TOSTMR12]              -> [TOSTProMod.TOSTMR12]
        [TOSTNadeTrain.TOSTNadeTrainer]  -> [TOSTProMod.TOSTNadeTrainer]
        [TOSTSpecHUD15.TOSTSpecHUD]      -> [TOSTProMod.TOSTSpecHUD]
        [TOSTTeamColors7.TOSTTeamColors] -> [TOSTProMod.TOSTTeamColors]

  e) The old .u files may stay in System (they do no harm), but they must
     not be in Pieces or ServerPackages.

PLAYER settings (in their User.ini) have new sections too:
     [TOSTTeamColors7.TeamColorsClient] -> [TOSTProMod.TeamColorsClient]
     [TOSTSpecHUD15.SpecHUDClient]      -> [TOSTProMod.SpecHUDClient]
Players set their colors / spectator HUD again (!mycolor menu,
!spechud menu) or copy the old section's content under the new header.


==============================================================================
 5. SWITCHING MODULES ON / OFF
==============================================================================

  [TOSTProMod.TOSTProMod]
  bMR12=True          MR12 / MR15 match mode
  bNadeTrain=True     grenade training
  bSpecHUD=True       spectator overlay
  bTeamColors=True    per-player colors
  bWelcome=True       5 s after joining every player sees
                      "TO ProMod <version> by RDV" in chat (False = no message)

False = the module is not loaded at all. Takes effect after a server
restart. MR12, SpecHUD and TeamColors also have bEnabled in their own
sections.


==============================================================================
 6. MR12 MODULE - MR12 / MR15 MATCH LIKE ON MATCHMAKING PLATFORMS
==============================================================================

HOW IT WORKS

Match mode is OFF by default - the server plays normally. An admin turns
it on with !mr12 on (or !mr15 on). The mode stays on over map changes and
switches itself off when the server has been empty for 3 minutes
(EmptyOffTime).

Match flow:

  1. WARMUP - players in teams type !ready. When everyone is ready (and
     the teams are even, at least 2v2 - bRequireEvenTeams / MinTeamSize),
     the knife round starts after 5 s. Every 30 s a reminder shows who is
     not ready. An admin can start at once: !mr12 start.

  2. KNIFE ROUND - knives only, no money, full armor (KnifeArmor), no bomb /
     hostages / escape - the team that eliminates the other one wins.

  3. SIDE CHOICE - a VOTE of the knife round winners: every (human) player
     of that team types !stay (keep the side) or !switch (swap sides); a
     vote can be changed. As soon as one option has a majority of the
     team's players (e.g. 3 of 5, 2 of 2, 1 of 1) it is decided. After 30 s
     the option with more votes wins; a tie or no votes = "stay". The vote
     status is shown in chat. (Up to 1.4.2 the first player to type decided.)

  4. LIVE ON THREE - 3 restarts, 2 s apart (fixes money bugs), then the
     match is LIVE.

  5. MATCH - 2 halves of 12 rounds (MR15: 15). The first team to 13 round
     wins takes the match (MR15: 16). At halftime:
       - teams swap sides (Terro <-> SF),
       - the score follows the teams, frags stay,
       - money is reset to StartMoney (pistol round),
       - 3 restarts (HalftimeRestarts).
     Rounds without a winner (draws) are not counted. The map time limit is
     off during the match. Friendly fire in the match: 100%
     (MatchFriendlyFire).

  6. OVERTIME - at 12:12 (MR15: 15:15) MR3 overtime: 2 halves of 3 rounds,
     every half starts with $10000, sides swap at OT halftime. Overtimes
     repeat until one team wins. The first OT starts on the sides of the
     last half (like on matchmaking platforms).

  7. END - when the match is decided, the map ends (bEndMapOnFinish).

TEAM LOCK (since 1.6.0)
  - Warmup: after !ready a player can not change the team (the team menu
    does nothing). !unready removes the lock. Going to spectators = unready.
  - From the start of the match (knife round) to its end every player stays
    in his team. Side swaps (knife, half, overtime) move the roster along.
  - It uses the TO flag "already changed the team this round": the game
    refuses the change BEFORE anybody is killed - nobody dies, the balance
    does not move bots, the money does not change. If somebody still gets
    through (e.g. in the first fraction of a second of a round), the plugin
    moves him back with the same money.
  - Bots are NOT locked - they only fill up the teams; TO adds, removes and
    moves them (MinPlayers, balance) to keep the teams even.
  - Leaving and joining again during the match: the player is recognized by
    hardware (ACE hardware ID), then by name, last by IP - and goes to his
    team. ACE checks a player a few seconds after joining: an unknown
    player is not added as a substitute for 15 s, because he may be a
    roster player with another name and IP. Coming back as a spectator he
    has to join the game himself.
  - A substitute who joins a team during the match is added to the roster
    and locked from then on.
  - An admin moves a player only by command: !mr12 ids (player IDs), then
    !mr12 move <ID> (or name). The player does not die, keeps his money and
    stays in the new team (the lock follows him). The "change team" button
    of the TOST admin tab may be undone.

DEMO AND SCREENSHOT (automatic, since 1.3.0 / 1.4.0)
  - From the start of the knife round (no knife round: from the restarts
    before the match) every player in a team and every spectator records
    a client demo ("demorec"). Name: MR12_<map>_YYYY-MM-DD_HH-MM
    (MR15_... in MR15), server time. The .dem file is saved in the
    player's game System folder.
  - Whoever joins / reconnects during the match gets a new demo: the same
    name + _HH-MM-SS (nothing is overwritten).
  - 4 s after the match is decided everybody who records takes a
    screenshot ("shot", Shot....bmp/png in System) - the final result.
  - 10 s after the match is decided the demo stops (the final result is
    on it). !mr12 stop / switching the mode off stops it at once.
  - Only the demo started by the module is stopped - a player's own demo
    is never touched.
  - In chat the player sees: [MR12] Recording demo: ..., Screenshot ...,
    Demo stopped: ...
  - An admin map change during the match is not handled separately (the
    game should end the demo on the map change - not tested).

"Team A" = the team that starts the match as Terrorists; "Team B" = SF.

Pauses and timeouts (during the match):
  - !pause - technical pause. Starts at the next freeze time. Ends when
    BOTH teams type !unpause (or an admin does), at the latest after
    5 minutes (PauseMaxTime).
  - !tac - 30 s tactical timeout, 4 per team per match. Starts at the next
    freeze time. The team that called it can end it early with !unpause.
  - !gg - surrender vote; 60% of the team's human players are needed
    (SurrenderPercent). The match ends after the current round.

COMMANDS - PLAYERS  (typed in chat, hidden from others)

  !ready  (!r)               - ready for the match
  !unready  (!notready)      - not ready after all
  !stay                      - knife round winners: vote to keep the side
  !switch  (!swap)           - knife round winners: vote to swap sides
  !pause  (!tech)            - technical pause
  !unpause                   - end a pause / timeout
  !tac  (!timeout)           - tactical timeout
  !gg  (!ff, !surrender)     - vote to surrender
  !score  (or just !mr12)    - score, sides, timeouts left / match state
  !mr12 help                 - command list

COMMANDS - ADMIN  (log in first in the console: adminlogin <password>)

  !mr12 on                   - switch match mode MR12 on
  !mr15 on                   - switch match mode MR15 on (or change
                               MR12 -> MR15 while the mode is on)
  !mr12 off                  - switch match mode off (normal game)
  !mr12 start / !mr15 start  - start the match now, without !ready
  !mr12 stop                 - abort the match
  !mr12 ids                  - players with their IDs (for !mr12 move)
  !mr12 move <ID or name>    - move a player to the other team
                               (no death, money kept; the lock follows him)
  !unpause                   - end any pause at once

SETTINGS  [TOSTProMod.TOSTMR12]

  bEnabled=True              module active
  bModeOn=False              match mode on (set by !mr12 on/off)
  EmptyOffTime=180           mode switches itself off after this many
                             seconds of an empty server
  RoundsPerHalf=12           rounds per half (12 = MR12, 15 = MR15)
  bOvertime=True             overtime (False = 12:12 ends as a draw)
  OTRoundsPerHalf=3          rounds per overtime half (MR3)
  bSwapAtOTStart=False       swap sides at the start of overtime
  StartMoney=1000            money at match start and after halftime
  OTStartMoney=10000         money at the start of every overtime half
  bEndMapOnFinish=True       end the map when the match is decided
  bReadySystem=True          !ready system (False = only an admin starts)
  MinReadyPlayers=1          minimum number of ready players
  bRequireEvenTeams=True     start only with even teams (bots count,
                             spectators do not)
  MinTeamSize=2              with bRequireEvenTeams: at least NvN
  ReadyCountdown=5           seconds between "all ready" and the start
  ReadyReminder=30           seconds between !ready reminders (0 = off)
  bKnifeRound=True           knife round before the match
  SideChoiceTime=30          seconds for the !stay / !switch vote
  bKnifeNoObjectives=True    knife round: elimination only (no bomb etc.)
  KnifeArmor=100             armor in the knife round (0 = none)
  bAllowPause=True           !pause / !unpause
  PauseMaxTime=300           technical pause ends by itself after this many
                             seconds (0 = never)
  TimeoutsPerTeam=4          !tac per team (0 = off)
  TimeoutLength=30           timeout length in seconds
  bAllowSurrender=True       !gg
  SurrenderPercent=60        % of the team's human players needed for !gg
  MatchFriendlyFire=1.0      friendly fire in the match (1.0 = 100%,
                             <0 = do not touch)
  LiveRestarts=3             restarts before the match goes live
  HalftimeRestarts=3         restarts after a side swap (score and frags stay)
  RestartInterval=2          seconds between restarts
  bDebug=False               extra logging
  DebugStartDelay=0          bot tests only: start without !ready after this
                             many seconds (0 = off)
  bAutoDemo=True             players record a demo from the knife round to the end
  bAutoDemoSpectators=True   spectators record it too
  DemoStopDelay=10           seconds after the match is decided until the demo stops
  bAutoScreenshot=True       screenshot at the end of the match (for everybody who records)
  ScreenshotDelay=4          seconds after the match is decided until the screenshot
                             (less than DemoStopDelay = the screenshot is on the demo too)

NOTES
  - In TO "EndGame" means the end of a round; the module makes sure the
    map does not end in the middle of a match.
  - Commands are not shown in chat, but they are written to the server log.
  - Match mode cannot be switched on (!mr12 on, !mr15 on, !mr12 start)
    while NadeTrain grenade training is on - use !nadetrain off first.
    And the other way round: with match mode on, !nadetrain will not start
    training.


==============================================================================
 7. NADETRAIN MODULE - GRENADE TRAINING
==============================================================================

HOW IT WORKS

An admin switches training mode on with a chat command. While training
is on:
  - the camera follows the thrown grenade and returns after it explodes,
  - the player cannot move while the camera follows the grenade
    (jump or !skip ends the camera and unlocks movement at once),
  - grenades are infinite (the same grenade type is given back),
  - after the explosion the player gets info: flight time, distance,
    height difference, e.g.
        [NadeTrain] HE Grenade: 2.34s, 18.6m horizontal, -1.2m height
  - grenades do no damage and no push.
Outside training mode the server plays completely normally. This module
runs server-side only.

COMMANDS  (in chat, hidden from others)

  !nadetrain           - training mode on / off             (admin only)
  !nadetrain on | off  - training mode on / off             (admin only)
  !skip  (!nadeskip)   - end the grenade camera and unlock movement now
                         (JUMP - space - does the same)
  !nadecam             - grenade camera on/off (just for yourself)
  !nadeinfo            - throw info on/off (just for yourself)
  !nadehelp            - short help

Example:
  1. in the console: adminlogin <password>
  2. in chat: !nadetrain
  3. throw a grenade - the camera follows it, you stand still
  4. want to throw the next one quickly -> space or !skip
  5. end training: !nadetrain off

SETTINGS  [TOSTProMod.TOSTNadeTrainer]

  bTrainingAtStart=False    training on right after the map loads
  bInfiniteNades=True       give the grenade back after a throw
  bNadeCam=True             grenade camera (+ movement lock)
  bNadeInfo=True            throw info
  GiveBackDelay=1.0         seconds after the throw before the grenade is
                            given back
  CamMaxTime=8.0            grenade camera safety limit, seconds
  SmokeStillTime=1.0        smoke/gas: release the camera after the grenade
                            lies still this long
  UUPerMeter=50.0           Unreal units per meter (approximate)
  bSkipOnJump=True          jump ends the camera
  bSkipOnUse=False          use key (does NOT work in TO - leave False)
  bNoNadeDamage=True        no damage / push from grenades while training
  NoDamageTypes[0]=GrenadeDeath   damage types treated as grenade damage
  NoDamageTypes[1]=Explosion      (Explosion covers C4 too)
  NoDamageTypes[2]=Corroded       (tear gas)
  bDebugSkipKeys=False      diagnostics: log jump detection
  bDebugDamage=False        diagnostics: log every damage taken in training

NOTES
  - The movement lock only applies with the camera on. Whoever turns the
    camera off (!nadecam) throws and moves normally.
  - During training the module allows behind view (bAllowBehindView) and
    restores the previous setting afterwards.
  - Training switches off after a map change (unless bTrainingAtStart=True).
  - Smoke/gas: the camera returns once the grenade lands (smokes ~34 s).
  - Bots as targets: as admin in the console "addbots 4" - grenades do not
    hurt them in training.
  - Training does NOT switch on while the MR12 / MR15 match mode is on
    (!nadetrain answers with a message - use !mr12 off first). This also
    applies to bTrainingAtStart=True. And the other way round: while
    training is on, !mr12 on / !mr15 on and !mr12 start are refused.


==============================================================================
 8. SPECHUD MODULE - SPECTATOR OVERLAY
==============================================================================

HOW IT WORKS  (spectators only)

  - team HP bars: Terrorists on the left, Special Forces on the right
      * team header in the team color: name, players alive (e.g. 3/5), score
      * player bar filled by HP, name and HP number
      * dead player: empty (dark) bar with a white name
      * same order as the TO scoreboard; the watched player has a white frame
      * next to the bar: current weapon icon, C4 icon, hostage icon (x2)
      * instead of the weapon icon an action label: Reloading, Planting C4,
        map consoles, defusing C4 (with a progress line)
  - score at the top: [ TERRORISTS ][ 2 ][ 1 ][ SPECIAL FORCES ]
  - bottom center: the watched player's weapons (current one framed),
    ammo, money, Dmg, Score, Deaths
  - bottom left: the watched player's armor figure
  - optionally hides the empty TOST weapon bar for spectators

Team colors come from the TO HUD, so colors set with the TeamColors module
are used here too.

The overlay hides while the scoreboard, a TO tab, HitParade is shown or
after "hidehud".

SECURITY: HP, weapon and armor data is sent ONLY to real spectators.
Players - dead ones too - never receive it, so the overlay cannot be used
for ghosting.

A new spectator has the overlay OFF; on becoming a spectator they get a
one-time chat hint on how to turn it on.

MENU:  Esc -> Mod -> Spectator HUD   (or !spechud menu)
  Options: overlay on/off, team bars, score, bottom weapons, armor, hide
  TOST weapon bar, size (0.5 - 3.0). Changes show at once and are saved
  when the window closes.

  IMPORTANT: the "Spectator HUD" entry is NOT available right after
  joining the server as a player. It appears in the Mod menu only once you
  become a spectator (only spectators get the client module). After that
  it stays in the menu until the game is closed. If you do not see it as
  a spectator, close and reopen the menu or use !spechud menu.

COMMANDS - SPECTATOR  (in chat, hidden from others)

  !spechud                   - overlay on / off
  !spechud on | off          - on (with all elements) / off
  !spechud menu              - settings window
  !spechud bars              - team bars on / off
  !spechud score             - score at the top on / off
  !spechud center            - bottom weapons on / off (same: !specweapons)
  !spechud armor             - armor figure on / off
  !spechud tostweapons       - TOST weapon bar shown / hidden
                               (while hidden, TOST printed a "showweaponinfo"
                               hint in chat every ~30 s - since 1.4.2 the hint
                               is suppressed while SpecHUD hides the bar)
  !spechud size <0.5-3>      - size, e.g. !spechud size 2
  !spechud y <0.05-0.9>      - height of the team bars (part of the screen)
  !spechud centery <0.1-0.95> - height of the bottom weapon row
  !spechud scorey <0-0.5>    - height of the score at the top
  !spechud reset             - defaults (everything off)
  !spechud help              - show current settings

  TO (TOSTSpectator) drops two identical chat messages in a row. Since
  1.2.0 the !spechud / !spec... commands are exempt (they can be typed
  several times in a row); normal spectator chat is still filtered.
  On a key (console ~):  set input F8 say !spechud

COMMANDS - ADMIN AS SPECTATOR  (first adminlogin / salogin <password>)

  The normal TOST tabs do not work for spectators - the module fixes that:
  !specadmin        - TOST admin panel (maps, players, kick, ban, mute, warn,
                      change team, make teams, adminreset, endround ...)
  !specweaponstab   - TOST weapons tab (same: !specweapontab)
  !specgame         - TOST game settings tab
  (same: !spechud admin / weaponstab / game)

  The command always OPENS the tab (close it with Close or ESC) and works
  again after ESC, Close, the ~ console and switching to another tab.
  The "Game tab" button of the admin panel and the "Admin tab" button of
  the game tab switch between them for spectators too.
  First join after starting the game (through the password window): TOST
  creates its tabs before the UWindow root has the screen size - they
  stayed 0x0 and only the title was shown, without buttons. The module
  fixes their size when they are opened (game log:
  "[SpecHUD] tab ... had size 0x0, set to ...").

SERVER SETTINGS  [TOSTProMod.TOSTSpecHUD]

  bEnabled=True        module active
  UpdateRate=10        data updates per second sent to spectators (2-30)
  SpecCommander=1      TOST commands for spectators: 0 = no,
                       1 = logged-in admins, 2 = everyone (needed for salogin)

SPECTATOR SETTINGS  (their User.ini, section [TOSTProMod.SpecHUDClient])

  bShow, bShowBars, bShowScore, bShowCenter, bShowArmor,
  bHideTOSTWeaponHUD, HUDScale=2.0, LayoutY=0.28, CenterY=0.85, ScoreY=0.035


==============================================================================
 9. TEAMCOLORS MODULE - PER-PLAYER COLORS
==============================================================================

HOW IT WORKS

Every player sets colors FOR THEMSELVES (nobody else sees them):
  - Terrorists / Special Forces (chat, console, scoreboard, numbers above
    the scoreboard, team counter),
  - the "green" HUD (hostages, high HP, vest, money),
  - the "red" and "yellow" HUD (low / medium HP, warnings),
  - admin and spectator names in chat, chat message text.
The server forces nothing: until a player sets something, they see the
original TO colors. Settings are stored in the player's User.ini.

WINDOW:  !mycolor menu   or   Esc -> Mod -> Team/HUD colors
  - Element        - what you change
  - Use TO default - original TO color for this element
  - Red/Green/Blue - sliders 0-255 and boxes to type the value
  - color preview, Reset all, Close (saved when closed)
  On a key (console ~):  set input F9 say !mycolor menu

COMMANDS  (in chat, hidden from others)

  !mycolor                        - show current settings
  !mycolor menu                   - open the window
  !mycolor <element> <R> <G> <B>  - e.g. !mycolor terro 255 105 180
  !mycolor <element> <name>       - e.g. !mycolor sf cyan
  !mycolor <element> reset        - TO color for this element
  !mycolor reset                  - all TO colors

  Color names: red, darkred, pink, orange, yellow, gold, green, lime,
               cyan, blue, lightblue, purple, white, grey

  Elements (aliases):
    terro      (t, terr)           Terrorists
    sf         (ct, swat)          Special Forces
    hostages   (hud, green, host)  TO "green"
    hudred     (red)               TO "red"
    hudyellow  (yellow)            TO "yellow"
    admin                          admin name in chat
    spectator  (spec)              spectator names in chat
    chattext   (text, chat)        chat message text

SERVER SETTINGS  [TOSTProMod.TOSTTeamColors]

  bEnabled=True        module active

PLAYER SETTINGS  (their User.ini, section [TOSTProMod.TeamColorsClient])

  Terro=255,105,180    format R,G,B (0-255), empty = TO color
  SF=  Hostages=  HudRed=  HudYellow=  Admin=  Spectator=  ChatText=

NOTES
  - TO uses one color variable in several HUD places: hostages = high HP
    = vest = money; Terro numbers above the scoreboard = low HP (while the
    scoreboard / HitParade is shown, "red" takes the Terro color).
  - Colors are applied every second - right after joining they may be the
    original ones for a moment.


==============================================================================
 10. ALL COMMANDS - CHEAT SHEET
==============================================================================

 Command                    Who          Module      What it does
 -------------------------  -----------  ----------  ---------------------------
 !mr12 on / !mr15 on        admin        MR12        match mode on (*)
 !mr12 off                  admin        MR12        match mode off
 !mr12 start / !mr15 start  admin        MR12        start the match now (*)
 !mr12 stop                 admin        MR12        abort the match
 !mr12 ids                  admin        MR12        player IDs
 !mr12 move <ID|name>       admin        MR12        player to the other team
 !mr12 help                 anyone       MR12        command list
 !ready (!r)                player       MR12        ready
 !unready (!notready)       player       MR12        not ready
 !stay                      player       MR12        vote: keep side (after knife)
 !switch (!swap)            player       MR12        vote: swap sides (after knife)
 !pause (!tech)             player/admin MR12        technical pause
 !unpause                   player/admin MR12        end pause / timeout
 !tac (!timeout)            player       MR12        tactical timeout
 !gg (!ff, !surrender)      player       MR12        surrender vote
 !score                     anyone       MR12        score / match state
 !nadetrain [on|off]        admin        NadeTrain   training mode (*)
 !skip (!nadeskip)          player       NadeTrain   end grenade camera
 !nadecam                   player       NadeTrain   grenade camera on/off
 !nadeinfo                  player       NadeTrain   throw info on/off
 !nadehelp                  player       NadeTrain   help
 !spechud [on|off]          spectator    SpecHUD     overlay on/off
 !spechud menu              spectator    SpecHUD     settings window
 !spechud help              spectator    SpecHUD     current settings
 !specweapons               spectator    SpecHUD     bottom weapons on/off
 !specadmin                 admin (spec) SpecHUD     TOST admin panel
 !specweaponstab            admin (spec) SpecHUD     TOST weapons tab (also !specweapontab)
 !specgame                  admin (spec) SpecHUD     TOST game tab
 !mycolor                   anyone       TeamColors  current colors
 !mycolor menu              anyone       TeamColors  colors window
 !mycolor <el> <R G B|name|reset>  anyone  TeamColors  set a color
 !mycolor reset             anyone       TeamColors  all TO colors

(*) Match mode and grenade training exclude each other. To switch one on,
    switch the other one off first:
      training -> match:   !nadetrain off, then !mr12 on / !mr15 on
      match -> training:   !mr12 off, then !nadetrain on

Admins log in in the game console (~ key):  adminlogin <password>


==============================================================================
 11. UNINSTALL
==============================================================================

  1. Stop the server.
  2. Remove from the ini:
       - ServerPackages=TOSTProMod                  ([Engine.GameEngine])
       - ";TOSTProMod" from DefaultServerPackages   ([TOSTTools45.TOSTMapHandling])
       - Pieces[x]=TOSTProMod.TOSTProMod -> leave an empty "Pieces[x]="
       - (optional) the [TOSTProMod.*] sections
  3. Delete System\TOSTProMod.u (and the .uz on the redirect).
  4. Start the server.


==============================================================================
 12. CODE CHANGES
==============================================================================

  This package contains the ready-to-use package - the source code is not
  needed to install it. Source and changes: contact the author
  (rdv404@proton.me).

  IMPORTANT for anybody who changes the code: rename the package (e.g.
  TOSTProMod2) and the ini entries. Players have the old version in their
  cache and with the same name they get a package mismatch error.
