Coder Social home page Coder Social logo

pso-matchmaker's Introduction

Description


(Image credits: Reis)

pso-matchmaker is a Discord bot initially developped for the game Pro Soccer Online.
You are free to fork it and use it for your own purpose, by adapting some of the text content in the code.

The purpose of this bot is to help players looking for competitive games to find matches and build up their own team. Use the /help command to see a list of useful commands and how to use the bot.

Features

Ranked mode

pso-matchmaker implements an Elo ranking system that rates both teams and players depending on their match results.
The ratings are region-specific (5 regions exist so far: Europe, North America, South America, East Asia and Oceania).
You can display the teams and players leaderboard by using the /leaderboard command.
To see your own stats, use the /player_stats command.
Every game mode supports ranked mode (read Game modes section for more information). However, only the official community discords are allowed to create a ranked line-up.

Example
(Leaderboard)

Example
(Player stats)

Auto-matchmaking

If you want pso-matchmaker to automatically search for a match that is matching your team level, you can enable the auto-matchmaking feature when you create your line-up (active by default, and only available for the Team mode).

Once a match has been found, a message is sent in both the channel and each player DM.
Example
(Searching for a match)

Example
(Message sent in the channel once a match is found)

Example
(Direct Message sent to the players when the match starts)

Team Management

pso-matchmaker lets you create your own team (wether it is competitive, a group of friends or a community !), and then manage it with many game modes and options.

The 2 most important things to understand are:

  • 1 Discord Server (Guild) = 1 Team
  • 1 Discord Channel = 1 Line-up

A Team is made of 1 or multiple line-ups.
To create your team, invite pso-matchmaker on your discord, then use /register_team command. To create a new line-up, use /setup_lineup, /setup_mix or /setup_mix_captains commands depending on the game mode you want to play with this line-up (read Game modes section for more information)

Once you create your team, you can use the /team_manage command to edit various information.

Example
(Example of team management)

Game modes

There are 3 different game modes available !
Note: At any time, if you want to display and interact with the line-up, you can use the /status command.

Team

The most interesting and competitive game mode is the team mode.
To use this mode, you need to setup a channel with the /setup_lineup command.
The team mode let you select a position and group up with your teamates, then either pick a team/mix to challenge by clicking the Challenge button, or simply click on Search and let pso-matchmaker find a match for you.

Example
(Example of a team line-up)

Mix

This game mode brings up a Red Team and a Blue Team in the same channel.
To use this mode, you need to setup a channel with the /setup_mix command.
This is very interesting if you have a community discord server and want people to play against each other.
When you create a mix line-up, you have an option called allow_teams which, if set to true, allow team line-ups to face the Red Team of the mix !

Example
(Example of a mix line-up)

Mix Captains (Draft mode)

This game mode brings up a single queue that players can join in. Once enough players have joined the queue, a draft starts and 2 captains are chosent to pick there players for there team.

Example
(Example of a mix captains line-up)

Dependencies

Environment configuration

  • Create a .env file in the project root directory with at least the following variables
CLIENT_ID=<BOT CLIENT ID>
TOKEN=<BOT TOKEN ID>
MONGO_URI=<MONGO URI>
GUILD_ID=<YOUR DISCORD TEST GUILD ID>

PSO_EU_REGION_LABEL=Europe
PSO_EU_DISCORD_GUILD_ID=<SAME AS GUILD_ID>

PSO_NA_REGION_LABEL=North America
PSO_NA_DISCORD_GUILD_ID=0000000000000000000

PSO_SA_REGION_LABEL=South America
PSO_SA_DISCORD_GUILD_ID=0000000000000000000

PSO_AS_REGION_LABEL=East Asia
PSO_AS_DISCORD_GUILD_ID=0000000000000000000

PSO_OC_REGION_LABEL=Oceania
PSO_OC_DISCORD_GUILD_ID=0000000000000000000

How to build

  • npm run build

How to deploy the Discord commands

  • node build/scripts/deploy-commands.js
    Note: If GUILD_ID environment variable is defined, the commands will be deployed only the this guild

How to run with nodemon

  • npm run dev

pso-matchmaker's People

Contributors

flyingturkman avatar grassehh avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pso-matchmaker's Issues

Captain selection

I was wondering about if the captain selection could be based off eloRating rather than numberOfRankedGames. In Oceania there is a huge balancing problem as some players have played a lot of the ranked games, however still quite new. Whereas if captains were selected with eloRating then you would naturally get more balanced teams.

To make the change you would just need to change this line to sort on eloRating. There has been a lot of requests for this so thought to put it into an issue.

Cheers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.