At-Start Stack for a Game Piece?

I have a board with a rectangular grid. I have cards (as game pieces) that I arrange on the grid creating a random layout. The cards themselves have spots for dice or cubes. Is there a way to create an “at-start stack” on a card to control where dice or cubes can go?

Let me understand your design intent.

  1. It sounds like the initial card layout is to be randomly determined by the module at the start of a new game, but that each card has a predefined (not random) set of dice and cubes to be placed whenever it enters the game. If the cards can be moved to a different position on the map, I’m assuming you want the dice and cubes to be moved along with it, in their same relative positions. Is this correct?

  2. Could a card have multiple dice pieces and/or multiple cube pieces placed on it, or could its dice and cubes each be depicted by a single game piece with a different appearance (e.g. - with a number indicating how many dice or cubes it represents?

  3. If a card’s dice and cubes could each be depicted by a single game piece (with the number), could every card have the same relative positions defined for its dice and cubes?

  4. Do dice and cubes ever exist by themselves (i.e. - not on a card) anywhere on the game board or any other Map Board in the module?

That’s enough questions to get the discussion started.

Cheers,
Jim Hunter.

Thanks, Jim. Actually, now that I’ve looked at it in closer detail, here are the specifics:
There are 6 cards. They all have the same layout (space for 3 dice). Once placed, they will not move, but they may be flipped later. The back side doesn’t have spaces for dice. I’m less worried about that (they can be manually deleted…if there is a way to trigger to have them deleted on a card flip, that might be fancy cool, but not necessary). All the other cards in the game have a static layout, so I will just splice them all together in one image that will be the board and can support at-start stacks, so that’s easy. So, if I have a 1x6 grid and randomly assign cards to each grid location (can that be automated??) how can I have a spot for each card to hold 3 dice?

If I’m understanding correctly, the dice locations are essentially fixed. In that case, I would define a region for each possible location, then you can the Send to Location trait to send your dice pieces to a specific region. Make sure you have a Game Piece Layers trait on your map, and assign the dice to a higher layer than the cards, so they are always drawn on top.

To automatically delete the dice when the card is flipped, you could use a Trigger Action, which would determine the location of the card to be flipped, delete the appropriate dice, then actually flip the card (instead of allowing users to directly access the flip command).

Automatically dealing the cards randomly is certainly do-able, but somewhat complicated. Basically, you would need a Startup Global Key Command that triggered a Trigger Action, which would draw a card to place on the 1st location, then one for the 2nd location, etc. To facilitate this, you would need:

  1. Create a region for the center point of each of your 6 card locations (or determine the exact X,Y coordinates for each).
  2. Give each of your 6 cards a set of 6 Send to Location traits, one for each of those 6 locations–a Prototype would be ideal for this.
  3. Place the 6 cards in a deck, rather than an at-Start Stack, and set the deck to “auto shuffle”.

Note that this is just one possible way to do this; VASSAL is very flexible! If, for example, there is some reason you can’t put the cards in a deck, you could also use the Random() function in an expression to determine a random card for each location (or vice versa), but that would be more complicated.

Thanks. This is very helpful. I’m making some good progress.