[messages] [Module Support] Remember which deck cards came from...

Foobarius alter.alter.ego at hotmail.com
Sat Oct 3 12:16:42 CEST 2015

> Is it the case that the DGKC only ever applies to the contents of the
> deck?

This is indeed the case, I'm afraid.  You could add a GKC to the pieces
in the deck, which forwards the command on to the Trade Counter 1 piece
(I've done something like this myself in the past).  But in your case,
since all you need to do is set a global property, I think you can avoid
the need for the Trade Counter 1 piece entirely.

I think you can just use a couple of Trigger Actions on the cards in the
deck to set the property then move the card:

Trigger Action 1:
- Keyboard command: __SHIFT A__
- Perform these keystrokes:
    CTRL R__

Trigger Action 2:
- Trigger when properties match:__ {nTrade != 1}__
- Keyboard command: __ensureNTrade1__
- Perform these keystrokes:
    __ALT A__

The second Trigger isn't strictly necessary, since you could just put
ALT A in the first Trigger.  But setting a global property causes data
to be sent to other players and/or the log file, so having both Triggers
saves a bit of bandwidth/filesize.

Incidentally, an often overlooked VASSAL feature is 'named keystrokes'
(like ensureNTrade1 in the example above).  When you need to enter a
keystroke, you can just type in a string of characters instead of a
'real' keystroke.  The user can't perform these keystrokes in the actual
game, so they're useful for internal things that the user shouldn't know

Read this topic online here:

More information about the messages mailing list