PugRunner

Discord bot for running Team Fortress 2 pickup games with the help of a moderator

September 2020 ⬥ Node.js

PugRunner

Overview

PugRunner is a Discord bot that helps moderators run Team Fortress 2 pickup games (PUGs). Players join a queue and are automatically assigned to teams when the queue is full and a moderator runs a command to start a game. When the game ends, the moderator uses a command to return players to the queue. The bot was used until January 2021 for a private community of over 500 players. Though PugRunner was intended to go open source, the only PUG group interested in using it decided to continue running games manually before the bot could be improved and released.

Running a PUG

Running a game with PugRunner was designed to be as simple as possible while still allowing for flexibility from the moderator.

  1. Players join a queue voice channel.
  2. The moderator either provides a server or reserves one through a free TF2 server rental service.
  3. The moderator runs pr!roll to randomly select two team captains (medics) from the queue.
    • The moderator can also manually select team captains if someone would like to play medic.
    • Team captains are given medic immunity, preventing them from being forced to play medic again for the rest of the day.
  4. The moderator runs pr!start while pinging the team captains to start the game.
  5. Team captains ban maps until one remains.
  6. Team captains take turns selecting players. Players are moved to their respective team voice channels.
    • Players who were not selected the previous game are given priority.
    • Players who are not selected are moved to a priority queue voice channel.
    • Once all players are selected, a list of players and the team balance based on divisions they play in is displayed.
  7. The moderator runs pr!connect with the server IP and password to send a message with the server information to players' direct messages.
  8. Players join the server and play the game.
    • If any issues arise, the moderator can run pr!dm with a message to send to all players' direct messages.
  9. The moderator runs pr!move to end the game and return players to the queue.
Selecting a map using PugRunner
Selecting players using PugRunner
PUG information given by PugRunner
Connect information given PugRunner
Moving players back to the queue using PugRunner
The stages of running a PUG using PugRunner

Unique Features

Based on the needs of the community, PugRunner was designed to be as flexible as possible while still being easy to use. The following features were added to make running games easier for moderators and more enjoyable for players.

Tutorials

Many new players join the competitive Team Fortress 2 community through PUGs. PugRunner provides tutorials for new players to learn how to play a PUG use the bot. These tutorials are displayed at various times and can be disabled using pr!tutorials.

The message displayed by PugRunner when selected as a team captain for a PUG
The message displayed by PugRunner when selected for a PUG
The message displayed by PugRunner when not selected for a PUG
The message displayed by PugRunner when a PUG ends
Tutorials displayed while using PugRunner

Player Priority

When selecting players for a game, PugRunner prioritizes players who were not selected the previous game. This ensures that everyone gets a chance to play and prevents players from not being selected multiple games in a row.

Medic Immunity

While Medic has been argued as the most important class in competitive Team Fortress 2, many players do not enjoy playing as him since he has to avoid combat and "babysit" his teammates. PugRunner gives team captains medic immunity, preventing them from being forced to play medic again for the rest of the day. This ensures that players who do not want to play medic are not forced to do so.

PugRunner showing the list of immune players
PugRunner showing the list of immune players

Rock the Vote

Some maps and gamemodes are controversial for PUGs, so PugRunner prompts moderators to allow players to vote against unpopular maps like Product. If a majority of players vote against the map, the moderator can choose which map to play or allow the captains to pick again.

Division Balance

PugRunner allows players to select a division that they play in. When selecting players for a game, PugRunner displays the team balance based on the divisions of the players. This allows moderators to easily ensure that teams are balanced.

Position

Creator

Stack

Discord.js, Node.js, SQLite3

Organization

Independent