Module Random Mapcycle - Steell/Ultimate-Mapchooser GitHub Wiki
The Random Mapcycle module is used to randomly pick a map from its defined UMC-Mapcycle to be the next map. This selection is done at the end of the map, in order to ensure that the conditions for exclusion and weighting are as close as possible to what they will be when the selected map is actually played. Random Mapcycle will NOT set a next map if at any point during the current map, Ultimate Mapchooser sets the next map (could be from a vote, command, etc.).
The module also allows some control over the randomization. Users can define which group should be randomly picked from on a per-map and per-group basis. Note that if there are no available maps from this defined map group (they are all excluded), then a random group is selected.
This module defines one new map group option, next_mapgroup, and one new map option, also next_mapgroup. The group option is used as a default in the event that the map option is omitted in the UMC-Mapcycle definition.
"umc_mapcycle"
{
"A Group"
{
"next_mapgroup" "GROUPNAME"
...
"A Map"
{
"next_mapgroup" "GROUPNAME"
...
}
}
...
}
Where GROUPNAME is the name of the mapgroup to be selected from next time, or nothing ("") if it should select from every group.
The list of cvars for Random Mapcycle is defined in cfg/sourcemod/umc-randomcycle.cfg.
###Example
"umc_mapcycle"
{
"GroupA"
{
"next_mapgroup" "GroupB"
"MapAA"
{
"next_mapgroup" ""
}
"MapBA"
{
}
}
"GroupB"
{
"MapAB"
{
}
"MapBB"
{
}
}
}
This example defines two Map Groups, "GroupA" and "GroupB", and two maps in each group. "GroupA" has the option next_mapgroup set so that if the map currently being played is from "GroupA", Random Mapcycle will try and select a random map from "GroupB". "MapAA" defines it's own next_mapgroup, and is set so that the next map group will be selected at random. So if the current map is "MapAA" from group "GroupB", then Random Mapcycle will select a random map from a random map group.
In "GroupB", next_mapgroup is not defined, so by default it will be randomly selecting the next map from a randomly selected map group.