Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^2: RFC - Acme::Dice

by Tanktalus (Canon)
on Oct 16, 2013 at 17:43 UTC ( #1058514=note: print w/replies, xml ) Need Help??

in reply to Re: RFC - Acme::Dice
in thread Released - Acme::Dice

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 :)

Replies are listed 'Best First'.
Re^3: RFC - Acme::Dice
by boftx (Deacon) on Oct 16, 2013 at 23:29 UTC

    As I mentioned above, I felt using the RPG notation would cumbersome for those who are not familiar with it. That, and I was too lazy to write the regex expressions. :)

    The answer to the question "Can we do this?" is always an emphatic "Yes!" Just give me enough time and money.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1058514]
[Corion]: GotToBTru: Sure - there is a long and sad story of many frantic cleanups that led us to implement this notification ;)
[LanX]: I told you the story about the “new" currency trading system of Dresdner Bank
[LanX]: ?

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (11)
As of 2017-03-29 11:39 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (347 votes). Check out past polls.