Title         : Map-Vote 
Game          : Unreal Tournament
Version       : 2.6
Release Date  : 10/24/2000
Filenames     : BDBMapVote2.u, BDBMapVote2.int, MapVote.ini
Author        : Bruce Bickar aka BDB
Email Address : BBickar@carolina.rr.com
Web Page      : http://home.carolina.rr.com/bdbunreal

Description   : This mutator allows players to control what maps are played on a server through voting.

Features      o Graphical user interface. At the end of each game a Voting Window will pop up automatically,
                so no key binding is required and there are no console commands to remember.

              o Screen-Shot preview. When a map is selected a screen-shot (picture) of the map will be displayed 
                along with information about the map such as the author and the recommended number of players. 
                If the player doesn't have the selected map file on their computer then it will indicate that 
                downloading is required.

              o Mid game map change option. The players can vote for a map at any time during the course of the game.
                If all of the players vote mid game the map will be changed immediately.
                
              o Players can configure a keyboard key that can be used at any time during the game to open the voting window.
                This is not required because the voting window will automatically open it self at the end of each game. But
                if the players want to take advantage of the player kick voting or the early map voting features then this would
                be required. Also, the key configuration does not require any console commands or opening of the preferences menu.
                This key configuration is built in to the voting window which makes it much easier to do.
                It also will work with-out a Mod Menu INT file, this is important because INT files are not automatically 
                downloaded from the server in network play and Mod Menu configuration windows require an INT file.

              o Tie breaker feature. Each player can only vote for one map. If all of the players vote the votes will be counted 
                and the map with the highest vote count will win. If there is a tie, then a map will be choosen at random from 
                the maps that tied for first place. 

              o Player Kick feature. Players can place "kick" votes against other players. If the percentage of players that
                vote against a particular player reaches the configurable kick requirement percentage then that player will 
                be disconnected from the server. If the kicked player reconnects to the server during the same game that he
                was kicked from, he/she will be re-kicked automatically. To clairify, This kick/ban only lasts until the end 
                of the current game, or until the map is changed. Note: The server administrator can not be kicked.

              o Remote dedicated server configuration window, which can be used by remote administrators to configure Map-Vote.
                There are no console configuration commands to look up and remember.

              o Works with all games types. The server administrator can configure which types of maps will be loaded in to the 
                map voting list. The following Map types can be turned on or off:
                - Death Match (DM)
                - Team Death Match (DM)
                - Last Man Standing (DM)
                - Assault (AS)
                - Capture The Flag (CTF)
                - Domination (DOM)
                - Other Game Type - This is a configurable game type. It can be used for Mods like Rocket-Arena, Tactical-Ops, Strike-Force
                  and any other mod. (It has only been tested with Rocket-Arena ,Tactical Ops, and Strike-Force)
                       
              o Configurable message expiration time. Players can use this feature to change the amount of time that messages
                remain on their HUD/screen. This is good for people who can't speed read messages in 3 seconds.
                
              o Voting status report window. This window displays a list of maps that were voted for and the amount of votes for
                each. It also shows player names that were had kick votes cast against them.
                      
              o Configurable End-Game voting time limit. At the end of a game the players have a set about of time to place their
                votes. If all players have not voted with in this time limit then a map change will be forced.

Requirements  : This mutator is compatible with all versions of Unreal Tournament.
                
Installation Instruction :
              If you downloaded the UMOD version just double click it and it should install it self.
              If you downloaded the ZIP version:
              1. Place BDBMapVote2.int in the \UnrealTournament\System directory.
              2. Place BDBMapVote2.u in the \UnrealTournament\System directory.
              3. Place MapVote.ini in the \UnrealTournament\System directory.
              3. Add "ServerPackages=BDBMapVote2" to the \UnrealTournament\system\UnrealTournament.ini file under 
                 the "[Engine.GameEngine]" section. (***Note: this if very important, it will not work without this.)

Server Setup    1. Set the settings that you want for each game type using the normal UT menus.
                   For example set the number of frags in deathmatch before the match ends and
                   then change to CTF and change the number of flag capture's before the match ends.
                   Close the Multiplayer window to save the settings.
                2. Select any mutators that you want plus the "Map-Vote" mutator.
                3. Start the game. (see dedicated server setup below for dedicated servers)
                
