I always preferred standard RPG nomenclature here: "1d6", "3d6", "2d20+15" and then let my code pull that apart (simple regexes), roll the dice, and return it. A bias can be added either as a separate parameter (or two) or an extra "non-standard" addition to the above strings: "3d6>30%6" (3 6-sided dice, bias 30% toward 6). The nice thing about this is that it makes things so much easier to put into data files, e.g., "STR: 3d6>30%6" to make a monster that can't be any stronger than a standard human could be but does seem to average out a bit higher.

This also happens to be much less magical, and magic often bites me in the butt often enough as it is :)


In reply to Re^2: RFC - Acme::Dice by Tanktalus
in thread Released - Acme::Dice by boftx

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.