Limiting the number of cards in a deck

Let’s say a player has a deck of cards that is generated by drawing cards from a master deck.

Also, let’s say that their personal deck is limited to 15 cards. If they have an event that states they receive another card and they already have 15 cards in their deck, they shouldn’t be able to draw another card.

Is it possible to get Vassal to determine that a deck has a set maximum number of cards and will not allow the drawing of new cards to the deck?


If you trace each MOVE on your Card to Control OldLocationName= MyDeck && MyDeck_numPieces >=15

Then you can activate automatically a Return to Deck …

Right ?



I thought of that but with so many cards being thrown around, there’s quite a large room error in the card count getting thrown off.

I’ll experiment.

A button with trigger to draw a card when deck_numpieces < 15 would work,
but it won’t prevent a manual draw and dropping it into the deck. Don’t
think there would be any way to do it beyond a really cumbersome set of
movement triggers.

Post generated using Mail2Forum (

That’s exactly what I was concerned about. I’m thinking about approaching it from the angle of scanning the zone the deck is in and triggering each card to advance a counter every time a card is to be drawn. If the counter hits 15, the card won’t be drawn.

As I said, time to experiment. (grin)

Put the deck in a hidden window. Use buttons for drawing cards. Global
hotkey for deck reshuffle. Makes manual draw impossible.
Work your trigger restriction as per normal.

Post generated using Mail2Forum (

If its critical that you must see the deck (shouldn’t really have to
but…), you can still prevent a manual draw by using a transparent overlay
sitting on the a top layer that covers the deck area and the card’s layer,
which does not snap, stack, move, and is unselectable.

Youll be able to see the deck just not interact with it except through
buttons and key commands from outside the overlay

Post generated using Mail2Forum (

Hi, Tim

 Your first idea isn't practical as it's a CCG and all cards need to be visible and accessible.

 However, you're second suggestion ...that's an interesting angle. I might be able to use that.


What do you mean by accessible?

The second idea is no different from the first except for the visibility of the deck. In each case the deck is rendered inaccessible to manual drawing or right clicking. Any commands that manipulate the deck (i.e reshuffle, send to other deck or deck GKC) must exist outside of it relayed somewhere else by 3rd party to its hotkey/key command

From: Dr_Nostromo
Sent: Fri, March 19, 2010 8:47:36 AM
Subject: [Module Design]Re: Limiting the number of cards in a deck

Hi, Tim

Your first idea isn’t practical as it’s a CCG and all cards need to be visible and accessible.

However, you’re second suggestion …that’s an interesting angle. I might be able to use that.



Creator - To Be King & Trivial Wars

Need help with Vassal or want to play Trivial Wars? Call me on Skype - dr_nostromo

See To Be King being built from scratch

Messages mailing list ( …

Post generated using Mail2Forum (

Sorry. Accessible was the wrong word to use. What I meant is that the deck needs to be seen as they’ll be a counter next to it showing the number of cards in the deck that all players should be able to see. I could still hide the decks, I suppose, but if I use a blank overlay, I don’t need to go through the trouble of setting up a hidden window. …not to mention the fact that the card table graphics are zoned with the current decks and are already complete and in place.

Heh, heh.

Sometimes the simplest of solutions can elude us.

I just put a Do Not Stack trait in the card prototype with select as normal and move as never. The cards can still be moved around by buttons and triggers but they can’t be dragged. I can maintain an accurate count in a deck with that.