Configuration : There are three ways to configure Map Vote on a server.
                Configuration Methods: (choose one and only one)
                ---------------------
                A. 1. Click the "MOD" menu then select "Map-Vote Configuration".
                   2. Check the game types that you want to be available.
                   3. Close the Configuration window.
                     
                B. 1. Open the MapVote.ini file, located in the \UnrealTournament\System directory, with any text editor.
                   2. Modify the values for each parameter after the = to True or False.
                      If you want only CTF maps to be loaded in the map list then change the value after bCTF= to True
                      and the rest of the values to False. 
                      Example MapVote.ini file contents:
                      -----------------------------------------
                      [BDBMapVote2.BDBMapVote2]
                      bDM=False
                      bLMS=False
                      bTDM=False
                      bDOM=False
                      bCTF=True
                      bAS=False
                      bOther=False
                      MsgTimeOut=30
                      OtherClass=SFGame.SFTeamDM
                      VoteTimeLimit=70
                      KickPercent=51
                      ------------------------------------------
                      Also see the Extra directory in the Zip file for pre-configured MapVote.ini files for Mods.
                          
                C. (This method is for configuring a remote dedicated server)
                   1. Start the server with the "Map-Vote" mutator. (See decicated server setup instructions below)
                   2. Connect to your server with UT. 
                   3. Login as Admin with the "ADMINLOGIN password" console command. 
                      Note: If you don't see a message like "YourPlayerName has become the administrator" then the password was wrong.
                   4. In the command console enter "MUTATE BDBMAPVOTE VOTEMENU". This should display the Map-Voting window.
                   5. First click the "Config" tab and bind a menu hot key. 
                      Instead of entering the MUTATE... command now you can just hit the hot key to bring up the voting window.
                   6. Click the "Admin" tab which should be all the way to the right. It may be covered by the <|> buttons in the
                      top right corner. If so , click the > button.  If there is No "Admin" tab then you have not
                      successfully logged in as administrator, close the window and go back to step 3.
                   7. Change the options in the scrolling Admin window. There is a second half of the page which does not show.
                      Just use the scroll bar on the far right to scroll down.
                   8. Click the "Remote Save" button. This will save your selected options on the remote server.
                   9. The changes will not take affect until the next level change. Go back to the "Maps" tab and vote for any
                      map.
                  10. After the level changes press your Menu Hot Key (See step 5 or 4) to open the voting window. The list should
                      now be populated with the correct type of maps. Vote for one and your good to go.

OtherGame Classes: If you want to use Map-Vote with a MOD then you need to change the Other Game Class option and Check the 
                   Other Game check box in the Configuration window.
                Known Game Classes:
                ------------------
                RocketArena - RocketArena.RocketArenaGame
                TacticalOps - s_SWAT.s_SWATGame
                StrikeForce - SFGame.SFTeamDM
              
                Check My Web site for updates on Mod compatiblity. http://home.carolina.rr.com/bdbunreal
                 
                See instructions below under "Other:" for finding other MOD game class names.

                   
