Home » [UMC3] Ultimate Mapchooser 3.4.5

[UMC3] Ultimate Mapchooser 3.4.5

The full documentation is available at this project’s Google Code page: http://code.google.com/p/sourcemod-ultimate-mapchooser
The most recent source code is available at this project’s GitHub repository: https://github.com/Steell/Ultimate-Mapchooser

About:

Ultimate Mapchooser allows for increased control over map selection. This includes:

  • Random selection of the next map.
  • Which maps are added to votes
  • Which maps are available for nominations

You can control how the randomization works by dividing your map rotation into groups, and controlling the weights of each group or each individual map, specify a minimum or maximum number of players allowed on the server for the map to be available, specify how many maps from a group are allowed in a vote, etc.

In order for this to work, I had to completely bypass RTV, Mapchooser, and Nominations, which means I rewrote each’s functionality into this plugin. You can control each of these features via Ultimate Mapchooser’s cvars.

——————————————————————————————

Features:

Any and all features can be turned on and off.

Map Exclusion – umc-playerlimits.smx, umc-timelimits.smx, umc-prefixexclude.smx
Maps can have a defined minimum and maximum amount of players, as well as a minimum and maximum time of day they can be played. If the server does not presently fit the criteria defined by the map, then the map will not be selected.

Random Mapcycle – umc-randomcycle.smx
Similar to the functionality built into randomcycle.smx, but random maps are selected at the END of the map, rather than the beginning, and maps are checked for exclusion before being selected (see Map Exclusion).

End of Map Vote – umc-endvote.smx
Similar to the functionality built into mapchooser.smx, but you are given more control over how these votes are populated. Maps can be divided up into groups which are then distributed in the vote how you see fit. Want to make sure some maps always appear in the vote? Totally possible.

Rock The Vote – umc-rockthevote.smx
Similar to the functionality built into rockthevote.smx, but has the same customization features as Ultimate Mapchooser’s End of Map vote.

Nominations – umc-nominate.smx
Similar to the functionality built into nominations.smx. Map Exclusion does not apply to the nominations menu; nominated maps are checked for exclusion at the time of a vote.

Player Count Monitoring – umc-playercountmonitor.smx
If the map being currently played has defined player limits, and the limits are broken by players joining/leaving the server, Ultimate Mapchooser can perform actions to change the map to one that does match the number of players.

Vote Warnings – umc-endvote-warnings.smx
You can define various times before an end of map vote starts where notifications to the server are displayed, warning them of an impending vote.

Vote Sounds – umc-core.smx
You can define sounds that are played at the start and end of votes.

Vote Slot Blocking – umc-core.smx
You have the option to block the first three slots in a vote, in order to prevent accidental votes.

Runoff Votes – umc-core.smx
If a vote ends and the winning option doesn’t have a majority, then another vote will be held between the winners (until there is a majority).

Random Weighting – umc-weight.smx, umc-maprate-reweight.smx
You can modify how likely it is that a map/group is to be picked randomly (inserted into a vote, picked for the next map, etc.).

Module List:

Unless stated otherwise, all modules work independently and do not require other plugins/modules to be loaded. The one exception being umc-core.smx, which is required for UMC to work at all. This means that any modules which you are not using can be disabled. Check each module’s documentation to understand what they do and if you need them.

  • UMC Core – Core component of Ultimate Mapchooser, required for UMC to function.
  • UMC Admin Menu – Adds various UMC features to the SourceMod admin menu.
  • End of Map Vote – Starts a vote towards the end of the current map that will set the next map.
  • Rock the Vote – Provides an implementation of the Rock The Vote voting system for UMC. Players type “rtv” to enter the vote, once enough players have entered a vote is displayed.
  • Nominations – Adds a “nominate” command and chat trigger that will allow clients to nominate maps from a menu.
  • Random Mapcycle – Randomly selects a map from a mapcycle at the end of the map.
  • Vote Command – Adds a “mapvote” command to manually start a UMC vote.
  • Weight – Allows you to specify weight options in your mapcycle in order to control how likely maps and groups are to be randomly selected.
  • Time Limits – Allows you to specify a range of time a map is available for.
  • Player Limits – Allows you to specify a range of the amount of players on the server that a map will be available for.
  • Map Commands – Allows you to specify console commands that will be executed for maps and groups at the start of a map.
  • Echo Nextmap – Displays a Center or Hint message when the nextmap has been set.
  • End of Map Vote Warnings – Displays warning messages and plays warning sounds leading up to an End of Map Vote. Requires the End of Map Vote module to be enabled in order to work.
  • Player Count Monitor – Changes the map (or triggers a vote) if the amount of players on the server drops below or rises above the given boundaries. Boundaries can be set on a per-map basis.
  • Map Rate Map-Reweighting – Takes the average rating for the current map from the Map Rate plugin and uses it to make maps more or less likely to be picked randomly. Requires the Map Rate plugin to be installed and active in order to work.
  • Map Prefix Exclusion – Allows you to specify how many previously played map prefixes to make unavailable.
  • Post-Played Exclusion – Allows you to specify a period of time after a map has been played that the map is unavailable.

