What can I do and not do with the plugin? For example, I want to add modifiers to a roll. how can I do that if it is possible? I know for the normal dice plugin it works like this output ([dice(numDice+"d6") + buffs + debuffs])

But for the random dice icon plugin I cannot do that. Also is it possible to lock only specific dice with locker plugin?

  • BluePower@mastodon.social
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    5 months ago

    @Liquefy7822 I think an alternative approach to do the [dice(numDice+"d6") + buffs + debuffs] for the random dice icon plugin is this:

    [dice(numDice+'d6').sum + buffs + debuffs]  
    

    The dice(...).sum behaves like the normal dice(...) in the original dice plugin.

    So, for example, if you want to multiply the dice values together, you can do this:

    [dice("3d12").sum \* dice("3d20").sum \* dice("2d50").sum]  
    

    (backslashes in \* must be removed)

    • Liquefy7822@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      5 months ago

      Thanks for the Help! But I would like to clarify some information. So I wanted to make this for me playing Warhammer and not needing to roll dices. random dice icon has a .icon at the end which makes things weird I think. Also I wanted to do numDice+"d6" so I get each roll buffed by 1, like rolling a 7 if I roll a 6+1.

      outputs for random dice icon work like this output [rIcon('2d6').icons] the icon part makes me unable to add anything or else I get a syntax error

      also here is the link to the generator https://perchance.org/warhammer-dice-roll#edit

      • VioneT@lemmy.worldM
        link
        fedilink
        English
        arrow-up
        4
        ·
        5 months ago

        Hello, sorry for late reply!

        If you want to access individual dice output from the plugin, you can do so with:

        [x = rIcon('2d6'), x.icons] [x.rolls[0].value] [x.rolls[1].value]
        

        Where 0 is the first element in the rolls array returned by the plugin, and accessing its value with .value.

        If you just want to add the same buffs to all of the individual dice, you can probably just do something like this:

        [x = rIcon(numDice+'d6', 'solid'), x.icons] [x.sum + (numDice * buffs) + (numDice * debuffs)] 
        

        Where numDice is the number of dice. We then get the sum of all values in the rolls and then add the appropriate increase and decrease to the value by multiplying the increase and decrease based on the number of dice rolled and adding them to the sum of the rolls.

        • Liquefy7822@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          5 months ago

          Thanks for the Reply! I eventually found it easier to make it outside of Perchance Here is the link to the new site.