Advanced Server Setup: For decicated server owners.
                       Put the appropriate command and parameters (found below) in your batch file.

                Unreal-Tournament Game Types:
                -----------------------------
                UCC server DM-Morpheus.unr?Game=Botpack.DeathMatchPlus?mutator=BDBMapVote2.BDBMapVote2 
                UCC server DM-Morpheus.unr?Game=Botpack.TeamGamePlus?mutator=BDBMapVote2.BDBMapVote2 
                UCC server DM-Morpheus.unr?Game=Botpack.LastManStanding?mutator=BDBMapVote2.BDBMapVote2 
                UCC server AS-Guardia.unr.unr?Game=Botpack.Assault?mutator=BDBMapVote2.BDBMapVote2 
                UCC server CTF-LavaGiant.unr?Game=Botpack.CTFGame?mutator=BDBMapVote2.BDBMapVote2 
                UCC server DOM-Cinder.unr?Game=Botpack.Domination?mutator=BDBMapVote2.BDBMapVote2 
                  
                Rocket-Arena:
                -----------------------------
                UCC server RA-Cliffyb.unr?Game=RocketArena.RocketArenaGame?mutator=BDBMapVote2.BDBMapVote2 
                  
                Tactical Ops:               
                -----------------------------
                UCC server SW-OilRig.unr?Game=s_SWAT.s_SWATGame?mutator=BDBMapVote2.BDBMapVote2 
                 
                Strike-Force:               
                -----------------------------
                UCC server SFTDM-Canal_140.unr?Game=SFGame.SFTeamDM?mutator=BDBMapVote2.BDBMapVote2 -userini=SFUser.ini -ini=StrikeForce.ini
                ***Note: Since StrikeForce uses it's own ini file you need to edit the StrikeForce.ini file and add
                "ServerPackages=BDBMapVote2" under the "[Engine.GameEngine]" section. It will not work with-out this.
                 
                Others:
                -----------------------------
                Look for a file with a name something like ModName.INT in the System directory and open it with a text editor/browser. 
                Look for a line of text that has "MetaClass=Botpack.TournamentGameInfo" then copy the value that follows (Name=

                Example: RocketArena.int
                Object=(Name=RocketArena.RocketArenaGame,Class=Class,MetaClass=Botpack.TournamentGameInfo)
                GameClass----|||||||||||||||||||||||||||             ************************************
                Replace the "Game.Class" below with the one you found above and the PreFix-MapName.unr with any valid map name.
                -----------------------------------------------------------------------------
                UCC server PreFix-MapName.unr?Game=Game.Class?mutator=BDBMapVote2.BDBMapVote2                 
                -----------------------------------------------------------------------------

Known bugs    : 1. If you use GameSpy or something like it to connect to servers there is an intermittant 
                   problem where you might get disconnected from the server when it tried to load the Voting Window.
                   This would only happen the first time after connecting to a server.
                   Just reconnect to the server using the "Reconnect" option under the "Multiplayer" menu.
                                  
                2. When I tested this with "DOM-LittleThings" map , it always played under DeathMatch and dropped the mutator.
                   I couldnt figure out the problem , but it works fine with all the other maps. I might have a corrupted map file.

                3. Strike-Force disables auto downloading by defaulting the AllowDownloads option to False in the StrikeForce.ini file.
                   (found under the [IpDrv.TcpNetDriver] section), Therefore; if you setup a SF server players who do not have 
                    this mutator installed on their computer will not be able to connect. 
                    There are two ways to fix this:
                    a. Edit the StrikeForce.ini files on both the Server and every Client and change AllowDownloads to True.
                       This is not practical considering the ammount of Clients out there that wouldn't know how to open a file
                       let alone change the value in one. 
                    b. Require all Clients/Players to download and install this mutator. Possibly put text in the server title that 
                       indicates the requirment. "Download MapVote Required" or something like that.
                 
                4. The Re-Kick Player feature doesn't work properly in Strike-Force. You can Kick players using MapVote but
                   they can rejoin the server. The Re-Kick feature depends on the ModifyPlayer mutator function which is never called 
                   by the SF game code (I think). But that's alright, the kicked player can rejoin but he/she will have to sit out for 
                   the rest of the round.
                                   
Version History : 
         1.0 MapVote.unr Map (3D Voting, cool idea but not practical)
         2.0 Initial Testing Version (Dropped the Map and used UWindows and Mutator)
         2.1 Fixed the Assault mid-game RestartWait problem. (game waited 5 minutes before continuing to second half of match)
             Add a Config tab window to the MapVote window for players who autodownloaded the mutator and do not have the .int file.
             This will allow them to configure a keyboard key to launch the voting window.
         2.2 Added a 20 second voting restriction at the beginning of the game so that the first player to enter the game after a level switch can not
             vote and force a level switch before the other players have joined the game.
             Also changed the voting message type from critical to normal so that others can see the message that tells which
             map you voted for.
         2.3 Added a 20 second timer at the end of the game that when triggered forces open the players voting window if they
             have not voted and the window is not already open. This will help out any player who has closed the window and dont have 
             a key bound to reopen it.
         2.4 a. Fixed the RestartWait-ini problem by setting bDontRestart to true instead of messing with the RestartWait.
             b. Add a configurable "Message Expiration Time" option. This allows you to configure the amount of time a Say & TeamSay message 
                stays on your HUD. 
             c. Also added a little note at the bottom of the config screen that explains that the Load Map options only
                apply on the server.
             d. Added "Download Required" text to the map screenshot window to indicate when a player doesn't have the
                map that he/she selected.
             f. Add client message to tell the player that they can not kick the server.
             g. Changed tie detection function so that it always returns false for Domination games because once during testing
                I encountered a tie game and it did not go into over-time.
         2.5 a. Added a configurable Kick Vote Requirement percentage.  
             b. Added a configurable voting time limit at game end. 
             c. Increased the size of the map list box and screen shot.
             d. Moved the game type configuration options to an "Admin" tab that only shows up for the player that is logged in
                as the admin. (via adminlogin console command). This Admin tab can save the configuration values to a remote server.
             e. Added LMS, Team Deathmatch, and an "Other" game type. The Other game type can be configured to work with custom Mods 
                such as Rocket-Arena,Tactical Ops, and Strike-Force. (These are the only Mods that have been tested.)
             f. Added a "Status" tab that shows a report of the maps and players that were voted for and the number of votes for each.
             k. Added an "About" tab and renamed the "Players" tab to "Kick" to make more room for tabs.                          
         2.6 Fixed the problem that prevented voting windows from opening when connected to a listening server.                          

Thanks:      Special thanks to DrSin and Mongo for making and letting me use the WRI (Windows Replication Info) class.
             This mutator would have never worked without this piece of code.
             Also, Thanks to SteelHORN, Phear and the rest of the folks at UTAssault.Net helping with testing.

Copyright / Permissions
-----------------------
Copyright Bruce D. Bickar 2000
Authors may NOT use this code with out my permission.
You are NOT allowed to commercially exploit this release, i.e. put it on a CD
or any other electronic medium that is sold for money without my explicit
permission!
You MAY distribute this release through any electronic network (internet,
FIDO, local BBS etc.), provided you include this file and leave the archive
intact.
----------------------
UNREAL TOURNAMENT (c)1999 Epic Megagames, Inc.  All Rights Reserved.  
Distributed by GT Software, Inc. under license.  UNREAL TOURNAMENT and 
the UNREAL TOURNAMENT logo are registered trademarks of Epic Megagames, Inc. 
All other trademarks and trade names are properties of their respective owners.
