splewis / csgo-pug-setup

CS:GO Sourcemod plugin for setting up private pug/10man games
GNU General Public License v3.0
411 stars 91 forks source link
counter-strike counter-strike-global-offensive csgo sourcemod

csgo-pug-setup

Build status GitHub Downloads Discord Chat

Status: Supported.

This is a useful plugin for managing pug games, especially 10 mans/gathers. It allows a player to type .setup into chat and select (from a menu):

The goal is to allow a lightweight, easy-to-use setup system that automates as much as possible with as few dependencies as possible. However, the goal isn't fully automated - it assumes the players know each other or there is an admin. There is no mechanism for kicking players or anything similar.

Part of being lightweight is doing nothing that can interfere with the server's performance. When the game is actually live, the plugin is doing extremely little work - the only thing it does is read chat commands (e.g. pausing when a captain types .pause). Otherwise, there is 0 effect on gameplay and the rounds progress the same as without sourcemod on the server. This is in contrast to the WarMod plugin or what ESEA servers use, where they are tracking the overall score, overriding the in-game warmup period, etc.

The goal is to make setup easier for people, not provide a comprehensive pug platform. Please keep this and the principle of keep it simple, stupid in mind when making any suggestions.

Also see the AlliedModders thread.

Some alternatives

Download

You should be able to get the most recent download from https://github.com/splewis/csgo-pug-setup/releases.

This plugin optionally supports the Updater plugin, which will automatically update to backwards compatible releases. This will only update the base plugin and any change that required breakage will not auto-update, so you should still check here for newer versions.

You may also download the latest development build if you wish. If you report any bugs from these, make sure to include the build number (when typing sm plugins list into the server console, the build number will be displayed with the plugin version).

Usage

There is a notion of the the pug/game "leader". This is the player that writes .setup first and goes through the setup menu. The leader has elevated permissions and can use some extra commands (e.g. pause). To prevent some abuse there is also an admin command sm_leader to manually change the leader.

Generally, here is what happens:

Installation

Since this is a sourcemod plugin, you must have sourcemod installed. You can download it at http://www.sourcemod.net/downloads.php.

Note that sourcemod also requires MetaMod:Source to be on the server. You can download it at http://www.sourcemm.net/downloads.php.

Installing these simply means placing their files on the game server. Uploading them over FTP (for example, using FileZilla) is all you need to do.

As of the panorama update, sourcemod 1.9 (v6241 and later) is required.

Download pugsetup.zip and extract the files to the game server. You can simply upload the addons and cfg directories to the server's csgo directory and be done.

From the download, you should have installed the following (to the csgo directory):

Once all of these are on the server, it should just work. If you want to tweak the configs, maplists, or use the addon-plugins, read on.

Sometimes it's easier to add features in a separate plugin than the core plugin. There are a few addon (optional) plugins included in the download; all of these are in the plugins/disabled directory and they are all independent of each other. To enable one, move it from the plugins/disabled directory to the plugins directory. To read the descriptions of them (which you should do before you enable them), read the Addon Plugins section.

Configuration

For quick help, also check the FAQ for some commonly asked configuration questions.

After installing the plugin, start the server and check cfg/sourcemod/pugsetup. There will be a file called pugsetup.cfg that you can edit to change the cvars the plugin uses. I recommend skimming this file at least to see if there's anything you want to change.

You can also modify the behavior of the setup menu: each option has a default value and a display setting. The display setting controls whether the option is displayed at all - if the display for an option is turned off the default is used. You can edit addons/sourcemod/configs/pugsetup/setupoptions.cfg to do this.

Alternatively, you can edit these options ingame. For example, to turn demo recording to be always on and remove it from the setup menu, you can type:

.setdefault record 1
.setdisplay record 0

This changes will save to the setupoptions config file automatically.

(A side note: when a knife round occurs the command exec sourcemod/pugsetup/knife is sent to the server - so you can edit the file cfg/sourcemod/pugsetup/knife.cfg if you wish. For example, you uncomment the last 2 lines in that file to do taser+knife rounds)

You can also add more chat alias commands in addons/sourcemod/configs/pugsetup/chataliases.cfg if you wish. If players are not comfortable with english, I'd strongly recommend adding chat aliases, since those will be read by the plugin and used in chat messages when referencing commands.

Just like with setup options, you can edit these in game. For example, you could type:

.addalias .gaben sm_ready

This will automatically save to the chataliases config file.

By default the plugin uses the cfg/sourcemod/pugsetup/live.cfg config when going live. You are free to change this file all you want (or change which file is used via the sm_pugsetup_live_cfg cvar). (Note: if you use knife rounds, the knife config will be executed after the live config, but all the cvars it changed will be restored to their previous values after the knife round finishes.)

Discord Chat

A Discord channel is available for general discussion.

For developers

There is some extension support in the form of some natives and forwards. See pugsetup.inc.

The optional addon plugins generally make good use of these. Check the scripting directory and look at some for examples.

Enabling GOTV

You need to enable gotv to use the demo-recording feature. Adding the following to your server.cfg will work:

tv_enable 1
tv_delaymapchange 1
tv_delay 45
tv_deltacache 2
tv_dispatchmode 1
tv_maxclients 10
tv_maxrate 0
tv_overridemaster 0
tv_relayvoice 1
tv_snapshotrate 20
tv_timeout 60
tv_transmitall 1

Of course, you can tweak the values.

Commands

Some commands that are important are (all of these are actually sm_ commands for console, but most people use the ! chat command):

You can also type !ready instead of .ready, or !capt instead of .capt, etc.

Note: above are actually only chat aliases of the commands - the "true" command of .ready is the console command sm_ready. This is true for all pugsetup commands. Being able to type !ready, /ready, or .ready in chat are simply for convenience.

These are some helper commands for automation purposes the bypass requiring a player to press any menus:

Other admin level commands are:

The command pugstatus (which is only a console command) will dump pug match state information, including setup options, pug leader, captains, etc.

ConVars

These are put in an autogenerated file at cfg/sourcemod/pugsetup.cfg, once the plugin starts it will autogenerate that file with these cvars and values.

Addon plugins

pugsetup_autokicker

This plugin kicks players that join when the game is already live, and players not selected by captains when using captain-player selection. It also offers admin immunity. You can tweak its behavior by editing cfg/sourcemod/pugsetup_autokicker.cfg.

pugsetup_teamnames

This plugin sets team names/flag according to the players on the team. Here's how it works

pugsetup_teamlocker

This plugin blocks players from joining full teams when a game is live.

pugsetup_hostname

This plugin adds some tags to the server hostname depending on the pug status, examples: "[LIVE 11-5]" and "[NEED 3]".

pugsetup_rwsbalancer

This plugin implements a simple rws calculation scheme and adds an option to the .setup menu to use autobalanced teams. When using captains, the players with the 2 highest RWS values will be made captains. You can tweak its behavior by editing cfg/sourcemod/pugsetup_rwsbalancer.cfg.

pugsetup_chatmoney

This plugin prints out the team members' money to chat on round starts, you can tweak its behavior by editing cfg/sourcemod/pugsetup_chatmoney.cfg.

pugsetup_damageprinter

This plugin adds a .dmg command that also prints damage done/taken from players on round ends. You can disable the usage of the .dmg command with sm_pugsetup_damageprint_allow_dmg_command 0 and change the format of the messages with sm_pugsetup_damageprint_format by editing cfg/sourcemod/pugsetup_damageprint.cfg.