GithubHelp home page GithubHelp logo

vestofholding / diceroller Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 30 KB

A dice rolling script designed to work with the StreamLabs Chatbot

License: GNU General Public License v3.0

Python 100.00%

diceroller's Introduction

DiceRoller for StreamLabs Chatbot

Created by: VestOfHolding - www.twitch.tv/vestofholding

Version: 1.1

This is a dice-rolling script designed to handle rolling multiple dice of number of sides at once as a custom script for use with StreamLabs Chatbot.

Due to StreamLabs Chatbot being written in .NET, IronPython is required as the interpreter in order for this project to work, which is also the same reason this project is written in Python 2.7.

All other questions about how to use this script within the Chatbot can be found in their documentation.

Features and Usage

This script uses dice notation to specify what dice and how many you want to roll. The current version supports only the standard notation. It will then output each individual die result, as well as the total of all dice rolled.

  • !roll
    • With no other parameters specified, this script will roll 1d20.
    • Example output: Rolling 1d20... 14
  • !roll 1d20
    • The normal standard notation is accepted.
    • Example output: Rolling 1d20... 2
  • !roll d6
    • If the number of dice is not specified, the roll will default to 1.
    • Example output: Rolling d6... 5
  • !roll 2d20 + 2d6
    • Multiple standard notation dice of different sides can be rolled together.
    • Example output: Rolling 2d20 + 2d6... 14 + 20 + 2 + 3 = 39
  • !roll 2d6 + 5
    • Integer modifiers can be added to a dice roll.
    • Example output: Rolling 2d6 + 5... 2 + 3 + 5= 10

Restrictions

  • This script currently cannot handle any arithmetic operators besides "+".
    • !roll 1d20 - 5 will throw an error.
  • No more than ten dice/modifiers can be used in one command. This is to minimize the impact that displaying all of the individual dice rolls has on chat.
    • !roll 11d6, !roll 8d6 + 4d8, and !roll 10d6 + 5 are all examples of rolls that will hit this limit.
  • The number of sides a dice has cannot exceed 1000.
    • !roll 1d1200 will throw an error.
  • Any integer modifier added to the roll cannot exceed 1000.
    • !roll 1d20 + 2000 will throw an error.

Configurable Values

Value Default
Command !roll
Permission Everyone
Cooldown (seconds) 2
User cooldown (seconds) 3

Version History

1.1

  • Fixed a bug where the max specified number would never be rolled.
    • Example: !roll 1d10 would never be able to roll a 10. Now fixed.

1.0

  • Initial Release

diceroller's People

Contributors

castorr avatar vestofholding avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

castorr

diceroller's Issues

Tabletop stuffs

A friend came to me with a neat idea of incorporating the stats into some of the commands such as using !roll perception 1d20 and the script outputting Rolling 1d20 for perception...... 15 for example.

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.