Installation:

Just download the attached zip archive and extract to your game folder intact. Then navigate to your plugins/ directory and disable and modules you do not wish to use by moving them to the disabled/ folder. Full installation instructions are located here: http://code.google.com/p/sourcemod-u…nConfiguration

If you would like to use UMC’s Auto-updating feature, simply install and configure Updater by GoD-Tony.

Note: If you are planning on using the Nomination, Random Mapcycle, End of Map Vote, or RTV features of this plugin, it is recommended that you have nominations.smx, randomcycle.smx, mapchooser.smx, and rockthevote.smx respectively disabled.

Configuration:

For most modules, there is a corresponding cvar configuration file located in cfg/sourcemod/. They will be prefixed with “umc-“.

Besides the cvar configuration files, there is the following:

umc_mapcycle.txt – All maps and groups are configured here.
addons/sourcemod/configs/vote_warnings.txt – Vote warnings are configured here. This is optional.

I’ve included extensive information about all settings in the files included in the attached archive. Make sure you read them to understand all functionality. In-depth configuration is discussed on the project wiki, located here: http://code.google.com/p/sourcemod-u…nConfiguration

Usage:

  • If RTV is enabled, players can type “rtv” in chat to start Rock The Vote.
  • If Nominations are enabled, players can type “nominate” in chat to nominate a map for RTV or an end of map vote.
  • If end of map voting is enabled, a vote will appear at the time you specify where players can vote for the next map.
  • If random selection of the next map is enabled, the next map will be chosen at the end of the map automatically.

Admin Commands:

  • sm_umc_mapvote – Starts a map vote. Use this to test to see if your votes are the way you want them. Requires the umc-votecommand.smx module to be active.
  • sm_umc_reload_mapcycles – Reloads all UMC-Mapcycles.
  • sm_umc_randcycle_picknextmapnow – Sets a random next map. Requires the umc-randomcycle.smx module to be active.
  • sm_setnextmap – Sets the nextmap, disabling the end of map vote. Replicated from original mapchooser.
  • sm_umc_stopvote – Stops any UMC vote currently in progress.
  • sm_umc_maprate_testreweight – Displays how Map Rate’s ratings are affecting a given map. Requires the umc-maprate-reweight.smx module to be active.

You need to have the changemap (g) flag in order to use these commands on the server.

Example:

For this example, assume all of the packaged modules are active.

umc_mapcycle.txt:

"umc_rotation"
{
    "Attack & Defend"
    {        
        "maps_invote" "1"
        "next_mapgroup" "Payload"
 
        "cp_dustbowl"
        {
            "weight"    "2"
        }
 
        "cp_gravelpit" {}
 
        "cp_steel" {}
 
        "cp_egypt_final" {}
 
        "cp_junction_final" {}
 
        "cp_gorge"
        {
            "max_players"    "16"
        }
    }
 
    "Payload"
    {
        "maps_invote"    "1"
 
        "pl_goldrush"
        {
            "weight"    "2"
        }
 
        "pl_badwater"
        {
            "weight"    "4"
        }
 
        "pl_thundermountain" {}
 
        "pl_upward" {}
 
        "pl_hoodoo_final" {}
    }
 
    "5-Point CP (Push)"
    {
        "maps_invote"         "1"
        "default_min_players" "2"
        "group_weight"        "2"
 
        "cp_granary" {}
 
        "cp_well"
        {
            "weight"    ".5"
            "min_players"     "12"
        }
 
        "cp_coldfront" {}
 
        "cp_yukon_final" {}
 
        "cp_badlands" {}
 
        "cp_fastlane" {}
    }
 
    "Capture The Flag"
    {
        "ctf_2fort" {}
 
        "ctf_well"
        {
            "min_time"    "1200"
            "max_time"   "2359"
        }
 
        "ctf_turbine" {}
 
        "ctf_sawmill" {}
    }
 
    "Payload Race"
    {
        "default_min_time"    "0000"
        "default_max_time"    "1200"

        "plr_pipeline" {}
 
        "plr_hightower" {}
    }
 
    "King of the Hill"
    {
        "command"  "mp_timelimit 0"

        "koth_sawmill" {}
 
        "koth_nucleus" {}
 
        "koth_viaduct" {}
    }
}

A brief overview of this file:
  • The maps have been broken down into 6 groups.
  • Each group will have up to 1 map appear in a vote, whether that vote be RTV or an end of map vote.
  • “5-Point CP (Push)” is twice as likely to be selected randomly than any other group (this doesn’t affect votes, only random selection of the next map).
  • If at any point a map is selected from the “Attack & Defend” group–whether from vote or random selection of the next map–the next time a map is randomly selected it will be from the “Payload” group (this doesn’t apply to votes, only random selection of the next map).
  • Some maps are more or less likely to be selected than others in their group (see the “weight” setting).
  • The “5 Point CP (Push)” group can only be selected when there are more than two people on the server (every map has a “min_players” value of at least 2).
  • “cp_well” can only be selected if there are at least 12 people on the server.
  • “cp_gorge” cannot be selected if there are more than 16 people on the server.
  • “ctf_well” can only be played between 12:00PM and 11:59PM.
  • The “Payload Race” group can only be selected between the times of 12:00AM and 12:00PM.
Here is what a typical RTV or end of map vote would look like with this rotation:

Notice that every map corresponds to a group in the order the groups are defined in umc_mapcycle.txt. Also notice that because there is less than two players on the server, no maps from "5 Point CP (Push)" are in the vote.

By changing a cvar, you can have the menu scrambled. This is a screenshot of a different vote from the same umc_mapcycle.txt file with the scrambled menu cvar on:

You can also have a vote show the names of each category. If a category's "maps_invote" setting is greater than zero, it will appear in the vote. This feature is activated via cvars.
Unscrambled:

Scrambled:

Again, notice how because there are not enough players on the server, "5 Point CP (Push)" is not included.

Now for an example on how Vote Warnings are configured.

vote_warnings.txt:
"vote_warnings"
{
    "default"
    {
        "message"  "{TIME} seconds until vote."
        "notification"  "C"
        "sound"  ""
    }

    "60"
    {
        "message"  "1 minute until vote."
        "notification"  "S"
    }

    "30"
    {
        "notification"  "S"
    }

    "10" { }

    "5-1"
    {
        "sound"  "vo/announcer_end_{TIME}sec.wav"
    }

    "0" { }
}

A brief overview of this file:

  • The “default” warning contains values to be used if settings are omitted from actual warnings. For example, warning “60” does not specify a sound, so it uses the one defined in “default” (which in this case is nothing).
  • The name of the warning section determines how much time (in seconds) before the vote that the warning is displayed. In this examples, warnings are defined for 60, 30, 10, 5, 4, 3, 2, 1, and 0 seconds.
  • The “message” option defines the text to be displayed for the warning.
  • The “message” option can contain the string “{TIME}.” If this string is present in “message,” it is replaced with the time the warning is triggered before the vote. (This is really only useful for defining the default).
  • The “notification” option specifies how the server is notified for the warning. The default in this example, “C”, means that the notification will appear in the center of the screen. For warning “60”, the “S” means it will appear in chat.
  • The “sound” option defines a sound file, relative to the “sound” directory, to be played at the time of the warning. If left blank (“”), no sound will play.
Support

If you are having problems with the plugin, please post the following information in this thread so I can help you to the best of my ability:

  • umc_mapcycle.txt mapcycle file
  • Both error and normal logs for the days where your issues were occurring.
  • If you’re having an issue with vote warnings, then I will also need to see your vote_warnings.txt file.
  • It’s a good idea to also show me all of your configuration files as well.

For quick support, you can reach me in the SourceMod IRC channel. For private support, I am also available via PM. You can, of course, always post in this thread and I will see it eventually.

Other Information

This plugin is meant to be run with Sourcemod 1.4 or above.

Please post any bugs you find, I will try and fix them all as soon as possible. I also appreciate any requests and suggestions for improvement.

If you edit UMC’s source code to suit your own purposes, I ask that you leave the plugin information and tracking cvar alone, that way interested users can find their way here, and I can accurately track where this plugin is getting used (plus I’ll probably join your server at some point).

For the full changelog, look in the source code.


Files

  • File: UMC3_4_5 • 313 kB • 74 Downloads
    Caption:
    Description:

Leave a Reply

Your email address will not be published. Required fields are marked *