Shall we mod our discobot?

Did you know we have a @discobot? It’s true!

That blog post goes into some details, so check it out, and if you have a recommendation, let’s hear it!

You can probably send a private message to @discobot… what will happen?!

Hi! To find out what I can do, say @discobot display help.

@discobot display help

I currently know how to do the following things:

@discobot start new user

Starts one of the following interactive narratives: new user, advanced user.

@discobot roll 2d6

:game_die: 3, 6

@discobot quote

:left_speech_bubble: Carry out a random act of kindness, with no expectation of reward, safe in the knowledge that one day someone might do the same for you — Princess Diana

@discobot fortune

:crystal_ball: You may rely on it

1 Like

Oh snap, we can @discobot roll 3d6 for RPG fun!

:game_die: 5, 6, 2

@discobot roll 4dF I wanna see if you support Fudge/Fate dice.

Hi! To find out what I can do, say @discobot display help.

What is the shortcut for getting Fate results from normal d6s? I don’t think the dice roller does operations, so no 1d6 - 1d6

In fact, the dice roller is fairly primitive:

module DiscourseNarrativeBot
  class Dice

    def self.roll(num_of_dice, range_of_dice)
      if num_of_dice == 0 || range_of_dice == 0
        return I18n.t('discourse_narrative_bot.dice.invalid')

      output = ''

      if num_of_dice > MAXIMUM_NUM_OF_DICE
        output << I18n.t('discourse_narrative_bot.dice.not_enough_dice',
          num_of_dice: MAXIMUM_NUM_OF_DICE
        output << "\n\n"
        num_of_dice = MAXIMUM_NUM_OF_DICE

      if range_of_dice > MAXIMUM_RANGE_OF_DICE
        output << I18n.t('discourse_narrative_bot.dice.out_of_range')
        output << "\n\n"
        range_of_dice = MAXIMUM_RANGE_OF_DICE

      output << I18n.t('discourse_narrative_bot.dice.results',
        results: { rand(1..range_of_dice) }.join(", ")

I don’t think they are ready to allow custom narratives for the bot yet, but we will definitely need to add dF support! Does anyone know Ruby or a Ruby Fate dice library?!

Ive implemented one before off the cough in a couple of languages before, you can use the same algorithm as you would would use for a ‘d3’ , you just at the end subtract 2 from the total for each die rolled. Moving the range of (1, 2, 3) to (-1, 0, 1).

1 Like

Well, have to try a roll: @discobot roll 3d6

:game_die: 6, 5, 2

cool, that worked. @discobot roll 3d6

:game_die: 6, 4, 4

@discobot, are you up for modding?

Hi! To find out what I can do, say @discobot display help.

I don’t think @discobot has a lot of customizability, outside of producing a plugin for it.

Hi! To find out what I can do, say @discobot display help.