Drawing random counters from a pool

Hi, I am a newbie module designer.

In the game I am working on, players have to put a large number of counters inside a cup and then draw a certain number of them randomly. Is there any way to reproduce this mechanic in Vassal? I suppose I should collect the pieces to be drawn in a separate panel, but how are players going to draw randomly from the pool?

Thanks in advance, and apologies if the topic has already surfaced.

You use a “deck” to do this. A deck is simply a stack of counters where you can specify that it is “shuffled” which means that when you pick a counter, it will be drawn at random.

Thanks for answering.

I am following both the Vassal guide and Joel Toppen’s tutorial. They discuss lots of fine details but I am missing the basics. In the game I am working on, players draw pieces from a very large pool which includes all existing combat units.

Since decks are created in the board menu, not in the game pieces palette menu, I would like to understand if I should (1) create the combat units in the game pieces palette menu and then add them to the deck (how?), or (2) create them in the map menu to be used for the deck only, or (3) both.

Vassal is extremely confusing to the true beginner.

Lorenzo
If you use Discord I would love to talk you through it.

The answer to placing you pieces in the palette is Both or either up to you.
A ) If the game always starts with the exact same pieces in the cup, and the players never need to grab a specific unit, I would create them in the cup (Deck by vassal terminology)
B) If the game will start with different mix on unit in the cup, or if players need to get 1 specific unit (like after someone accidentally deletes 1) I would use the palette.
C) because I make mistakes and changes to my modules, I try to only create units in one spot. So when I make changes I only have to do it in one place.

The answer here largely depends on whether or not you want a fixed pool of units. When putting items in a game piece palette, users of a module can draw out unlimited numbers of them–so if you care to enforce limits that mimic those of a game’s physical form (e.g., 10 infantry counters, 12 tanks, etc), palettes are probably not ideal.

When you create piece definitions that only exist in decks or At-Start stacks, that is a way of creating a fixed-size force pool. You can define one and then copy/paste as many as you need, then make sure the pieces can neither be cloned nor deleted by the user.

I personally would never see a need to define pieces both ways, as it just doubles your maintenance/editing burden. But some people do it. If you do, you’d probably make the piece palette hidden from the user and only unhide it when you want to do edits and then re-stock the decks.

Thanks guys, your help is greatly appreciated.

Unfortunately, I am not on Discord. I think I will create the pieces in the game palette and then add them to the deck. It may be clumsy and repetitive, but it seems best for learning the ropes.

I have one last question: in this game, many pieces are combat units on their front but counters on the reverse side, so I would like to apply different prototypes to each side. Is there any way I can do this?

Are the 2 sides actually related to each other? If not, then I would just make a completely different piece for each side.

Otherwise, if you just want to display a different image on each side, you could use a Layer trait: either have the main image as the basic piece image, and then the Layer would have a single, alternate image, that could be toggled on and off when the counter is “flipped”; or, leave the Basic piece image blank, and have the Layer trait contain 2 images, and be marked as “Always Active”, and then swap which layer is active when the counter is “flipped”.

However, if you want the counter to have different functionality depending on which side is “up”, it might make more sense to create 2 separate pieces, and then use the Replace with Other trait to swap one for the other when the counter is “flipped”.