# A deck question

**URL:** <https://forum.vassalengine.org/t/a-deck-question/1476>\
**Category:** Module Design\
**Created:** [January 15, 2009, 5:25pm UTC](https://forum.vassalengine.org/t/a-deck-question/1476 "2009-01-15T17:25:49Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![DrNostromo](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/drnostromo/32/12593_2.png) [@DrNostromo](https://forum.vassalengine.org/u/DrNostromo)\
**Post date:** [January 18, 2009, 6:21pm UTC](https://forum.vassalengine.org/t/a-deck-question/1476/21 "2009-01-18T18:21:53Z")

</div>

Thanx!

Glad I could help.

---

<div class="post-metadata">

**Author:** ![packonn](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/packonn/32/65_2.png) [@packonn](https://forum.vassalengine.org/u/packonn)\
**Post date:** [January 18, 2009, 9:56pm UTC](https://forum.vassalengine.org/t/a-deck-question/1476/22 "2009-01-18T21:56:11Z")

</div>

Now, I will try automate the reverse process. Clic on other button, and the 25 cards distributed on the map return to deck. I hope achieve it 😮

---

<div class="post-metadata">

**Author:** ![DrNostromo](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/drnostromo/32/12593_2.png) [@DrNostromo](https://forum.vassalengine.org/u/DrNostromo)\
**Post date:** [January 19, 2009, 1:22am UTC](https://forum.vassalengine.org/t/a-deck-question/1476/23 "2009-01-19T01:22:55Z")

</div>

Easy way to do that would be to place a Marker in your card prototype. Something like

CardType = Standard

Then just have the button send a “Return to Deck” key command to all pieces with the property:

CurrentMap = (map the cards are on) && CardType = Standard

That should do it.

---

<div class="post-metadata">

**Author:** ![packonn](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/packonn/32/65_2.png) [@packonn](https://forum.vassalengine.org/u/packonn)\
**Post date:** [January 19, 2009, 7:07pm UTC](https://forum.vassalengine.org/t/a-deck-question/1476/24 "2009-01-19T19:07:54Z")

</div>

> [@Dr\_Nostromo](#):
>
> Then just have the button send a “Return to Deck” key command to all pieces with the property:  
> CurrentMap = (map the cards are on) && CardType = Standard

Sorry, my head is confused. I´m trying to resolve the mistery whole last night, unsuccessfully (of course), and now you give me the secret in two words, leaving my mind blank.  
Two questions:

1. I have to create a new button?, or the same button is used for rebuild the deck?
2. “Return to Deck” is a trait that does not allow the expression “CurrentMap =(map the cards are on) && CardType = Standard”. Then, where I write this expression?

Thanks again.

---

<div class="post-metadata">

**Author:** ![DrNostromo](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/drnostromo/32/12593_2.png) [@DrNostromo](https://forum.vassalengine.org/u/DrNostromo)\
**Post date:** [January 19, 2009, 9:58pm UTC](https://forum.vassalengine.org/t/a-deck-question/1476/25 "2009-01-19T21:58:36Z")

</div>

> [@](#):
>
> 1. I have to create a new button?, or the same button is used for rebuild the deck?

You can do either. If you use the same button, you’ll have use a Dynamic Property trait to change the status of the button. If you want to do that, let me know and I’ll tell you how.

> [@](#):
>
> 1. “Return to Deck” is a trait that does not allow the expression “CurrentMap =(map the cards are on) && CardType = Standard”. Then, where I write this expression?

The property traits would be in the new button. Your button would have the following:

Action Button  
Invokes CTRL 1

Global Key Command  
Keyboard Command: CRTL 1  
Global Key Command: CTRL R (if this is your “Return to Deck” key)  
Matching Properties: CurrentMap = (map the cards are on) && CardType = Standard  
Apply to all pieces

In other words, you’re using the button to send a command to somewhere else based on the Property Expression.

With the above property expression, the CTRL R would then get sent to all pieces with the CardType = Standard on the layout map and, if your card prototype has a “Return to Deck” trait that is triggered with a CTRL R and the Marker - CardType = Standard, they’ll all be returned to the deck.

---

<div class="post-metadata">

**Author:** ![packonn](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/packonn/32/65_2.png) [@packonn](https://forum.vassalengine.org/u/packonn)\
**Post date:** [January 19, 2009, 11:55pm UTC](https://forum.vassalengine.org/t/a-deck-question/1476/26 "2009-01-19T23:55:41Z")

</div>

Ok. I understand, and the other button finally works.  
I think that is better two buttons instead of one, but if you want to explain how to do the two actions at a single button, I will be all eyes (spanish expression).  
Thanks again, and again, …

---

<div class="post-metadata">

**Author:** ![DrNostromo](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/drnostromo/32/12593_2.png) [@DrNostromo](https://forum.vassalengine.org/u/DrNostromo)\
**Post date:** [January 21, 2009, 2:35pm UTC](https://forum.vassalengine.org/t/a-deck-question/1476/27 "2009-01-21T14:35:34Z")

</div>

I’m going to post a follow up on this …except I can’t seem to get it to work right in the sample mod (sheepish grin)

I’ll be back.

---

<div class="post-metadata">

**Author:** ![Nono](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/n/ce73a5/32.png) [@Nono](https://forum.vassalengine.org/u/Nono)\
**Post date:** [June 3, 2010, 3:02pm UTC](https://forum.vassalengine.org/t/a-deck-question/1476/28 "2010-06-03T15:02:48Z")

</div>

Hi everybody,

I will try to do the same (only drawing one card from the top of a deck in fact) and that seems to doesn’t work when cards are face down in the deck.  
That work well when the deck is face on (face down = never).

I miss something ? you have an explanation ?

(sorry for my poor english).

Arnaud.

---

<div class="post-metadata">

**Author:** ![tar](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/tar/32/21_2.png) [@tar](https://forum.vassalengine.org/u/tar)\
**Post date:** [June 3, 2010, 6:03pm UTC](https://forum.vassalengine.org/t/a-deck-question/1476/29 "2010-06-03T18:03:49Z")

</div>

On Jun 3, 2010, at 8:02 AM, Nono wrote:

> [@](#):
>
> Hi everybody,
> 
> I will try to do the same (only drawing one card from the top of a  
> deck in fact) and that seems to doesn’t work when cards are face  
> down in the deck.
> 
> That work well when the deck is face on (face down = never).

When you say that it “doesn’t work”, what exactly do you mean?

Do you mean that when you click on the deck to draw a card, nothing  
happens?  
Or do you get the entire deck instead of just one card?

> [@](#):
>
> I miss something ? you have an explanation ?
> 
> (sorry for my poor english).

C’est meilleur que mon français.

* * *

Messages mailing list  
[Messages@forums.vassalengine.org](mailto:Messages@forums.vassalengine.org)  
[forums.vassalengine.org/mailman/ … engine.org](http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org)

Post generated using Mail2Forum ([mail2forum.com](http://www.mail2forum.com))

---

<div class="post-metadata">

**Author:** ![Nono](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/n/ce73a5/32.png) [@Nono](https://forum.vassalengine.org/u/Nono)\
**Post date:** [June 3, 2010, 6:31pm UTC](https://forum.vassalengine.org/t/a-deck-question/1476/30 "2010-06-03T18:31:22Z")

</div>

> [@tar](#):
>
> When you say that it “doesn’t work”, what exactly do you mean?
> 
> Do you mean that when you click on the deck to draw a card, nothing  
> happens?  
> Or do you get the entire deck instead of just one card?

In the exemple modul of this topic, you click on the “Deal” button and the card are automatically placed on board. If you change the card prototype to add a mask, and if you set the deck to “content are face-down : ALWAYS” (insted of NEVER) when you click on the “Deal” button, nothing happen.

In my module, I juste want to draw one card when I click on the “deal” button, so it is more simple, I don’t need the trigger etc… that works fine if my deck is set to NEVER (but I see the face of the bottom card of the deck) and doesn’t work when it is set to ALWAYS (I see the back of the card but nothing happen).

Arnaud.

---

<div class="post-metadata">

**Author:** ![Tim\_M](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/tim_m/32/2_2.png) [@Tim\_M](https://forum.vassalengine.org/u/Tim_M)\
**Post date:** [June 3, 2010, 7:20pm UTC](https://forum.vassalengine.org/t/a-deck-question/1476/31 "2010-06-03T19:20:08Z")

</div>

Check your trait stack order. The mask trait is hiding the dealing trait, thus preventing it from working

From: Nono [messages@forums.vassalengine.org](mailto:messages@forums.vassalengine.org)  
To: [messages@forums.vassalengine.org](mailto:messages@forums.vassalengine.org)  
Sent: Thu, June 3, 2010 1:31:23 PM  
Subject: [Module Design]Re: A deck question

tar wrote:

> [@](#):
>
> When you say that it “doesn’t work”, what exactly do you mean?

> [@](#):
>
> Do you mean that when you click on the deck to draw a card, nothing

> [@](#):
>
> happens?

> [@](#):
>
> Or do you get the entire deck instead of just one card?

In the exemple modul of this topic, you click on the “Deal” button and the card are automatically placed on board. If you change the card prototype to add a mask, and if you set the deck to “content are face-down : ALWAYS” (insted of NEVER) when you click on the “Deal” button, nothing happen.

In my module, I juste want to draw one card when I click on the “deal” button, so it is more simple, I don’t need the trigger etc… that works fine if my deck is set to NEVER (but I see the face of the bottom card of the deck) and doesn’t work when it is set to ALWAYS (I see the back of the card but nothing happen).

Arnaud.

* * *

Arnaud URBON

* * *

Messages mailing list  
[Messages@forums.vassalengine.org](mailto:Messages@forums.vassalengine.org) ([Messages@forums.vassalengine.org](mailto:Messages@forums.vassalengine.org))  
[http://forums.vassalengine.org/mailman/listinfo/messages\_forums.vassalengine.org](http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org)

Post generated using Mail2Forum ([mail2forum.com](http://www.mail2forum.com))

---

<div class="post-metadata">

**Author:** ![Nono](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/n/ce73a5/32.png) [@Nono](https://forum.vassalengine.org/u/Nono)\
**Post date:** [June 3, 2010, 8:34pm UTC](https://forum.vassalengine.org/t/a-deck-question/1476/32 "2010-06-03T20:34:07Z")

</div>

> [@Tim M](#):
>
> Check your trait stack order. The mask trait is hiding the dealing trait, thus preventing it from working

Wherever I place the mask trait that doesn’t work.  
I try “mask” before “sent to location” and the opposite, in both cases that doesn’t work.

may be I don’t understand what you have said ???

Arnaud.

---

<div class="post-metadata">

**Author:** ![Tim\_M](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/tim_m/32/2_2.png) [@Tim\_M](https://forum.vassalengine.org/u/Tim_M)\
**Post date:** [June 3, 2010, 8:46pm UTC](https://forum.vassalengine.org/t/a-deck-question/1476/33 "2010-06-03T20:46:23Z")

</div>

If it’s still not working after moving the mask about then you have some other restriction / option you are not telling us about.  
Drawing cards from decks should work be it if the cards are face up or face down - that has no bearing on the problem.

From: Nono [messages@forums.vassalengine.org](mailto:messages@forums.vassalengine.org)  
To: [messages@forums.vassalengine.org](mailto:messages@forums.vassalengine.org)  
Sent: Thu, June 3, 2010 3:34:07 PM  
Subject: [Module Design]Re: A deck question

Tim M wrote:

> [@](#):
>
> Check your trait stack order. The mask trait is hiding the dealing trait, thus preventing it from working

Wherever I place the mask trait that doesn’t work.

I try “mask” before “sent to location” and the opposite, in both cases that doesn’t work.

may be I don’t understand what you have said ???

Arnaud.

* * *

Arnaud URBON

* * *

Messages mailing list  
[Messages@forums.vassalengine.org](mailto:Messages@forums.vassalengine.org) ([Messages@forums.vassalengine.org](mailto:Messages@forums.vassalengine.org))  
[forums.vassalengine.org/mailman/ … engine.org](http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org)

Post generated using Mail2Forum ([mail2forum.com](http://www.mail2forum.com))

---

<div class="post-metadata">

**Author:** ![DrNostromo](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/drnostromo/32/12593_2.png) [@DrNostromo](https://forum.vassalengine.org/u/DrNostromo)\
**Post date:** [June 4, 2010, 2:39am UTC](https://forum.vassalengine.org/t/a-deck-question/1476/34 "2010-06-04T02:39:50Z")

</div>

I don’t know if this would apply but make sure your Mask is set up properly. Here’s what the mask trait should look like:

[http://www.drnostromo.com/tbk/Mask.png](http://www.drnostromo.com/tbk/Mask.png)

If yours has only the top image, click the Display Style and select Use Image. Then add your graphic again.

---

<div class="post-metadata">

**Author:** ![Nono](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/n/ce73a5/32.png) [@Nono](https://forum.vassalengine.org/u/Nono)\
**Post date:** [June 4, 2010, 7:21am UTC](https://forum.vassalengine.org/t/a-deck-question/1476/35 "2010-06-04T07:21:01Z")

</div>

Ok that works now, TIM has right, the “mask” trait has to be place before the “send to location” traits. In my module, my mistake was I call a “prototype” trait after the “send to location” in which there is an other “mask” trait.

Thank you for your help and for this explanation.

cheers,  
Arnaud.

---

<div class="post-metadata">

**Author:** ![NogginToboggan](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/n/e9a140/32.png) [@NogginToboggan](https://forum.vassalengine.org/u/NogginToboggan)\
**Post date:** [June 11, 2012, 10:09am UTC](https://forum.vassalengine.org/t/a-deck-question/1476/36 "2012-06-11T10:09:56Z")

</div>

rezing a dead thread but its relevant. I am trying to do this exact thing with a hex grid rather than irregular. I reaaly dont feel like putting the dots in myself. when i use “use region on selected map” it says it cannot find it (may be related to my using a multi-zone grid) and if I use “use zone on selected map” it dumps them all on the center grid location. ideas?

[Previous page](https://forum.vassalengine.org/t/a-deck-question/1476.md?page=1)
