Symbolic Dice - RFE:1860950

Moving this discussion to the forums

I just started on a module that needs symbolic dice. In addition, I
need the ability to throw various combinations of dice.

Currently, the options for showing the dice visually are either on a
button, or in a window.

The button option doesn’t work well when you have multiple dice
options as the buttons for each combo all look the same and take up
lots of button real-estate.

The window option also doesn’t work well, as each combo always shows
it is own separate window.

I was thinking of making one of the following changes:

A. Change to have dice drawn in the same window if the name of the
window is the same of one that already exists. This prevents
multiple windows popping up everywhere.

B. Create an option to draw the symbolic dice in the message
window. Just as you can see text descriptions of the dice today.

C. Create an option to specify a rectangle on a map where the dice
are to be drawn (which would also remove any previously drawn
dice on that map). Then a spot can be reserved on a map for
dice to appear, and they’d remain until a new throw of the dice.

I think Option A may be the simplest change to make. Option B seems
like an abuse of the message window. Option C is the solution I’d
most prefer, but I’m not sure how difficult it might be to implement.
I’m wonder what other thoughts you guys might have on this type of
change, and if you have any advice on where I might start (as I’m not
really familiar with all of the VASSAL classes, and not primarily a
java developer).

Thanks for any input.


My combos don’t really depend on other dice rolls.

Specifically, I need to make 6 buttons; roll 1, 2, 3, 4, 5, or 6 dice. I’d like the results of any of those buttons to log text results to the message window, and also show the dice with graphic representation in the same spot each time (regardless of which button being clicked). That’s the easiest way to describe what I want to accomplish.

I guess I’m looking for advice on which direction I should head for making an enhancement. Any suggestions?

I guess technically, this would be a feature request.

Tim do you mind if I move this to Feature Requests? It a good test to make sure replies still go to the right place.


I dont mind Ben :slight_smile:

Tim, from what you describe now what you want to do, I do have a alternate solution.

Instead of symbolic dice, create regular dice (youll still need 6). Whenever you roll one of these dice, pass the resultant to a global property. On your map, put a single at start stack piece with appropiate layers(values) that follow the GP.

This way you, your piece will always reflect the current rolled value be it 1 dice or 6 and only display in one place all the time


You can put it wherever you want. But I wasn’t requesting a feature, I was asking for comments on a feature I might add.

I’m not sure exactly how you mean. How can I have a “regular” dice button pass a result to a global property? If I wanted to roll more than one die at a time how does that work?

Regardless, it sounds like a difficult sort of thing to manage. Tim, I’m always amazed at what you’ve been able to accomplish using whats available in VASSAL. And this might be a case where it could be possible by some complicated means. But I think I would rather make an enhancement to VASSAL which would make doing what I want more straight forward (and possibly easier others who want to implement something similar).

Again, what you’re describing might be simpler than it sounds, so I’m willing to learn how to do this with what’s already in VASSAL.

Hi Tim,

It was even simpler than I thought :slight_smile: Dice result is already stored as a GP.
I just setup my at start piece to grab the result in the dynamic property (with a reset) and have the layer follow the DP.

I used GKC’s to fire the dice and tie them in with the display piece (no other way)

Ive put together a little test mod with 2 dice - 1d6 and 2d6. Will send it to your email.
Take a look, its pretty simple :slight_smile:


On Dec 11, 2007, at 11:17 PM, “Tim M” wrote:

Thanks Tim. I will be able to check out your example mod in the
morning. I’m anxious to see what you made, but I must get some sleep
(I’m fighting a cold)

Messages mailing list …

