Skip to content

A Discord Bot that enables live automated gameplay of the board game "Roundtable Royale" in your Discord server. Built with Typescript and Test Driven Development

Notifications You must be signed in to change notification settings

snaeem3/roundtable-discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Roundtable Bot - Discord Bot for the board game Roundtable Royale

Welcome to the Roundtable Bot repository! This project's goal is to enable online gameplay of the unpublished board game Roundtable Royale in discord. Install or import this bot into your discord server to enable live automated game and action handling. Players can use discord slash commands to join the game, begin rounds, and submit their actions. The bot will process all activities to manage the scores and determine the winner(s).

Please be aware that both the board game itself and the discord bot are a work in progress.

Video Demo

Roundtable.test1-.Mexican.Standoff.mp4
  • Watch the video for an example of a 3-player (Mexican Standoff) round. Here's what's happening game-wise
    • Sameer and Borktalk slashed each other, rBats slashed Sameer.
    • In the Mexican standoff round, the slash action deals maximum damage so Sameer and Borktalk both died.
    • rBats was the only living player from this round and as the last living player he wins the game.
  • Notable events in the video:
    • (0:04) The round begins with a user entering /beginRound
    • (0:18) Living players can submit their round action when the discussion timer ends with /submitActivity
    • (0:37) and (0:42) The bot responds to Sameer and rBats that their round action was successfully received
    • (0:48) The bot receives the final living player's action (Borktalk) and processes the round result
    • (0:50) The bot processes the results and creates a 3 visuals of the round/game status
      • Action matrix- the player in the first column applied their stated action to the corresponding player in row 1
      • Ally matrix- the player in the first column chose their ally to be the corresponding player in row 1 (Note: Allies not applicable in this round per the game rules)
      • Round result text- Information about which players died and tiebreaker points players received for successfully eliminating other players
    • (0:50) The bot determined a game-end condition (1 player remaining) and announced the game's result

Bot Features

Current Features

  • Initialize and join the game with no maximum player limit (/initializegame and /joingame)

    Initialize and join game

  • Begin the discussion phase with a custom round time using /beginround in the discord chat

  • Submit your activity (action & ally) using /submitactivity in the discord chat

    submitactivity

  • Once all activities are submitted, The bot will automatically resolve all actions and present any round eliminations and game results (if applicable)

Round and game results

  • View the current game status (living players, dead players, round number, etc.) using /gamestatus in the discord chat

Upcoming features

  • Ghost actions- continue to play the game as a ghost after you've been eliminated
  • Objectives- receive unique secret objectives that award victory points upon successful completion
  • Match handling- determine the greatest knight of all by tracking victory points across multiple games

Setup & Installation

Initial Setup

  1. Fork this repository and use the git clone command in your terminal to clone it to your machine
  2. cd into the cloned repository and run npm install to install the dependencies
  3. create a new .env file in the repository with the command touch .env

You will need to enter a few things in the .env file. You can find an example file called .env.sample of which you can copy the entire contents into your newly generated .env file.

Getting your Discord API Key

  1. Go to https://discord.com/developers/applications
  2. Click on New Application

New Application_labeled

  1. Give the bot a name and click Create. Try to make it unique since Discord may not allow a name if it has too many users with that same name

Create an application_labeled

You'll now be taken to the bot's "General Information" page. When visiting the Developer Portal at a later time, you can reach the bot options through Applications and selecting your bot.

  1. In the bot's menu, select Bot

Reset Token_labeled

  1. Click on Reset Token and copy the output. You may need to enter your 2FA code at this point
  2. Paste the copied token after DISCORD_TOKEN= in your .env file

Getting the Discord Guild ID

  1. Open Discord
  2. Ensure that you have Developer mode enabled in the Discord Advanced profile settings

Developer mode_labeled

  1. Right-click your server to which you will later invite the bot
  2. Click Copy Server ID

Copy Server ID_labeled

  1. Paste the copied ID after SERVER_ID= in your .env file

Bot Settings and Import

  1. In the Discord Developer Portal, click on Bot in the left hand sidebar

Bot settings_labeled

  1. Scroll down to Privileged Gateway Intents and turn on all 3 settings
    1. Presence Intent
    2. Server Members Intent
    3. Message Content Intent
  2. In the Discord Developer Portal, click on OAuth2 in the left hand sidebar. Then click URL Generator underneath that

OAuth2 URL Generator_labeled

  1. In the Scopes section select application.commands and bot. Selecting bot will enable the Bot Permissions section.
  2. In the Bot Permissions section, check Administrator
  3. Copy the generated URL in the bottom
  4. Paste the URL in your browser and import the bot into your selected server

Add bot to server

Run the bot

  1. In your terminal, navigate to the cloned repository and run npm run dev

At this point your cloned version of Roundtable Bot should come online and its commands should work!

About

A Discord Bot that enables live automated gameplay of the board game "Roundtable Royale" in your Discord server. Built with Typescript and Test Driven Development

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published