Hi all. I’ve been meaning to learn how to use VASSAL for a long time and our current predicament has prompted me to dive in.
I’m attempting to make a barebones mod for Bushido, with the blessing of owner GCT. It is a miniatures game, so I am using Guild Ball and Malifaux as reference. Largely similar in terms of movement etc.
The melee combat dice mechanic is giving me a headache just thinking about it and I was hoping someone would be able to point me in the right direction. It flows as follows:
- Both players calculate their pool of melee dice - between 1 & 5, usually, though potentially more in extreme cases.
- Each secretly allocates dice from their pool to attack and defence - differentiated by colour.
- Each also selects a single Special Attack or Defence card.
- Both players reveal their card and roll their dice simultaneously.
- Re-rolls of all or individual dice.
- Calculate scores.
- Compare scores.
The actual score is calculated by selecting the highest result. Up to two results of 2+ then add +1 to that score, for a maximum score of 8. I’m not too worried about making this work, as players can do the arithmetic themselves, and there are a bunch of re-rolls and modifiers etc. I’m most concerned with the first 5 steps above. What would be the best way to approach this?
Many thanks for any help you can give.
I’ve got the hidden Special Attack or Defence Card working using a Private Window and a Deck from which you can select a specific card. At the moment, I’m allowing defining the Attack and Defence dice quantities through Dynamic Properties which are also masked.
This will work from now, despite being clunky. Players can then roll however many dice they declare. Need to get working on that next.
I’m still very open to better approaches!
OK, tumbleweeds here, but I’ll update.
I’ve managed to hack through Tim M’s demo files to produce one set of privately declared dice which are rolled on the main map. Now I need to make it scale to two sets per player…
I haven’t done much with dice in Vassal, but I’m definitely following your thread with interest because there’s a game I’m thinking of doing a module for that would involve a lot of dice grouping/allocating stuff. So your updates are most useful!
Great to hear!
Still working on it. No doubt a bit messy, but it is working. Each player has 2 sets of 6 dice (6 attack, 6 defence) which can be secretly assigned and then rolled. Each die on the main map can then be clicked to re-roll. Quick-rolling is facilitated by right-clicking on a die on the main map, for when secrecy is unnecessary. I will be implementing a ‘floating’ D6 piece, for edge cases.
Feel free to check it out over at GitHub, though it is very much a work in progress. I am hacking it together from examples and trial & error. Focus is to get it working then go back and make more efficient once I have deeper knowledge of VASSAL.
I think I’ve largely got everything working for this first version. You’ll need to download/clone the repository, zip the files, and rename the .zip to a .vmod
You don’t say if the number of dice a player has is private or public knowledge, but here’s what I would do.
I would create a “die” piece–actually a bunch of them for each player. Each die would have two layer traits. Each layer trait would have 6 dice face images (1 - 6). One layer would show white dice faces, and the other would show red dice faces. I would use each layer’s randomize command to “roll” that die.
Then I would add a mask trait to each die with a “plain” appearance for the owner. The mask might show a gray cube (for example) with no values. This means my dice would be visible to me, but my opponent would see only gray cubes. If how many dice I have is unknown to my opponent, I would add dummy dice, which I would implement with a third layer trait that show a blank face.
Each die’s traits would look like this:
piece (does not need an image
layer trait containing the red faces. Perhaps always active.
layer trait containing the white faces. Active or inactive on a right-click command. If active, it completes covers the red faces.
layer trait showing the blank dummy face, activated on command.
mask showing the gray cube. Only the owner can unmask it. This must be beneath the layer traits.
I probably would add a trigger command here to unmask and roll (randomize the colored layers) at once.
So as a player, I might have a dozen masked dice in front of me that only I can see. I right-click each one to set it to red, white, or blank. When ready, I either push a global button or draw a box around my dice and right click them to at once unmask them and roll them in one command.