Skip to content

joao-m-santos/trpg-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TRPG Bot

TRPG Bot is a text-based role-playing game helper Discord Bot made to streamline SNAP gameplay, fully developed in Node.js.

Table of contents

Features

TRPG Bot provides several features that enhance SNAP gameplay:

  • Automated character sheet management and updates
  • Custom dice roll functions

How to use

Setup

1. Register yourself as a Player
Simply run !trpg player register

2. Register a Character sheet
Upload a Character sheet .txt file and type the command !trpg sheet register. Important: The file must follow the SNAP Character sheet template

3. Select your current sheet
Now you can select your current sheet by typing !trpg player playAs {id}, where {id} is your desired sheet ID. If you don't know your sheet ID, run !trpg player listSheets, and you'll be able to see all your registered sheets and their IDs.

Gameplay

Dice rolls

In SNAP, you can attempt to use a Skill you have dice on, or you might be asked to do a plain dice roll. When you want to use a Skill, type !trpg roll {skill_name}, where {skill_name} is the Skill you are attempting. For example:

!trpg roll combat_melee

John Doe rolled for Combat (melee) [4d6]
Result: 4,3,5,315

API

Sheet

Command Arguments Description Example
!trpg sheet register File (attachment) [Required] Registers a Character sheet to your Player
!trpg sheet export {sheet_id} sheet_id - The desired sheet ID. [Optional] Exports a Character sheet by ID or your current sheet !trpg sheet export 274662764792774656__charsheet.txt-387

Player

Command Arguments Description Example
!trpg player register -- Registers yourself as a Player
!trpg player listSheets -- Displays your registered Character sheets
!trpg player current -- Displays your current Character sheet (Who you are playing as)
!trpg player playAs {sheet_id} sheet_id - The desired sheet ID [Required] Updates your current Character sheet !trpg player playAs 274662764792774656__charsheet.txt-387

Roll

Command Arguments Description Example
!trpg roll {skill / dice} skill - The skill you want to roll for
dice - The amount of dice to roll
[Required]
Rolls dice for a Skill or the amount provided !trpg roll combat_melee
!trpg roll 2d6

Campaign

Command Arguments Description Example
!trpg campaign start {campaign_name} campaign_name - The name for the new campaign [Required] Starts a new campaign with the given name !trpg campaign start A wonderful adventure
!trpg campaign end {campaign_name} campaign_name - The name of the campaign to end [Required] Ends the campaign !trpg campaign end A wonderful adventure
!trpg campaign getLogs {campaign_name} campaign_name - The name of the campaign to get the logs from [Required] Exports a file with the entire campaign's logs !trpg campaign getLogs A wonderful adventure

Skills

Name Code
Combat (Melee) combat_melee
Combat (Ranged) combat_ranged
Communication communication
Orientation orientation
Stealth stealth
Profiling profiling
Science science
Occult occult
Faith faith
Clearence Level clearence_level

Built with

This project currently uses:

For developers

This is a simple guide for developers who want to contribute new features to this bot.

Prerequistes

  • Node.js
  • npm

Installation

  1. Clone the repository: git clone https://github.com/joao-m-santos/trpg-bot.git

  2. Move to the project directory: cd trpg-bot

  3. Install the node packages: npm install

  4. Create a private-config.json file: touch private-config.json

  5. Add your Discord token and your MongoDB connection string to your private-config.json file:

        {
            "dbString": "mongodb-connection-string",
            "token": "your-token"
        }

Contributing

In order to contribute to the project, please follow these steps:

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a pull request

Contact

Joao Santos - jm_santos7@hotmail.com


Made with ❤ by Joao

About

A text-based RPG Bot for Discord.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published