Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/daftmaple/rocket-league-mafia-bot

The game mafia for Rocket League, based on SunlessKhan's YouTube video
https://github.com/daftmaple/rocket-league-mafia-bot

discord discord-bot mafia rocket-league

Last synced: about 1 month ago
JSON representation

The game mafia for Rocket League, based on SunlessKhan's YouTube video

Awesome Lists containing this project

README

        

# Rocket League Mafia Bot

A crappy bot that handles only one match at a time and not persistent

Things to upgrade:

- ~~There can be only one match per bot (will be refactored to one match per channel, or even per host)~~ Now supports one party per channel
- Handles only 6 players in a match
- Doesn't store points when bot is restarted

## To start the bot in pm2 instance

Since npm package number can only be parsed when running npm script, use this command:

```sh
pm2 start npm --name "rlmafiabot" -- start
```

## To start the bot with docker composer

```sh
docker-compose up --build --detach
```

## To start the bot with docker (normal)

```sh
docker build -t rl-mafia-bot .
docker run --detach --env-file ./.env --name rlmafiabot-container rl-mafia-bot
```

Note: Docker **doesn't** ignore quotes (both `'` and `"`) on `.env` file

## Terminating bot

Issue `SIGTERM` to whatever runs the bot. In Docker, this is equivalent to `docker stop rlmafiabot-container`.

## How it works

A game can be created from a party that consists of 6 players. Once a game starts, these players will be split into two teams, and only 1 player will be assigned the mafia role.

Scenarios:

- If you are a mafia and your team loses, you will gain 3 points.
- If you are a non-mafia, you will gain 1 point if you win.
- If you vote a mafia (as a non-mafia), you will gain 1 point. Mafia will lose 1 point for each vote.
- You can't vote for yourself.