While looking at DiceButton.java, I noticed that the tooltip configurer was totally broken. While I was at it, I added a simple feature to sort die rolls… Which was really, really, easy. And I thought it was something that should really be there.
Yeah, ok. No more new features for 3.1, though. Really, I mean it this time.
BTW, I’ve been thinking about my new dice roller, and it occurred to me that
it might be useful to have the dice rolling language it uses available in
VASSAL even when you’re not online… Your sorting feature reminded me of
this because it’s something that’s trivial to do in both dice rolling
languages I devised.
Here’s the documentation for the first one, which I came to feel was rather
weird and non-obvious:
I’ve added a feature that makes the odd die rolls pink and the even ones blue. It’s necessary for… some… game… I’m making up.
That reminds me that a simple calculator language could be introduced in a lot of places. Is there a Java equivalent of lex and yacc? I thought I saw a reference to something like that in some Ant documentation (it referred to something that sounded like a lexer and parser).
Actually lex and yacc are overkill for calculators, but your syntax diagram reminded me of that.
I think Brent was working on something like this. It would be relatively easy to introduce that in formatString.
And yet it could. And yet it could…
It looks very nice. But what you’re proposing is just a superset of a simple calculator language. I think that should be the main part of it.
Yes, that’s right. BeanShell is a Java interpreter. It allows us to add Java as a scripting language within Vassal. It can be configured in different ways from a single expression parser and evaluator (i.e. Calculated Properties) to a fully fledged scripting language. It is extensible in the same way Java is - you can write your own functions and call them either in BeanShell, or in real Java.
BeanShell development seems to have ‘stabilized’, but it is fully functional, source is provided and it’s LGPL.