# Return to Deck Documentation?

**URL:** <https://forum.vassalengine.org/t/return-to-deck-documentation/78795>\
**Category:** Module Design\
**Created:** [January 25, 2024, 1:40pm UTC](https://forum.vassalengine.org/t/return-to-deck-documentation/78795 "2024-01-25T13:40:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pawnpusher](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/pawnpusher/32/184_2.png) [@pawnpusher](https://forum.vassalengine.org/u/pawnpusher)\
**Post date:** [January 25, 2024, 1:40pm UTC](https://forum.vassalengine.org/t/return-to-deck-documentation/78795/1 "2024-01-25T13:40:52Z")

</div>

Howdy,

Maybe I don’t know where to look, but I’m having trouble finding the documentation on the Return to Deck trait in the Reference Manual. It doesn’t seem to be included in the game piece trait list: [https://vassalengine.org/doc/latest/ReferenceManual/GamePiece.html#Traits](https://vassalengine.org/doc/latest/ReferenceManual/GamePiece.html#Traits)  
Although I see a text reference to the Return to Deck trait in the Name property discussion for Decks in: [VASSAL Reference Manual](https://vassalengine.org/doc/latest/ReferenceManual/Deck.html#top)  
I don’t see any links to documentation for the Return to Deck on that Deck page.

I am using the Return to Deck trait, but having a problem that I will write about in a separate topic  
**Edit: The second post in [KC to Apply to all units ending movement on this map](https://forum.vassalengine.org/t/kc-to-apply-to-all-units-ending-movement-on-this-map/10076) is a description of what I perceive as the problem.**

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![JoelCFC25](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/joelcfc25/32/2687_2.png) [@JoelCFC25](https://forum.vassalengine.org/u/JoelCFC25)\
**Post date:** [January 25, 2024, 2:21pm UTC](https://forum.vassalengine.org/t/return-to-deck-documentation/78795/2 "2024-01-25T14:21:59Z")

</div>

[The Return to Deck reference page certainly exists](https://vassalengine.org/doc/latest/ReferenceManual/ReturnToDeck.html#top), but you’re right it looks like it’s dropped off the list of piece traits on your initial link.

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [January 25, 2024, 2:27pm UTC](https://forum.vassalengine.org/t/return-to-deck-documentation/78795/3 "2024-01-25T14:27:10Z")

</div>

Here’s a [PR](https://github.com/vassalengine/vassal/pull/13101) to add the missing entry to the trait list in the Reference Manual. It will be there when 3.7.8 is released at the end of the month.

---

<div class="post-metadata">

**Author:** ![Korval](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Korval](https://forum.vassalengine.org/u/Korval)\
**Post date:** [January 26, 2024, 12:16pm UTC](https://forum.vassalengine.org/t/return-to-deck-documentation/78795/4 "2024-01-26T12:16:07Z")

</div>

So… I have a question on this… “Most” decks are randomized, but some games use decks that are _not_ randomized and the maintaining the correct order is critical…  
Most games that do this, put the card at the bottom of the stack, but some put it at the top of the stack…

So for a _non-randomized_ deck, does “Return to Deck” put it on the TOP or BOTTOM of the deck?

IMHO, it would be good to give the module designer the flexibility to do either…

---

<div class="post-metadata">

**Author:** ![dsmith71](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/d/48db29/32.png) [@dsmith71](https://forum.vassalengine.org/u/dsmith71)\
**Post date:** [January 26, 2024, 12:39pm UTC](https://forum.vassalengine.org/t/return-to-deck-documentation/78795/5 "2024-01-26T12:39:14Z")

</div>

Hi;  
Would a [Deck Sort Key Command](https://vassalengine.org/doc/latest/ReferenceManual/DeckSortKeyCommand.html#top) help with that?

Darren

---

<div class="post-metadata">

**Author:** ![Korval](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Korval](https://forum.vassalengine.org/u/Korval)\
**Post date:** [January 26, 2024, 12:54pm UTC](https://forum.vassalengine.org/t/return-to-deck-documentation/78795/6 "2024-01-26T12:54:25Z")

</div>

I don’t think so… Because while that will allow you to sort the deck based on some inherent property of the cards, the use case I describe must maintain relative order of pulled/played/discards (when there is no separate discard pile).

Imagine a deck (top) A, B, C, D, E, F, G, H (bottom). (Note there is no separate discard pile).

Scenario #1: Discards go to top.  
I draw 3 cards (A, B, C) and play/discard “B” (retain A, C in hand).  
Deck is now: (top) B, D, E, F, G, H (bottom)

Scenario #2: Discards go to bottom.  
I draw 3 cards (A, B, C) and play/discard “B” (retain A, C in hand).  
Deck is now: (top) D, E, F, G, H, B (bottom)

---

<div class="post-metadata">

**Author:** ![JoelCFC25](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/joelcfc25/32/2687_2.png) [@JoelCFC25](https://forum.vassalengine.org/u/JoelCFC25)\
**Post date:** [January 26, 2024, 1:06pm UTC](https://forum.vassalengine.org/t/return-to-deck-documentation/78795/7 "2024-01-26T13:06:59Z")

</div>

> [@Korval](#):
>
> So for a _non-randomized_ deck, does “Return to Deck” put it on the TOP or BOTTOM of the deck?

Good question. When targeting an _ordered_ deck, Return to Deck puts something on top of that deck. The docs should be modified to make that clear.

To get a card to the bottom of an ordered deck, you can employ a Trigger that first sends the RtD, then applies `Down arrow`.

---

<div class="post-metadata">

**Author:** ![dsmith71](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/d/48db29/32.png) [@dsmith71](https://forum.vassalengine.org/u/dsmith71)\
**Post date:** [January 27, 2024, 1:04am UTC](https://forum.vassalengine.org/t/return-to-deck-documentation/78795/8 "2024-01-27T01:04:31Z")

</div>

> [@JoelCFC25](#):
>
> To get a card to the bottom of an ordered deck, you can employ a Trigger that first sends the RtD, then applies `Down arrow`.

That is handy to know. How did you find this information?

Darren

---

<div class="post-metadata">

**Author:** ![JoelCFC25](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/joelcfc25/32/2687_2.png) [@JoelCFC25](https://forum.vassalengine.org/u/JoelCFC25)\
**Post date:** [January 27, 2024, 2:56am UTC](https://forum.vassalengine.org/t/return-to-deck-documentation/78795/9 "2024-01-27T02:56:24Z")

</div>

I had a minimal module with an ordered deck in it already from something I was demonstrating to another user just within the last few days, so I modified it quick to test and make sure it works the way I thought it did.
