TitleSF MapVote
GameUnreal Tournament + Strike-Force
Version1.00
Release Date9/21/2001
FilenamesSFMapVote.u, SFMapVote.int
AuthorBruce Bickar aka BDB
Email AddressBDB@planetunreal.com
Web Pagehttp://www.planetunreal.com/BDBUnreal
DescriptionThis mutator allows players to control what maps are played on a Strike-Force server through voting.
Features
- 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.
  
- 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.
  
- Mid game map change option. The players can vote for a map at any time during the course of the 
  game. If the required percentage of players place votes a Mid-Game vote will be initiated and all
  of the players voting windows will be opened. They will have a limited time to vote.
  
- 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 can/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.
  
- 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. 
  
- 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. Also, kick votes are tracked by 
  PlayerID and not name so changing names will not affect it.  
  
- Remote dedicated server configuration window, which can be used by remote administrators to 
   configure Map-Vote. Console configuration commands are not required to be look up and remembered.
  
- Works with all Strike-Force 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:
  - Auto Detect - Automatically detects the game type that the server was started with.
  - Death Match (SFDM)
  - Team Death Match (SFTDM)
  - Hostage Rescue (SFHR)
  - Escape (SFES)
    
- Voting status. The main 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.
  You can now click the name of a map or player and it will select that map in the map list.
  
- 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.
  
- MapVoteHistory - MapVote now keeps track of all winning maps and supplies a report that shows 
  how many times each map has been played. Note: running the report take a bit of time. It was 
  made to be slow on pupose to avoid adding lag to the server.
  
- Modes: MapVote now has 4 voting modes: 
  1. Majority - Each player gets to place 1 vote and the map with the most votes wins.
  2. Elimination - Maps are removed from the list until there are only X number of maps left.
  3. Accumulation - If the map that a player has voted for does not win that vote is carried 
     to the next game.
  4. Score - Player scores are used as the ammount of votes placed. So basically, the top 
     players get choose the map.
  
- Configurable No Repeat limit - You can now configure MapVote to remove the last X number 
  of maps that have been played. X being some number.
  
Requirements Required version 413 or better of Unreal Tournament. (This include the players as well as the server)
and Strike-Force 1.60 or better
Installation Instruction
  1. Place SFMapVote.int in the \UnrealTournament\System directory.
  2. Place SFMapVote.u in the \UnrealTournament\System directory.
  3. ***Note: this if very important, it will not work without this.
    Add "ServerPackages=SFMapVote" to the \UnrealTournament\system\StrikeForce.ini file under the "[Engine.GameEngine]" section.
Server Setup
Configuration Choose a configuration method (A or B)
A.
  1. Stop the SF server if it is running
  2. Open the StrikeForce.ini file, located in the \UnrealTournament\System directory, with any text editor.
  3. Add/Modify the setting values
  4. Save your change
  5. Restart the SF server
Example StrikeForce.ini file contents:
-----------------------------------------
[SFMapVote.SFMapVote]
bAutoDetect=True
bSFDM=False
bSFTM=False
bSFHR=False
bSFES=False
VoteTimeLimit=70
KickPercent=51
bUseMapList=False
ScoreBoardDelay=10
bAutoOpen=True
bKickVote=True
RepeatLimit=4
MapVoteHistoryType=SFMapVote.MapVoteHistory1
ServerInfoURL=
MapInfoURL=
MidGameVotePercent=50
Mode=Majority
MinMapCount=4
bDebugMode=False    
------------------------------------------
SFMapVote INI file settings reference.

