Raised This Month: $12 Target: $400
 3% 

[TF2] MatchMod


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Hawkeye-
Senior Member
Join Date: Jan 2009
Plugin ID:
1126
Plugin Version:
1.1.9
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Facilitates competitive play for league formatted matches
    Old 08-31-2009 , 15:00   [TF2] MatchMod
    Reply With Quote #1

    MatchMod for TF2
    By Hawkeye

    All the documentation and files will now be released through the website (http://matchmod.net/)

    Support and release announcements will still be given through this thread.

    Last edited by Hawkeye-; 10-02-2012 at 21:18. Reason: Moving Plugin info to Website
    Hawkeye- is offline
    Hawkeye-
    Senior Member
    Join Date: Jan 2009
    Old 08-31-2009 , 15:01   Re: [TF2] MatchMod
    Reply With Quote #2

    Usage

    Once this mod and the configs are uploaded to the server, you will want to load the mod to generate the config file for some of the key settings.

    Code:
    sm plugins load matchmod
    This will create a config file in cfg/sourcemod/plugin.matchmod.cfg. This can be edited to your particular preferences.

    The default is below:
    Code:
    // This file was auto-generated by SourceMod (v1.3.1)
    // ConVars for plugin "matchmod.smx"
    
    
    // Admin flag required for access to MatchMod commands.
    // -
    // Default: "a"
    matchmod_adminflag "a"
    
    // Blue team name.
    // -
    // Default: "BLU"
    matchmod_blueteamname "BLU"
    
    // Hostname prefix as mod modifies hostname during the match.
    // -
    // Default: "|MatchMod|"
    matchmod_hostnamepfx "|MatchMod|"
    
    // Hostname suffix for when server is idle.
    // -
    // Default: "Match Server"
    matchmod_hostnamesfx "Match Server"
    
    // Default league that matchmod should use when detecting map types.
    // -
    // Default: "pug"
    matchmod_league "pug"
    
    // Red team name.
    // -
    // Default: "RED"
    matchmod_redteamname "RED"
    
    // Config file used for idle time.
    // -
    // Default: "server.cfg"
    matchmod_servercfgidle "server.cfg"
    You will then want to take a quick look at some of the customizable settings within the league configs. These can be found below:
    • cfg/cevo/custom.cfg
    • cfg/twl/custom.cfg
    • cfg/etf2l/custom.cfg
    • cfg/ugc/custom.cfg
    • cfg/sta/custom.cfg
    Generally, these likely won't need to be edited much. An example is below:

    Code:
    //sv_password "changeme"
    
    //tv_enable "1"
    
    // The following are standard SourceTV settings - Edit to your preference
    
    //tv_name "Source TV"
    //tv_title "Source TV"
    //tv_password "changeme"
    //tv_relaypassword "changeme"
    //tv_port "27020"
    
    tv_allow_camera_man "0"
    tv_autorecord "0"
    tv_dispatchmode "0"
    tv_maxclients "5"
    Now, let's start up a match.

    Note: Assumption here is you have the matchmod_league cvar set to CEVO

    What should be done is select the map, this can be done via your RCON access. for example for Badlands it would be:

    Code:
    rcon changelevel cp_badlands
    Matchmod will auto-detect the map type and set the proper config files automatically based on the matchmod_league CVAR. If you want to manually switch leagues from default league you can use the following command.

    Code:
    sm_matchmod_config cevo-push
    This would select cevo-push rules.

    We can now begin the match sequence by issuing the following command:

    Code:
    sm_matchmod_begin
    The match is now in the ready up phase waiting for the teams to ready up.

    Commands available to players:

    Chat commands
    • !ready - ready up
    • !notready - ready down
    • !teamname "name" - Configures your teamname to something other then RED or BLU
    When 5 on one side have readied up, the team will have the option to run the "!start" command. This command is used to force your team ready if your 1 man down. (Allowable in CEVO rules). If one of the five unreadies themselves, it will force the team to not ready and !start will need to be fired again.

    When six players on a team have readied up, the entire team will automatically be flagged as ready.

    When both teams are flagged as ready, a 15 second delay will occur to allow for players to ensure they are in match class and have the weapons equipped they want. You will hear a 5 second countdown to go time.

    After this the match is live and in the first half.

    At the end of the first half, (30 minutes for 4 caps for Push) the teams will be automatically switched sides and be dropped back into ready-up. The players will need to ready up again to begin the second half. The procedure is identical to the pre-game.

    If the score is tied at the end of the second half, the team will be placed into a ready up again for a sudden death overtime.

    At the end of the match, a winner is declared and the mod will execute the "matchmod_servercfgidle" value to restore normal operations.

    Installing SOAP TF2DM with matchmod

    You don't need all the plug-ins included in Lange's release, MatchMod actually fills some of the functions of those plug-ins for you. From the SOAP release, you will need to following files
    /addons/sourcemod/config
    tf2dm.cfg
    /addons/sourcemod/extensions
    dukehacks.ext.dll
    dukehacks.ext.so
    /addons/sourcemod/gamedata
    dukehacks.txt
    sdmr.games.txt
    tf2dm.hpboost.txt
    unlock.games.txt
    /addons/sourcemod/plugins
    opensesame.smx
    soap_killboost.smx
    tf2dm.smx
    /addons/sourcemod/scripting
    tf2dm.sp
    Now to utilize this with MatchMod, you will want to unload the three plugins before a match begins. This is what the prematch.cfg is designed for.

    The Prematch.cfg should look like:
    PHP Code:
    sm plugins unload tf2dm
    sm plugins unload opensesame
    sm plugins unload soap_killboost
    sm plugins load_lock
    say Disabling SOAP DM 
    What that file just did, was unload the three plugins, then cause a lock to occur to prevent them from loading.

    After the match completed we want to restore the server plugins, so postmatch.cfg should look like:
    PHP Code:
    sm plugins load_unlock
    sm plugins refresh
    say Restoring SOAP DM 
    We simply removed the lock and have Sourcemod refresh the plugins to reload anything that isn't already loaded.

    What this feature is really designed to do, is allow server operators who have public server or more social focused community the ability to use their existing servers to run a match, temporarily disabling any plugins that might interfere with the match, then re-enabling then after its over.

    This with the tf2lobby integration I put into the last version, means it is possible to use empty public servers for lobbies as long as your prematch.cfg removes all the offending plugins (see the OP where the recommended plugins to remain loaded are listed).

    Last edited by Hawkeye-; 04-12-2010 at 17:16. Reason: Reformetted post and copied the SOAP stuff up here
    Hawkeye- is offline
    Hawkeye-
    Senior Member
    Join Date: Jan 2009
    Old 09-02-2009 , 16:35   Re: [TF2] MatchMod
    Reply With Quote #3

    Updated, the example configs from before were the wrong set, the right set is here now, and so is the code update with a few extra things.
    Hawkeye- is offline
    Nightbox
    Senior Member
    Join Date: Apr 2008
    Old 09-02-2009 , 18:18   Re: [TF2] MatchMod
    Reply With Quote #4

    Intresting but match servers are not using sourcemod
    __________________
    Nightbox is offline
    Kenny Loggins
    SourceMod Donor
    Join Date: Jun 2008
    Location: Rochester, MN
    Old 09-02-2009 , 23:42   Re: [TF2] MatchMod
    Reply With Quote #5

    Nice job!
    __________________

    Server Admin / Leader
    ClanAO.com
    Kenny Loggins is offline
    Hawkeye-
    Senior Member
    Join Date: Jan 2009
    Old 09-03-2009 , 00:53   Re: [TF2] MatchMod
    Reply With Quote #6

    Quote:
    Originally Posted by Nightbox View Post
    Intresting but match servers are not using sourcemod
    This is more for individual clans to use to simulate match servers, where sourcemod is much more common. :-)
    Hawkeye- is offline
    Hawkeye-
    Senior Member
    Join Date: Jan 2009
    Old 09-04-2009 , 14:48   Re: [TF2] MatchMod
    Reply With Quote #7

    Updated once again.
    • CTF Support is added.
    • New command to name the teams so rcon is not required.
    • Cleared a few more bugs
    Feedback Request:

    Should the logging stay on the entire match period (like now) or should it split into 1st half, 2nd half, and Overtime logs? What makes sense for you guys?
    Hawkeye- is offline
    wycs
    Junior Member
    Join Date: Dec 2008
    Old 09-06-2009 , 23:07   Re: [TF2] MatchMod
    Reply With Quote #8

    Nice work, using it on our clans server for matches now. Can't wait for the individual ready up and future versions.

    Re: the logs, personally I'd prefer them to be kept as a single file.
    wycs is offline
    Hawkeye-
    Senior Member
    Join Date: Jan 2009
    Old 09-11-2009 , 14:55   Re: [TF2] MatchMod
    Reply With Quote #9

    Not a plugin update, but thinking over the menu integration, not a whole lot would really be able to make it into the menu since most of the options exist as outside .cfg files ued by the mod.

    That being said, I made a custom menu for adminmenu_custom.txt for those using the example configs.

    Code:
    "Commands"
    {
     "MatchMod"
     {
      "admin" "sm_kick"
      "MatchMod Begin"
      {
       "cmd" "sm_matchmod_begin"
       "execute" "server"
      }
      "MatchMod End"
      {
       "cmd" "mp_tournament_restart"
       "execute" "server"
      }
     
      "Competition Configuraton"
      {
       "cmd" "exec #1"
       "execute" "server"
       "1"
       {
        "type" "list"
        "title" "Game Mode:"
        "1" "matchmod/ctf.cfg"
        "1." "Capture the Flag"
        "2" "matchmod/push.cfg"
        "2." "Push"
        "3" "matchmod/stopwatch.cfg"
        "3." "Stopwatch"
        "4" "matchmod/soldierduel.cfg"
        "4." "Soldier Duel"
       }
      }
      "Pick-up Games"
      {
       "cmd" "exec #1"
       "execute" "server"
       "1"
       {
        "type" "list"
        "title" "Game Mode:"
        "1" "matchmod/pug-ctf.cfg"
        "1." "CTF"
        "2" "matchmod/pug-push.cfg"
        "2." "Push"
        "3" "matchmod/pug-stopwatch.cfg"
        "3." "Stopwatch"
       }
      }
     }
    }
    Hawkeye- is offline
    robsco
    Junior Member
    Join Date: Sep 2009
    Old 09-21-2009 , 11:15   Re: [TF2] MatchMod
    Reply With Quote #10

    Nice work. One problem I have come across is that it never actually starts recording a demo when both teams ready up. I had a look through your code and the recording part seems to be set up properly but on my server I'm not even getting a 'PrintToChatAll' that it has started recording when the first half starts.
    robsco 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 04:42.


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