I have 16 cards, 4 sets of 4. Each set of 4 has a unique front and back. I want to deal a certain number of them to certain locations, and randomise whether they are face up or face down. After setup, no more cards will be drawn for the duration of the game.
The only way I have figured out to do this is to have 32 pieces (or cards), 8 sets of 4, with the “front” and “back” pairs in 4 different always shuffled decks. From each deck, 4 pieces are sent to another always shuffled draw deck. This step randomises the “facing”. Then X pieces are dealt to the board.
This works fine, right? Is there a better or easier way to do it?
That sounds fine to me. If you were absolutely committed to having only 16 cards exist, you could use a BeanShell expression to use the java random number generator, but honestly if you’ve already done what you describe just stick with that.
Those would be super-useful, as a lot of random applications currently have to be steered toward the antiquated Deck mechanics.
One note – given that so many of the games we do here are dice-related, and that “rolling a die” and acting on the result is such a fundamental game feature, it seems like (at least for Vassal 4) some improvements are in order along that line:
“Dice” buttons able to fire GKC’s
Dice buttons able to specify properties for their results to be written into (so a piece could fire a die roll, the die roll would appear in the log, and the piece could process the result)
In the latest modules I’ve made, I’ve drifted away from using the dice button on the toolbar. Instead, I create dice pieces via the layer trait, and I find them to be much more dramatic and pleasant. Because a die roll in my world is a random layer, the “roll” is exposed as a property, so I can already do much of what you propose.