bAutoDetect=<True|False> True = Automatically detects the game-type that the server was started with and loads only the maps that were made for it. False = Uses the gametypes specified by bSFDM,bSFTM,bSFHR, and bSFES settings. Note: Do NOT set to True if bSFDM,bSFTM,bSFHR, or bSFES is set to true.
bSFDM=<True|False> True = Load map names that start with SFDM in the map list.(DeathMatch) False = Do not load map names that start with SFDM in the map list.
bSFTM=<True|False> True = Load map names that start with SFTDM in the map list.(Team DeathMatch) False = Do not load map names that start with SFTDM in the map list.
bSFHR=<True|False> True = Load map names that start with SFHR in the map list.(Hostage Rescue) False = Do not load map names that start with SFHR in the map list.
bSFES=<True|False> True = Load map names that start with SFES in the map list.(Escape) False = Do not load map names that start with SFES in the map list.
VoteTimeLimit=<1 - 300> The number of seconds to allow players to place votes after the end of a game or after a mid-game vote was initiated. When this time limit expires the server will be forced to swich to the map with the highest votes. If there are no votes then a map will be chosen at random.
KickPercent=<1 - 100> The percentage of players that are required to place kick votes against one player before that player is kicked from the server. Set this to 100 to disable kick voting since most players will not place a kick vote against them selves.
bUseMapList=<True|False> True = Load the list of available map names from the map rotation list. False = Load the list of available map names with all available maps on the server that have the specified gametype map prefix.
ScoreBoardDelay=<1 - 300> The number of seconds after the end of the game to delay the automatic opening of the voting windows. During this delay the players have a chance to view the score board. If bAutoOpen is set to false then this setting does nothing.
bAutoOpen=<True|False> True = Automatically open the voting windows at the end of each game. False = Do not automatically open the voting windows at the end of each game. At the end of each game the server will switch to the next map in the rotation list. Users can initiate Mid-Game voting by placing a vote.
bKickVote=<True|False> True = Allow players to place kick votes against other players. False = Do not allow players to place kick votes against other players.
RepeatLimit=<0 - 1024> The number of previously played maps to remove from the list of available maps. This is used to prevent players from voting for the same maps over and over. Set this to 0 to disable it and show all available maps or maps in the rotation list.
MapVoteHistoryType=<SFMapVote.MapVoteHistory1| SFMapVote.MapVoteHistory2| SFMapVote.MapVoteHistory3| SFMapVote.MapVoteHistory4> Defines the class that contains the code for managing the Map Vote History data. See the MapVoteHistory section of this document for more details. This can also be set to name a custom made 3rd party class in a different package.
ServerInfoURL=<www.servername.com/subdirectory/HTMLFileToShow.htm> The web URL address to use to fill the ServerInfo window. Leave this blank to disable the server info window. Note: The Welcome Window that pops up when a player joins a BDBMapVote3 server has been removed from this version of MapVote.
MapInfoURL=<www.servername.com/subdirectory> The web URL address to use to get the Map Information html file. See MapInfo section of doc.
MidGameVotePercent=<0 - 100> The percentage players that are required to place votes for any maps before a "Mid-Game Vote" is initiated. When a Mid-Game vote is initiated all the voting windows will be forced open and the voting time limit clock will start. When time runs out the server will switch to the winning map.
Mode=<Majority | Elimination | Accumulation | Score> Majority - Each player gets to place 1 vote and the map with the most votes wins. Elimination - Maps are removed from the list until there are only X number of maps left. Accumulation - If the map that a player has voted for does not win that vote is carried to the next game. Therefore players can multiple accumulate votes. Score - Player scores are used as the amount of votes placed. So basically, the top players get choose the map.
MinMapCount=<1 - 1000> Only used when the Mode is set to "Elimination". It is the number of map names that will be present before the map list is refreshed with all the maps.
bDebugMode=<True|False> True = Write extra debugging information to the log file. False = Do not Write extra debugging information to the log file. Warning: Do NOT turn this on unless I ask you to. Only I can understand the the debug log data.
B. (This method is for configuring a remote dedicated server)
  1. Start the server with the "SF Map-Vote" mutator. (See decicated server setup instructions below)
  2. Connect to your server with UT/SF.
  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. enter "MUTATE BDBMAPVOTE VOTEMENU" in the console command window.
  5. Click the "Admin" tab which should be all the way to the right. If there is No "Admin" tab then you have not successfully logged in as administrator, close the window and go back to step 3.
  6. 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.
  7. Click the "Save" button. This will save your selected options on the remote server and reload the maplist on the server.
  8. Now close and reopen the voting window to refresh the map list.
Advanced Server Setup For decicated server owners. Put the appropriate command and parameters (found below) in your server batch file.
Batch file Server Commands Examples:
----------------------------
StrikeForce DeathMatch:
UCC server SFDM-MiddleEast_160.unr?Game=SFGame.SFDM?mutator=SFMapVote.SFMapVote 
    -userini=SFUser.ini -ini=StrikeForce.ini
    
StrikeForce Team DeathMatch:
UCC server SFDM-MiddleEast_160.unr?Game=SFGame.SFTeamDM?mutator=SFMapVote.SFMapVote 
    -userini=SFUser.ini -ini=StrikeForce.ini

StrikeForce Hostage Rescue:
UCC server SFHR-ColdSteel_160.unr?Game=SFGame.SFHostageRescue?mutator=SFMapVote.SFMapVote 
    -userini=SFUser.ini -ini=StrikeForce.ini

StrikeForce Escape:
UCC server SFES-Austria_160.unr?Game=SFGame.SFGame.SFEscape?mutator=SFMapVote.SFMapVote 
    -userini=SFUser.ini -ini=StrikeForce.ini

