Die result transcribed onto a playable piece

I’m designing a module for game and trying to think of a way to replicate a mechanic from the physical version. When the dice are rolled in battle by both the attacker & defender (multiple dice by each) each die’s result is compared to a chart and then placed into a box on that chart according to their chart-result (e.g. “Hits”, “Misses”, etc…).
My question: is there a way that a die result can effect a game piece such as, a roll of “1” changing the face of a “die” game piece to show 1 pip. So, that piece can then be dragged into the appropriate box?
I’ve got a clunky alternative to this direct connection between the Vassal die roller & a game piece but thought I would ask. Thx
Cavan

Yes, just use pieces with layers as your dice instead of a toolbar die roller. You can still have them rolled with buttons.

In my Oath module I have two dice trays with visible grids. Players can click on the grid to select the number of dice to roll, and click a roll dice button to do that. The grid is replaced by the number of rolled dice selected, sorted into order for easy counting. The results are also totalled up and reported as text. Each piece is a normal piece manipulable by dragging and available for rerolling, etc. Another button resets the tray.

1 Like

Thanks. Looks like what I’m trying to do. Now to figure out how to translate into my mod. Thx Benkyo.

Thanks. Your mod helped. I didn’t use a series of image layers attached to a grid image. Instead I created a separate piece for each dice-piece. Each placemarker piece @ %50 transparency (Att-Dice) is a map level item on the grid. Clicking on it “Places” a blank dice-piece (plain white in this case) above it indicating the “chosen” number of dice to be rolled. The “Roll” button targets those pieces and runs the “Random(6)” mechanic that chooses from 6x layers attached to that piece. The “Reset” button deleted the dice pieces & returns the Buttons to their “rest” layer image. Its not quite as economical as I would like, but it does what I need it to do. Cavan

Cool.

The reason for my grids is that in Oath there are a number of steps before rolling where players need to indicate how many dice they intend to roll, and that number might be increased or decreased by either player prior to rolling.

I see. I took me a awhile to figure out what you were doing there. In my case, you would just RT-Click “Reset” on the blank die-piece to “delete” it, or Click on the placemarker piece to add a potential die roll. In the game I’m doing the players choose the # of dice they are going to roll & then have to move them onto another chart according to what the charts says that die result is equal to. I still don’t know how many dice I’m going to need (waiting to hear back from the designer). I have a grid for about 70. They include 10 in the box and then tell the players to provide their own after that. I didn’t quite figure out the “sort” code you did, which might be handy but is not necessary in my game. Thx again

No worries.

The sorting can sometimes be a problem, when a player mistakenly rolls too many dice and wants to know which one(s) are “last” to remove them. On balance though, I prefer having it in a game with icons on the dice.