Thread: [TF2] MatchMod
View Single Post
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