Sending cards to variable locations

In the game I am working on (Imperius), it involves passing cards to your neighbor.
Now ideally I would like to be able to set a global variable as to who is your pass target, since that can be different game to game. I can not for the life of me figure out how to send to THAT counter/zone or THIS counter/zone depending on a variable setting.

Eventually I solved it by having a “Pass Token” counter, where I can move it to the player I want to pass it to, then the pass cards will land on top of it. But if I can do it in the original desired way that’ll be ideal. Any suggested welcome!

  1. Say you have a global property named Destination.
  2. You then set it to the name of the location you want to send something to (e.g. “Red In Pile”).
  3. You then send a Global Key Command to the piece or pieces you want to move there. My GCK for this is called “ToDestination” but you can use any name/keystroke you want.
  4. The pieces you want to be able to move have a “Send to Location” trait that responds to “ToDestination”. For mine I set the trait to “Region on specified map”, set the map to “Main Map” (or “Map” or whatever your main window/map is called) and in the region dialog I put ToDestination (or if you’re using the expression builder box over on the right, it will come out as {ToDestination} but either will work in this case).

If you want to see a working example I use this exact functionality in the For The People module in the “Unit” prototype (so that units go to the destinations I want), and I send them there from the “Setup Control” prototype which I use to set up various game scenarios. (also from other places, e.g. Army Maker, Turn Marker, etc).


Thanks, will look

One slight correction I realized in the final step (step 4) if you’re NOT using the expression builder then you want $ToDestination$ in the region field – I tend to use the expression builder and just type ToDestination (and then it auto-puts curly braces around it).

I cn get it to work to send to a region, but not to a counter, it is driving me nuts, still debugging…

I figured it out. Pieces from one Map can not see the global property of another Map (you know maybe they shouldn’t call it Global :slight_smile:
Now I moved the property to module level and then all is good…
Thanks for the help.

All properties outside of a piece are generically called ‘Global’ Properties. The order of looking for a matching property is Piece → Current Zone → Current Map → Module. Any Property is ‘Global’ to any components residing within it.


I looked at your For the People module, I see that you have variable names for a lot of KeyStroke in the unit traits definition section. How do you do that? When ever I tried to type one of those it forces you to use a keyboard shortcut…

They are not variable names, they are Named Key Strokes. All Keystroke fields can take either a single character (KeyStroke), which can have optional Shift/Alt/Ctrl settings, or can have a Named KeyStroke. You enter a Named KeyStroke by just typing it into a Keystroke field with no pause. If you pause after the first character, Vassal thinks you are entering a single Key Stroke, then the next character you type in, it will think that is another single KeyStroke to replace the first. It’s all in the timing.

Named Key Strokes work just the same as single Key Strokes except that you cannot initiate them from the keyboard, they can only be initiated by right-click menu command, or by traits that issue Key Commands (e.g. Trigger Action, Global Key Command etc.). Each uniquely named Named Key Stroke is guaranteed to be different from any Key Stroke you can create using the Keyboard, so they can never be initiated accidentally from the keyboard.

Named Key Strokes allow you to use mnemonic names for Key Strokes that are used internally by your pieces. It means you don’t have to keep track of all the different Key Strokes you have used in your module so far to make sure they don’t overlap.

Yes, Named Keystrokes are the BEST THING EVER! ™

I name my traits with their content, so I know what they do without opening them.
For example, a trigger can be named: Next Gen (gen >1) → reset counters, push cube, sound gen
And each of these second elements are my Named Keystrokes.
I then copy/paste them in the section for the executed keystrokes.
The trick is that Ctrl+V will be interpreted AS a keystroke !
So when selecting a cell for the named keystroke, I first type 2 spaces or any char, then Ctrl+V.
After a while you get used it.
Just avoid naming your keystrokes with leading digits.

THAT’S a GREAT trick! I’ve long been stymied by not being able to Ctrl+V things into that blank, but never thought to try that! Thank you very much!

And that’s when I could teach something to Cattlesquat ! At last, that day arrived !