----------------------------
MapVoteHistory
MapVote now keeps a record of maps played , the number of times each was played 
and the sequence each was played. This information is stored separate from the default 
UT ini file because of the potental large size (up to 1020 maps). By default this
information is stored in the MapVoteHistory1.ini file. I do not recommend editing 
this file manually, but if you do here is the layout: 
Example: MapVoteHistory1.ini
------------------------------------------------------------------------------
[SFMapVoteMapVoteHistory1]
M[0]=                <== Note: this is left blank on purpose
M[1]=AS-Coldsteel    <== M = MapName, maintained in alphabetic order
M[2]=CTF-2symple                  
M[3]=CTF-4Faces
M[4]=CTF-AAhuNui
...etc.
M[1022]=
M[1023]=
P[0]=0
P[1]=1
P[2]=7
P[3]=11
P[4]=9
...etc.
P[1022]=0
P[1023]=0
S[0]=0
S[1]=41
S[2]=197
S[3]=166
S[4]=10
S[1022]=0
S[1023]=0
LastMapIndex=251                 <== This is the index nuber of the last map
----------------------------------------------------------------------------
If you run multiple servers on the same computer and want to keep history 
information separated, you can do so by configuring the MapVoteHistory 
type in the Advanced section of the Admin configuration window.
You have 4 options:
- SFMapVote.MapVoteHistory1  - stores history info in MapVoteHistory1.ini
- SFMapVote.MapVoteHistory2  - stores history info in MapVoteHistory2.ini
- SFMapVote.MapVoteHistory3  - stores history info in MapVoteHistory3.ini
- SFMapVote.MapVoteHistory4  - stores history info in MapVoteHistory4.ini 

Additional Feature:
-------------------
There are two in-game console command that you can use to set
the Play Count and Sequence of each map in the History.
You have to login as Admin with the ADMINLOGIN command first.
MUTATE BDBMAPVOTE SETPC mapname play_count
MUTATE BDBMAPVOTE SETSEQ mapname sequence_number
examples:
MUTATE BDBMAPVOTE SETPC CTF-FACE 10
MUTATE BDBMAPVOTE SETSEQ CTF-FACE -1

Note: Setting the Sequence of a map to -1 forces it to never show in the 
map list. This can come in handy if you discover have a bad or just 
ill conceived map on your server but don't want to actually delete the 
file.
Server Info Window
The Server Info window is a new feature that allows server owners to post
information for the players to see (located on the "Info" tab in the MapVote window).

Note: The Welcome Window (that pops up automatically when a player joins) that was 
     introduced in BDB MapVote 3 has been remove per request from the Strike Force 
     development team because it sometimes conflicted with the weapon load out window.

Requirements: 1. HTTP Web server (Micro$oft IIS, HTTP server, Appache, etc.)
              2. An HTML file.
      
Welcome Window Setup:
---------------------
First you need to make the Welcome Window HTML source file.

*** The in-game web browser is very very limited.
You can not use images,tables tags,java-script, style-sheets, etc.

So, What can you use ?
Here are the comments directly from the "UWindowHTMLTextArea" class 
that is used to render the HTML:
-------------------------------------------------------------------
HTML Currently Supported
========================
Parsed on add
-------------
<body bgcolor=#ffffff link=#ffffff alink=#ffffff>...</body>
<font color=#ffffff bgcolor=#ffffff>...</font>
<br>
<center>....</center>
<p>
<h1>...</h1>

Parsed on add and display
-------------------------
<nobr>...</nobr>
<a href="...">...</a>
<b>...</b>
<u>...</u>
<blink>...</blink>

Parsed only on display
----------------------
& gt;
& lt;
& amp;
& nbsp;

Planned improvements
--------------------
<ul><li>item 1<li>item 2...</ul>
<table>...</table>

Bugs
----
The parsing is pretty slack!
------------------------------------------------------------------ 

So create an HTML and place it on your HTTP web server.
Then goto the Admin configuration window in MapVote and scroll down to 
the Advanced section.
In the "Welcome Page Web Server URL" text box enter the web server address,
port, path, and filename.
Syntax:
webservername.domainname:port/path/filename.htm

Note: The port is not required, the default is 80. 
      Do Not include "http://" 

Example: www.planetunreal.com:80/BDBUnreal/serverinfo.htm
Map Info
Map Info is a new feature in MapVote that can be setup to provide 
players with information about about maps. There are two ways the player
can request information about a map.

1. Select a map in the Map List on the Map Voting window and click the
   "Info" button. This will cause the window to switch to the "Info" tab
   and then use the in game web browser to display information if 
   it is avaliable.
   
2. Select the "Info" tab window in the Map Voting window and click the 
   "Map Info" button. This will cause the in game web browser to display
   information about the current map if it is avaliable.  

Map Info Setup:
---------------
You will need an HTTP web server to provide the map information.
You will also need to take all the ReadMe text files that are were provided
with custom maps and convert them to HTML format.
I have ask someone to write a converter program that will do this for you
and will make it available for download when it is ready.
The name of the map information file has to follow this scheme:

MapName.htm

For example: If there was a readme file for CTF-Face.unr then the info file 
would be have to be named CTF-Face.htm

All of the map info files must be in the same directory on the web server.

To enable this go to the Admin configuration window in MapVote and scroll
down to the Advanced section.
Enter your web server URL and the path to the map info directory in the 
"Map Information Web Server URL" text box.
Note: do not use "http://" and end the path with a "/"
Example: www.myserver.com:80/MapInfoDirectory/
Known bugs
None yet, Cross your fingers.
Version History
1.0 - Converted from BDBMapVote version 3.01 
    - Changed available Gametypes to SFDM,SFTDM,SFHR, and SFES

Thanks To:
Copyright / Permissions
-----------------------
Copyright Bruce D. Bickar 2000 - 2001
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.