Post generated using Mail2Forum (

I got a chance to look at your example mod this morning. I think I probably wasn’t clear enough when I explained my end goal.

Your example as a graphic version of the sum of the dice tossed. What I want to do is graphically display all the individual dice results.

So pushing 1d will report in the window “one” and graphically show the face of 1 die. pushing 4d will report in the window, “one, four, one, five” and graphically show 4 die faces.

Another way to think of it would be coins. Pushing a button that was called “4 coins” would report in the window, “heads, heads, tails, heads” and graphically show 4 coin faces that matched the result. Essentially, I want what pops up in the window that can already be displayed, but have the results of different dice buttons show up in one spot.

I’ll look into using global properties (I didn’t know dice did that, perhaps symbolic dice do that too). Maybe that road will get me where I need to go before doing any java coding.

No problem, yes I did a result total - misunderstood.

Because you want the individual dice shown, I think you can still do it and have to use hidden symbolic dice instead of hidden regular dice but it requires an extra step of passing each dice result ($result1$, $result2$ etc) to a GP as I dont think these are GP’s by themselves, then have your at start stack have a layer for each die which reads the value of the appropiate GP to display correct number/die side.

Ill put another test mod together today to verify if its possible (I’ll still use numbers instead of die faces but the basic idea is same)


Ok, its very possible.
Does exactly what you want and still quite simple
It demonstrates up to 3 dice - with faces :slight_smile:

Will be sending you two test mods. The first one is just the same as the previous version reworked.
The second is a more elegant version in that it only requires 1 dice button (1 GKC) with an extra DP and user selects number of dice to roll.
I think this will appeal more for you as it also saves valuable toolbar space.

If you want to validate that the piece is displaying the rolls correctly in order just add the $result$ report to the hidden dice button in the tree and it will also echo in the chat as well as the report I built in

As you will notice I only used 1 regular die. Did this for simplicity. I do not know the merits/difference as to if the random seed for 1 dice being rolled 3 times is different from 3 dice being rolled once in vassal. Rodney would have to comment more to that aspect.

Possibilities are endless now Ive figured this out, can do pretty much anything you want :slight_smile:


Tim, this is great. Its more complicated then I was hoping for, however, the complication is fairly concentrated into only one piece. Well done!

Having said that, can you find a way to support “symbolic” text for the faces of the die? I don’t think symbolic dice set properties (at least its not stated in the documentation that I can find).

Basically, instead of reporting “roll: 1, 4, 5” in the message window, to report “roll: one, four, five”. Or like my other example, “heads, tails, tails”.

Hi Tim,

The complication is the sets of trigger actions in the piece tying all the traits together in proper sequence. You can get pretty crazy with these, believe me :slight_smile: :wink:

The report is simple to change. Instead of referencing the $DP property value$ in the report traits, give all the layer levels names ‘one’, ‘two’, ‘three’ etc… for each layer trait and then reference the needed $_Name$ property instead in the report traits.

BTW, which one did you prefer? the multi button or single button version?

I mostly agree with you. But having counted different types of cards in a deck the complicated triggers way in the past, it makes for a module that difficult to maintain. Having properties that can be simply referenced makes things easy to create, maintain, and understand later. Your solution works well for dice, and I will go in this direction (really, its a fabulous way to handle this), but I don’t think it would scale well to something that has the equivalent to 100 sides! OK, that’s crazy talk.

Perfect. It works just as I need! This is a gem I’ll be using more than once in the future! Thanks!

The multi-button for sure. 6 buttons doesn’t take up too much room, and removes the step of selecting the number, and clicking another button. Basically it came down to efficiency of use vs efficiency of space. I like clicking once instead of 3 times.

I have the same issues with the dice window/ icons.

I much prefer the visible dice.

Requested modification to current system :-

  1. Define the symbol faces as now but just one section for each dice type with a name e.g. D6 , D10 etc

  2. A dice trait that requests X dice of type then displays them in a window which can be specified by name. The reasoning is a window can be open for each side.

In practice we could have dice (friend , atkd6, $XXX$) and dice (foe,defd6,$XXX$). These could then substitute the $XXX$ for a DP ,Marker,GP etc.

The end result being two windows open with the attack and defence dice. A GKC could close the window. The results in a window cleared when it is closed or set in trait.

You could even have dice(display,atkd6,5) followed by dice (display,defd6,2) where atk dice are red and defence are black , in the same window.

For Dice(window,symbolic dice type,no) read a normal trait similar to place marker + options to report dice and import background.

Tim I wouldn’t mind looking at your routine. You have my email address.

Jerry 8)

email sent

Added as RFE:1860950 (Or has this been resolved?)

Resolved, but does not mean it cant be improved upon beyond the methods of implementation we found that would work :slight_smile:

Well as long as Starman is happy, may as well close this puppy!