Raised This Month: $7 Target: $400
 1% 

[UMC3] Ultimate Mapchooser 3.4.5 (Updated 10/7/2012)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Steell
SourceMod Donor
Join Date: Mar 2009
Plugin ID:
1847
Plugin Version:
3.4.5
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    173 
    Plugin Description:
    Provides advanced control over map selection for the server.
    Old 08-01-2010 , 19:19   [UMC3] Ultimate Mapchooser 3.4.5 (Updated 10/7/2012)
    Reply With Quote #1

    Ultimate Mapchooser 3

    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.
    Table Of Contents:

    ------------------------------------------------------------------------------------------


    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:
    Code:
    "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:
    Click image for larger version

Name:	unscrambled.png
Views:	32859
Size:	61.5 KB
ID:	70969
    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:
    Click image for larger version

Name:	scrambled.png
Views:	30208
Size:	52.8 KB
ID:	70970

    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:
    Click image for larger version

Name:	catun.png
Views:	30406
Size:	52.5 KB
ID:	70972
    Scrambled:
    Click image for larger version

Name:	catsc.png
Views:	29539
Size:	48.1 KB
ID:	70973
    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:
    Code:
    "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.
    For release/installation notes, see the release post here: https://forums.alliedmods.net/showth...59#post1814459
    Attached Files
    File Type: zip UMC3_4_5.zip (312.8 KB, 30046 views)

    Last edited by Steell; 12-20-2016 at 11:01.
    Steell is offline
    Steell
    SourceMod Donor
    Join Date: Mar 2009
    Old 08-02-2010 , 17:00   Re: [ANY] Improved Map Randomizer
    Reply With Quote #2

    Version 1.1 Released.
    • Added public cvar for tracking.
    • Modified nominations
      • Nominations menu now contains all maps in rotation. Nominated maps will now be rejected when considered for inclusion in the vote. This way, players can nominate maps which may be valid when it's time to vote, even if they aren't valid at time of nomination.
    Steell is offline
    crazydog
    AlliedModders Donor
    Join Date: Jan 2006
    Old 08-02-2010 , 21:30   Re: [ANY] Improved Map Randomizer
    Reply With Quote #3

    Would you be able to implement some of the features of this plugin
    https://forums.alliedmods.net/showthread.php?t=124280
    into yours?
    At least runoff voting + starting the votes at 4 (instead of 1) would be nice.
    crazydog is offline
    Steell
    SourceMod Donor
    Join Date: Mar 2009
    Old 08-02-2010 , 21:39   Re: [ANY] Improved Map Randomizer
    Reply With Quote #4

    I could definitely implement runoff voting, and perhaps a warning timer to notify players of an incoming vote. I could probably implement the slot-blocking features but it would take significantly longer (unless I can implement it using menus rather than panels).

    For now, consider these upcoming features. I'll add them to the OP.

    Last edited by Steell; 08-10-2010 at 13:57.
    Steell is offline
    Steell
    SourceMod Donor
    Join Date: Mar 2009
    Old 08-03-2010 , 01:18   Re: [ANY] Improved Map Randomizer v1.1.1 (Updated 8/3)
    Reply With Quote #5

    Version 1.1.1 Released.
    • Fixed bug where rounds ending would trigger end of map votes even after one was already triggered.
    • Fixed bug where frags would trigger end of map votes even after one was already triggered.
    • Fixed bug where current map would appear in votes.
    • Fixed bug where random selection of the next map would not work properly.
    Steell is offline
    coach
    SourceMod Donor
    Join Date: Jun 2008
    Old 08-03-2010 , 05:20   Re: [ANY] Improved Map Randomizer v1.1.1 (Updated 8/3)
    Reply With Quote #6

    I tried this on DODS & had the following error:

    L 08/03/2010 - 19:162: SourceMod error session started
    L 08/03/2010 - 19:162: Info (map "dod_donner") (file "errors_20100803.log")
    L 08/03/2010 - 19:162: [SM] Native "HookConVarChange" reported: Invalid convar handle 0 (error 4)
    L 08/03/2010 - 19:162: [SM] Displaying call stack trace for plugin "improved-randomizer.smx":
    L 08/03/2010 - 19:162: [SM] [0] Line 328, c:\Development\sourcemod\Sourcemod\TestPlugin \improved-randomizer.sp::OnPluginStart()

    Looks like it has potential.
    coach is offline
    Steell
    SourceMod Donor
    Join Date: Mar 2009
    Old 08-03-2010 , 09:36   Re: [ANY] Improved Map Randomizer v1.1.1 (Updated 8/3)
    Reply With Quote #7

    Looks like DOD:S doesn't have the mp_roundlimit cvar. I think I can fix this issue, but I don't have DOD:S so I can't really test it.
    Steell is offline
    Steell
    SourceMod Donor
    Join Date: Mar 2009
    Old 08-03-2010 , 15:39   Re: [ANY] Improved Map Randomizer v1.1.1 (Updated 8/3)
    Reply With Quote #8

    Err, ignore that last post, turns out the cvar is actually mp_maxrounds and DOD:S does indeed have it. Did you try running the most recent version of the plugin? For some reason the line number in the stack trace isn't corresponding with the source.
    Steell is offline
    coach
    SourceMod Donor
    Join Date: Jun 2008
    Old 08-03-2010 , 18:16   Re: [ANY] Improved Map Randomizer v1.1.1 (Updated 8/3)
    Reply With Quote #9

    Yep using the latest version. Downloaded it fresh last night. I tried compiling it myself & using your smx file but both would not load. I am using SM 1.3.3. Not sure if that could be the problem?
    coach is offline
    Steell
    SourceMod Donor
    Join Date: Mar 2009
    Old 08-04-2010 , 14:11   Re: [ANY] Improved Map Randomizer v1.1.2 (Updated 8/4/10)
    Reply With Quote #10

    Version 1.1.2 Released.
    • Fixed bug in DOD:S where plugin could not start due to missing "mp_maxrounds" cvar.
    Steell is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 00:35.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode