Draw Random Card from Player Hand

I have a situation in a module I’m developing where players have a hand of 5 cards made of up of draws from a larger deck. That’s all well and good.

However, during the game, players will routinely need to draw cards at random from ANOTHER players hand, without knowing what the cards are. They would then be laid down on the table and flipped over and eventually returned back to the owners hand.

Any idea how to do this in an efficient manner? Is there a way to have the face of the card visible to the owning player when “in their hand” but allow another player to only see the card backs when looking at their hand, so they can drag a card onto the table and then have the owning player flip it?

Thanks!

Use the mask trait you will need 2 “back faces” one for the owner which lets
them see through to the visible side and one standard opaque back face which
all other players see

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of Mezmorki
Sent: Thursday, April 21, 2011 12:40 PM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Draw Random Card from Player Hand

I have a situation in a module I’m developing where players have a hand
of 5 cards made of up of draws from a larger deck. That’s all well and
good.

However, during the game, players will routinely need to draw cards at
random from ANOTHER players hand, without knowing what the cards are.
They would then be laid down on the table and flipped over and
eventually returned back to the owners hand.

Any idea how to do this in an efficient manner? Is there a way to have
the face of the card visible to the owning player when “in their hand”
but allow another player to only see the card backs when looking at
their hand, so they can drag a card onto the table and then have the
owning player flip it?

Thanks!


Read this topic online here:
https://forum.vassalengine.org/t/draw-random-card-from-player-hand/3868/1

Awesome, thanks! I’ll give it a shot.

A mod I just posted recently for BattleCON uses the type of masking we’re talking about.

http://www.vassalengine.org/wiki/Module:BattleCON

As far as drawing a random card from a players hand, you’ll need a region point or zone on the main board to send the card to. The cards should have a prototype that contains the following examples:

Marker - Card = True
Send to Location - Send to main map and the region point or zone you established. For this example, we’ll use CTRL 1 to trigger the send.

Then you need a Global Hot Key somewhere that will send a CTRL 1 to one piece at

CurrentMap = (the player’s hand) && Card = True

You’ll have to test this, though. I’m not sure if it will send a random card or always send the first card.