UMCCoreModule - Silenci0/UMC GitHub Wiki
The Core module is the only module required by Ultimate Mapchooser. It is what handles the logic behind excluding and weighting maps, as well as hooking all of the natives and forwards together which allows other modules to extend Ultimate Mapchooser. In short, without Core, UMC modules cannot communicate with each other.
Core also contains a few universal settings which control some general behavior of votes.
The core defines two map group and two map options for the umc_mapcycle file:
-
maps_invote
- The number of maps which should appear in the vote (integer greater than or equal to 0) -
display-template
- The string that will be displayed for any maps from the group in a vote (it can contain the sub-string "{MAP}" which will be replaced with the name of the map)
-
display
- The string that will be displayed for that map in a vote. This overrides whatever was specified by display-template in the group options. -
nominate_group
- The display name of a map group which you want this map to be associated with if it is nominated. If left blank, it will default to the name of the group the map already belongs to (in the below example, "A Group" would be the group name this map is associated to). This is particularly useful if you are using the Tiered Nomination Menu (see sm_umc_nominate_tiermenu in the Nomination module), since you can then design this UMC-Mapcycle for the nomination menu and use a UMC-Mapcycle with different groups for other modules.
Below is an example of how/where these options are used in the umc_mapcycle file. Replace X, TEMPLATE_STRING, DISPLAY_STRING, and GROUP_NAME with whatever is desired (or leave empty):
"umc_mapcycle"
{
"A Group"
{
"maps_invote" "X"
"display-template" "TEMPLATE_STRING"
"A Map"
{
"display" "DISPLAY_STRING"
"nominate_group" "GROUP_NAME"
}
}
}
In most cases, you can leave out/remove these options from the umc_mapcycle file and it will fall back on default behavior. It is advised, however, to define maps_invote so that you can display a number of maps during every vote.
Core provides the following in-game commands for admins (these can be used via the in-game console):
-
sm_umc_reload_mapcycles
- Requests that all modules reload their UMC-Mapcycles. -
sm_setnextmap <mapname>
- Sets the next map (same functionality as was built into the original mapchooser.smx) -
sm_umc_stopvote
- Stops an Ultimate Mapchooser vote currently in progress. -
sm_umc_displaymaplists <0|1>
- Displays all maplists being used by UMC. Pass 1 as an argument to see them after being filtered through UMC Map Exclusion. -
sm_umc_maphistory
- Shows the most recently played maps.
Below is the cvar list for the Core module. The config file is located in cfg/sourcemod/ultimate-mapchooser.cfg.
// Specifies a sound to be played each second during the countdown time between runoff and tiered votes. (Sound will be precached and added to the download table.)
// -
// Default: ""
sm_umc_countdown_sound ""
// Determines where in votes the "Don't Change" option will be displayed.
// 0 - Bottom,
// 1 - Top
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_umc_dontchange_display "0"
// Determines where in votes the nominated maps will be displayed.
// 0 - Bottom,
// 1 - Top
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_umc_mapnom_display "1"
// Specifies a server command to be executed when the map is extended by UMC.
// -
// Default: ""
sm_umc_extend_command ""
// Determines where in votes the "Extend Map" option will be displayed.
// 0 - Bottom,
// 1 - Top
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_umc_extend_display "0"
// Enables in-depth logging. Use this to have the plugin log how votes are being populated.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_umc_logging_verbose "0"
// String to replace the {NOMINATED} map display-template string with.
// -
// Default: "^"
sm_umc_nommsg_display "^"
// Determines where the Runoff Vote Message is displayed on the screen.
// C - Center Message
// S - Chat Message
// T - Top Message
// H - Hint Message
// -
// Default: "C"
sm_umc_runoff_display "C"
// Specifies whether runoff votes are only displayed to players whose votes were eliminated in the runoff and players who did not vote.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_umc_runoff_selective "0"
// Specifies the maximum number of maps to appear in the second part of a tiered vote.
// -
// Default: "6"
// Minimum: "2.000000"
sm_umc_vote_tieramount "6"
// Determines where the Tiered Vote Message is displayed on the screen.
// C - Center Message
// S - Chat Message
// T - Top Message
// H - Hint Message
// -
// Default: "C"
sm_umc_vote_tierdisplay "C"
// Specifies how many slots in a vote are disabled to prevent accidental voting.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "5.000000"
sm_umc_votemanager_core_blockslots "0"
// If enabled, votes will use Valve-Stlye menus (players will be required to press ESC in order to vote).
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_umc_votemanager_core_menu_esc "0"
// Enables No Vote option at the top of vote menus. Requires SourceMod >= 1.4
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_umc_votemanager_core_novote "0"
// Specifies the default UMC Vote Manager to be used for voting. The default value of "core" means that Sourcemod's built-in voting will be used.
// -
// Default: "core"
sm_umc_votemanager_default "core"