Enhanced Map Rotation

Beginning with version 2.0, Coliseum2 has the ability to read in a map rotation list from a plain text file and allow admins and/or referee to add and remove from this list once it has been read into memory.  If activated, this map rotation system is used instead of the usual vstr method.

 

Map List File Format:

To create an external map list file, simply use any plan text editor (ex: Notepad or vi) and list the maps that you want to use in your rotation.  Simply list the maps you want to use with each on a separate line.  When reading in the map rotation list, Coliseum2 will verify that each map exists and is valid on the server.  If not, an error will be printed and that map ignored.  The maximum allowable number of maps in the list is 100.

The map list filename must end with the .cfg extension.  Otherwise, when running a pure server, the mod will not be able to access it for security reasons.  You may also want to create a sub directory under your mod directory where you would put all your map list files for better organization and management.

 

Specifying a Map List File:

CVAR:  g_maplistfile

Specify the name of the map list file with the .cfg extension to use for the rotation.  Default is blank ("").

Example:  set g_maplistfile "mylist.cfg"

If your map list file is in a sub directory you have to include that sub directory name in the variable as well.

Example:  set g_maplistfile "maplists/mylist.cfg"

This will tell the mod to find a map rotation list called mylist.cfg located in the "maplists" sub directory.

 

Activating the Map List Rotation:

Specifying the maplist file alone will not activate the rotation system based on the list.  You must also activate the rotation system and tell it to use the list.  Otherwise, the vstr system will be used.

CVAR:  g_maplistrules

default is zero (0) - map list rotation system not active.

Maplist Rule Bit Flag Value   Description
Use map list 1 Activates the map list rotation system and uses map speficied in the file indicated by g_maplist file
Random rotation 2 Rotation is non-linear and will randomly choose from maps on the list.
Restrict vote 4 Will only allow votes for maps that are in the list.  Maps that are not on the list cannot be voted for.

 

How to Prepare Your Server Config Files:  Order Matters

The map list file is only a list of maps to be used in the rotation.  You still have to explicitly start the initial map when starting the server.  In your server config files, you must specify the map list variable (g_maplistfile and g_maplistrules) before you start the first map.  Otherwise, the map list will not be read in because the information in the variables would have been empty at the time the first map is loaded.  This rule applies to the enhanced IP banning system as well.

Example1:  The following example attempts to set the variables after the first map is started.  This will not work because when map q3dm1 is loaded, the variables had not yet been set.

[begin config]
...
...
map q3dm1
set g_maplistfile "mylist.cfg"
set g_maplistrules 1
[end config]

This will not work.

 

Example2:  The following example demonstrates the correct way to sequence events in your server config files.

[begin config]
...
...
set g_maplistfile "mylist.cfg"
set g_maplistrules 1
map q3dm1
[end config]

NOTE:  If any errors occurs while trying to process a map list, messages will be printed to the console and Coliseum2 will revert to using the vstr method.

 

Maplist Maintenance Commands:

Once a map rotation list has been read into memory, it will remain in memory, even after a level change, or until a new list is explictly read in.  There are several commands that will allow the server admin or referee to maintain this list as it resides in memory.  Also, refer to Appendix A for a table of all commands and their overall possible permission settings.

< ... > indicates required parameter.  [ ... ] indicates optional parameter.

 Command & Usage
Description
 maplist [page #]

This will list the maps in the rotation list.  Where there are too many maps to list at once, an optional page # may be specified.
This command may be enabled for all clients.

 addmap <map name> [position]

This command will add a new map to the list.  Simply specify the map name and, optionally, its position in the list.

Example:  addmap q3dm1 4
This will add map q3dm1 into the 4th rotation position on the list.  All others map will be shifted down from this position.

The maximum allowable number of maps in the list is 100.

 rmmap <map name>
This will remove the specified map from the rotation.
 readmaplist
Once a map rotation list has been read in, it is kept in memory and the file itself is never looked at again.  However, the server admin or referee could change the variable g_maplistfile to point to a new file.  Execute the readmaplist command to perform a manual reread/new read of a maplist file.

 

 


Table of Contents Help System Enhanced IP Baning