| Joel Uckelman on Fri, 15 Dec 2006 14:49:38 -0700 (MST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: [s-d] dice server enhancements |
Thus spake Antonio Dolcetta:
> Joel Uckelman wrote:
> > Thus spake Antonio Dolcetta:
> >> I've found the original specification (and an implementation in some
> >> obscure academical language) for the Roll language you based bones on.
> >> I see that the author has released a new version called Troll.
> >> I's not very different but it supports just saying 3d6 instead of 3#d6.
> >> Are you planning to upgrade to that ?
> >
> > I'm not sure that I want to follow Troll in this respect.
> >
> > 3d6 in Troll doesn't do what you'd expect it to do. What you'll get is
> > a list of three rolls, i.e. 3#d6. Usually 3d6 is taken to mean sum(3#d6),
> > correct?
> >
>
> you are right but still "sum 3d6" is still a lot more obvious than "sum
> 3#d6"
> the best imho would be having "t" (as times) instead of d as the normal
> die roll operator (as there's no point in using "d" if it will do
> something different from what people think it'll do)
> and having 3d6 getting expanded to sum 3#t6, but then that's just lazy me.
I think I will extend the syntax so that d is available as a binary operator
as well. As a binary erator, xdy will give you sum(x#dy) like you'd expect,
and it won't interfere with your ability to get a list instead of a sum.
> > BTW, if you have any other suggestions, I'd like to hear them. I'm still
> > looking for a nice way to display both the raw rolls and the result of
> > the script. Presently, in order to get a list of rolls followed by their
> > sum, you have to do something like this:
> >
> > let r = 3#d6 in (r, sum(r))
> >
> > Once I add interpolation, you'll be able to format the output:
> >
> > "$1 + $2 + $3 = $4"@(let r = 3#d6 in (r, sum(r)))
> >
> > to get this:
> >
> > 5 + 3 + 1 = 9
> >
>
> I think nobody would use it if they had to learn to write all that stuff
> just to produce a 3d6 roll
>
> imho, it would be much easier for users to write something like
> wonko gains {{d6}} + {{d6}} + {{d6} = {{$1 + $2 + $3}}
>
> and get back
> wonko gains 5 + 3 + 1 = 9
> of course d6 could be a much more complicated expression, but use the
> expressions for rolling the dices, and the message template for the
> fomatting.
So, $1 + $2 + $3 would also be stored in $4, yes?
I like it; I plan to code this up. Are there any other positional variables
which would be useful?
--
J.
_______________________________________________
spoon-discuss mailing list
spoon-discuss@xxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/spoon-discuss