Draw multiple cards to specific location/coordinates

Hi All,
I’m working on a module for Malifaux (based, with permission on the Warmachine module) at the moment. I have the basic deck mechanics and artwork working (see blog here if you’re interested - http://www.farfaraway.org/blog/2011/05/24/malifaux-vassal-module-video/).

I know there is a draw multiple cards menu command possible for decks, but I’d like to be able to draw 2, 3 or 4 cards to a specific location (or coordinates) with the cards on top of each other, but offset slightly. Imagine how you might lay down a poker hand with just the number and suits of the lower cards peeking out from the ones above them - that’s what I’m trying to achieve, but with a Deck Global Key Command to initiate it.

Any advise on how to achieve this would be greatly appreciated.


This is a totally untested theory but I think it should work. If not, I’m sure someone will correct me.

First, create a Global Properties …let’s call it CardCounter …with a numeric value of 0 and a range of 0 to 4.

Create a Region Point (Irregular Grid) or a Zone that the cards will be sent to. In this case, let’s create a RP called CardsDrop

Create a Prototype for the cards. In this prototype, place the following traits. Keep in mind that I’m listing these traits in execution order. On a game piece, traits are executed from the bottom up so they would be listed in reverse on the game piece / card.

Trigger Action
Triggers on CTRL 0
Performs the following keystrokes

Set Global Property
GP = CardCounter
is numeric
Range = 0 - 4
Key Command = CTRL 1 - Increment value by 1

Send to Location
Keyboard Command = CTRL 2
Send to Region Point = CardsDrop
Advanced Options
X offset = 20 Times $CardCounter$
Y offset = 20 Times $CardCounter$

(Note on Send to Location quirk - If you use Advanced Options on a STL trait and then save and reopen the trait, the Advanced Options box will no longer be checked and the options won’t be shown. If you check the box, you’ll see the options are still there and they will still function whether you can see them or not.)

Now set up a Global Key Command somewhere. For this example, lets say you have a button that deals cards. This button would contain the following traits.

Action Button
Invokes a CTRL 3

Trigger Action
Triggers on CTRL 3
Performs keystrokes

Global Key Command
Triggers on a CTRL 4
Sends a CTRL 0
Matching properties - CurrentMap = (map window that contains the deck) && DeckName = (name of the deck)
Fixed number of pieces = 4

Set Global Property
GP = CardCounter
is numeric
Range = 0 - 4
Key Command = CTRL 5 - Set value directly to 0

With this example, the button would send a CTRL 0 to the number of cards specified. Each card receiving the command would update the CardCounter and then send itself to the Region Point. Since the offset of how the card is placed is dependent on the CardCounter, each card should offset itself by 20 X and 20 Y. After all the cards have been sent, the button will then reset the CardCounter to 0.

Thanks for your comprehensive response. It worked very well and exactly as you described. Once I tidy things up a bit I’ll do another video. A quick (simple) follow up question - is it possible to add an Action Button to a Board? The cards are played on a Board (called Side Board); graphically editing the underlying image to add +++, ++ and + buttons to draw different numbers of cards is obviously easy, but how would I create action buttons over areas of the image?

Thanks again for the superb advice - It would have taken me long time to find that solution.


Create a graphic for the button.

Then add an At-Start Stack to the board. Add a Single Piece to the A-SS. This will be your button. After adding the button, save the module, close it, and re-open the editor. This will make sure the new button graphic is loaded. In the properties of the A-SS, uncheck the “Use Grid Location” and click the “Reposition Stack” button. You can then place the button where ever you like.

You can also enter the X and Y coordinates manually, if you like. The X, Y would represent the center point of where this A-SS would be located.

Once your button is in place, you’ll probably want to add a Does Not Stack trait to it. You can then set the button to be selectable but non-movable.

You can create as many At-Start Stacks on the board as you like. They’re great for creating any number of interactive objects on the board.

That worked perfectly - I really appreciate your invaluable help. I’ll post a video of it working soon…


Here’s the video -

Thanks again,