Sending a card to a specified deck in a player's hand

Hello all.

I’m new to Vassal Module creation so please bear with me. I’m currently making a module for a deck building game. I’m trying to add a trait where a player can send a card from the Game Board (technically from anywhere) to a specified deck in their Player Area (in this case, their Discard Pile). Right now I’m only using the function “Send to Location” with $playerSide$ as the location and I’m wondering if there was a simple way for me to specify a particular deck located within each Player Area.

Thanks everyone!

use multiple Return to Deck trait in conjunction with Trigger Action that parse playerSide ands execute correct RTD. All variant paths can be stored in single prototype

I’m sorry, I’m a major newbie when it comes to this.

Can you simply the explanation somewhat? How do I parse playerSide with the Trigger? I’m trying to ensure that there’s only 1 “Send to Discard” action as opposed to 4 different ones (for each Player’s Discard Pile).

Sorry, and thanks!

There will be only 1 “Send to discard” on the card - everything else is done behind the scenes.

Make a prototype - call it “Discard Routine” then add the following traits (built as indicated)

Return to Deck trait
Menu Text - blank out
Keyboard command - ALT 1
*Select Deck - Player 1 Discard deck

Return to Deck trait
Menu Text - blank out
Keyboard command - ALT 2
*Select Deck - Player 2 Discard deck

Return to Deck trait
Menu Text - blank out
Keyboard command - ALT 3
*Select Deck - Player 3 Discard deck

Return to Deck trait
Menu Text - blank out
Keyboard command - ALT 4
*Select Deck - Player 4 Discard deck

Trigger Action Trait
Description - this trigger goes to player 1
*Trigger when properties match - $playerSide$ = Player 1
Menu Command - blank out
Keystroke - blank out
Watch for keystroke - ALT 0
Perform keystroke - ALT 1

Trigger Action Trait
Description - this trigger goes to player 2
*Trigger when properties match - $playerSide$ = Player 2
Menu Command - blank out
Keystroke - blank out
Watch for keystroke - ALT 0
Perform keystroke - ALT 2

Trigger Action Trait
Description - this trigger goes to player 3
*Trigger when properties match - $playerSide$ = Player 3
Menu Command - blank out
Keystroke - blank out
Watch for keystroke - ALT 0
Perform keystroke - ALT 3

Trigger Action Trait
Description - this trigger goes to player 4
*Trigger when properties match - $playerSide$ = Player 4
Menu Command - blank out
Keystroke - blank out
Watch for keystroke - ALT 0
Perform keystroke - ALT 4

Trigger Action Trait
Description - this trigger controls routine and command entry on the card
Trigger when properties match - blank out
Menu Command - Send to Discard Pile
Keystroke - Ctrl 0
Watch for keystroke -
Perform keystroke - ALT 0

  • Your variable name for the deck and/or player names may differ - substitute as req.

Add this prototype to all your cards.You will see only one command on the card “Send to Discard Pile”, but it will now go to the discard deck based on the playerSide that executes the command

Thank you very much for the very succinct explanation.

Unfortunately, this doesn’t work for me… as clear, simple and logical as this looks. I have no idea whats wrong.

I’ve kept the same hotkeys and ensured that they’re not being used elsewhere in the module. I’ve replaced each Discard Pile destination with the appropriate name (“Discard Pile (P1)” “Discard Pile (P2)” “Discard Pile (P3)” “Discard Pile (P4)”). My player definitions are “Player 1” “Player 2” “Player 3” and “Player 4”. I’ve followed your example to the letter. I’ve ensured that the requisite cards have the Prototype listed under its traits list. But when I try to activate the trigger “Send to Discard Pile” in game, it simply does… nothing.

For some reason it seems as if the $playerSide$ = Player X property isn’t working. I have a crude workaround with 4 RTDs listed under a submenu that work perfectly fine. It seems the problem lies somewhere with the triggers and the properties. I apologize if there’s something horribly obvious that I’m missing.

Send me a link to your mod and I’ll look it over for you

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of janussenpre
Sent: Friday, August 10, 2012 6:38 PM
To: messages@vassalengine.org
Subject: [messages] Edit: Re: [Module Design] Sending a card to a specified
deck in a player’s hand

[This message has been edited.]

Thank you very much for the very succinct explanation.

Unfortunately, this doesn’t work for me… as clear, simple and logical as
this looks. I have no idea whats wrong.

I’ve kept the same hotkeys and ensured that they’re not being used elsewhere
in the module. I’ve replaced each Discard Pile destination with the
appropriate name (“Discard Pile (P1)” “Discard Pile (P2)”
“Discard Pile (P3)” “Discard Pile (P4)”). My player definitions are “Player
1” “Player 2” “Player 3” and “Player 4”. I’ve followed your example to the
letter. I’ve ensured that the requisite cards have the Prototype listed
under its traits list. But when I try to activate the trigger “Send to
Discard Pile” in game, it simply does… nothing.

For some reason it seems as if the $playerSide$ = Player X property isn’t
working. I have a crude workaround with 4 RTDs listed under a submenu that
work perfectly fine. It seems the problem lies somewhere with the triggers
and the properties. I apologize if there’s something horribly obvious that
I’m missing.


Read this topic online here:
https://forum.vassalengine.org/t/sending-a-card-to-a-specified-deck-in-a-players-hand/5184/5

I realise this is an old post but I was trying to follow the instructions above and also had a problem with the menu item doing nothing. In the end I realised that the ‘Trigger when properties match’ expression should not include the dollar signs around the playerSide property e.g. the entire trigger expression that worked in my case was (mus the quotes): ‘playerSide = Player1’

Other than that the solution worked fine - thanks for posting.

Hope this helps anyone else who tries this.

Dear I’ve replaced each Discard Pile destination with the appropriate name (“Discard Pile (P1)” “Discard Pile (P2)” “Discard Pile (P3)” “Discard Pile (P4)”). My player definitions are “Player 1” “Player 2” “Player 3” and “Player 4”. I’ve followed your example to the letter. I’ve ensured that the requisite cards have the Prototype listed under its traits list…!!! :slight_smile:

If a player lands on either a “Deal” or “Mail” space, they will then select the suitable card from the top of the specified deck. :mrgreen: