Skip to content

Alan19/TwoDee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn

Logo

Welcome to TwoDee 👋

TwoDee is a Discord bot built on Javacord for the Facets tabletop RPG ruleset, a homebrew ruleset inspired by Cortex. It handles dice rolls, character sheet automation, and game state tracking all within Discord so you don't have to track them yourself.

About the Project

The Facets ruleset uses a custom method of calculating the dice rolls, where the outcome of a roll is calculated by rolling a pool of dice, and choosing the two highest dice rolls (with some exceptions). Because not many dice statistics calculation systems support this without extensive tweaks, as well as the system having mechanics where you can choose the top three dice instead of two, I decided to make a program that would calculate the statistics of dice rolls. Over time, I added features such as character sheet automation in order to decrease the amount of time spent updating spreadsheets so more time can be spent adventuring and doing stupid cool things in the game.

Install

To get a local copy up and running follow these steps.

Prerequisites

  • Gradle
  • Java 17

Installation

  1. Get a bot token from Discord. Do not share this with anyone!
  2. Clone the repo
     https://github.com/Alan19/TwoDee.git
  3. Set up the settings.json file
    1. Fill in the announcementChannels field by adding the channel IDs of each channel that you want the bot to send a startup message to

      Example

      "announcementChannels": [
          123342347956,
          235423465234
      ]
    2. In the token field, paste the token you have obtained from Discord in quotes
    3. In the storytellerRoles field, fill in the array with the role ID(s) for storytellers ( Storytellers are the Facets equivalent of GMs or DMs)

      Example

      "storytellerRoles": [
          1233124784567,
          1235768345234
      ]

Adding Google Sheets integration

The first time you use any command that accesses your character sheet (roll, plot), a window will appear to prompt you to authenticate to Google. This will download the credentials.json file to your resources folder.

Before doing so, fill out the players array in settings.json. The array should contain objects that contain the Discord ID, spreadsheet ID, and the active doom pool for the player. Sheet ID of the players.

Example

[
   {
     "discord_id": 707906577071579042,
     "sheet_id": "26dPTBrNsoScoAmsqCz026dPTBrNsoScoAmsqCz0",
     "doom_pool": "Doom!"
   }
]

Usage

You can run the bot with the following command

gradle run

For examples of available commands, please refer to the documentation

Statistics Demo

TwoDee uses ephemeral messages to not clog up the channel for others when calculating the statistics for a dice pool.

Statistics calculation demo

Inviting the bot to your server

On startup, the bot will print its invite link in the console. Use that link to invite the bot to servers you are in.

Google Sheets

If this is the first time you have started the bot after adding Google Sheets integration, your browser automatically open and send you to a page to authenticate your Google account. Once you do so, it will create a tokens folder in the root directory of your project and download a StoredCredential file which will allow the bot to interface with Google Sheets.

Do not share the credentials.json file or the StoredCredential files!

Roadmap

See the open issues for a list of proposed features (and known issues).

Some cool features coming in the near future include:

  • Dynamic quote and player registration
  • Bolding dice that roll maximum

Author

👤 Alan Xiao

Contributors

👤 Skylar Sommers

👤 Lance

👤 Andrew Sage

👤 _0Steven

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2022 Alan19.
This project is MIT licensed.

Facets Rule System © 2022 Jerry Grim All Rights Reserved

Acknowledgements

TwoDee was built on Javacord, a Discord bot library for Java, combined with command a framework developed by @ShindouMihou called Velen. In addition, the Google Sheets integration would not be possible without Google's api-client library. Finally, I would like to thank @wadeanthony0100 and @00-Steven for giving me ideas on how to implement various commands, and to @Lance, @00-Steven, and @Belathus for contributing roll lines.


This README was generated with ❤️ by readme-md-generator