Skip to content

roganhamby/diceless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yet another dice bot for Discord. I created this one simply because I wanted one that could work with the pecularities of a variety of different systems and be inutitive for my own purposes.

Trello Board for Dev tracking here: https://trello.com/b/RN9kMwiS/diceless

=== Prereqs

SQLite3+

Node 8 : https://nodejs.org/dist/latest-v8.x/node-v8.16.0.tar.gz

npm install --save better-sqlite3 npm install --save jsonfile npm install --save discord.io npm install https://github.com/woor/discord.io/tarball/gateway_v6

=== The SQL

CREATE TABLE inventory (name TEXT, cp INTEGER, sp INTEGER, gp INTEGER, pp INTEGER, credits INTEGER, nuyen INTEGER, stuff TEXT);

=== Features

== Bag

The ferrets of the bag will store cach and items and allow you to deposit, withdraw, consolidate odd amounts of coin and project what splitting would be. Most commands can be combined on a single line except deposit and withdraw. Wiping the bag entirely clean is a distinct command, /wipebag but if you want to be careful you can simply withdraw as needed instead.

You can also put items on the line but they are space delimited so Potion of Healing will become three items but PotionofHealing or Potion_of_Healing will not.

== Dice Rolling

Rolling is done through the /roll command. The basic format is /roll XdY common to dice notation, i.e. /roll 3d6 rolls three dice and adds the total together. There is no restriction on the kinds of dice rolled so you can roll non-traditional polyhedral shapes, i.e. /roll 7d11

You can also pass two other parameters to /roll commands - rrX and dpl.

rrX is for rerolling any number equal to or under the value given. For example, 3d6 rr1 will re-roll any ones while 3d6 rr2 will re-roll any 1s or 2s. In the list of resultant values the failed rolls will be displayed with a strikethrough.

dpl is a command to drop the lowest. The lowest value dropped is shown after the resultant list. So, /roll 3d6 dpl will roll three six sided dice and drop the lowest.

dph is a command to drop the highest.

Functionally 2d20 dpl in D&D 5E is rolling with advantage and 2d20 dph is with disadvantage.

You can combine these to do a roll such as /roll 4d6 rr1 dpl to reroll 1s and drop the lowest. Also, these do not requires a specific order so

/roll 5d6 rr1 dpl /roll dpl 5d6 rr1 /roll rr1 dpl 5d6

are all functionaly identical.

Basic rolls will also allow you to apply basic mathematicl operators to the total, so a command like /roll 3d8 +7 #is valid or you can send multiple operators /roll 3d8 -2 /2 *4

are both valid. Addition/subtractions will be done and then mutipliers/dividers applied.
The value will be rounded down.

The XdY parameter is optional, /roll by itself will roll 1d20. Combined with dpl or dph it will assume it will roll 2d20 so /roll dpl = D&D 5E's rolling with advantage /roll dph = rolling with disadvantage

== Fate

/fate +7 will roll 4dFATE DICE and add the modifier giving you a the result type, so /fate +12 gives: Rogan rolls the dice and fate giveth 0 -1 1 0 ... total is 12, FATE roll quality is Legendary.

== Split

/split will split D&D style money among party members.

typical usaage: /split 10pp 80gp 42sp 1cp 4ways ressult: Each party member gets 27 platinum, 1 gold, 1 silver, 5 copper. There is 1 coopper left over.

Currently it assumes the values are liquidated and does not use electrum, because ... I don't use electrum. You can put any number of arguments on the command line and repeat values so that you don't have to add it up yourself. For example, this is also valid:

/split 3ways 10gp 40sp 18sp 4cp 90cp 20pp

Parameters can be passed in any order.

== Trinkets

/trinket will generate a random trinket from a stored JSON file. I originally gathered the list some time ago from various sources including some of my own creation. I regret that I didn't keep better track though I suspect many were without creditable source and re-used from where I picked them up. Suffice it to say I am not responsible for many of the more interesting entries.

== Character Stat Creation

Right now D&D / Pathfinder stats style creation are supported via the /dndstats command. By default this will create six stats generated by 3d6 each. If the dpl parameter is added, e.g. /dndstats dpl, then it will roll 4d6 for each and drop the lowest. It also supports the rrX argument, so /dndstats dpl rr1 is a valid command.

== Comments

All of the functions support comments now. By using a pound sign # that message will be appended to the results returned by the bot. This will work on all messages unless explicitly stated otherwise.

About

dice bot for Discord, with multi-rpg system support

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors