Sending a card to the bottom of a deck

What’s the best way to send a card to the bottom of a deck?

I used to just trigger a “return to deck” followed by “down” (down arrow command) to do it. That still works.

Then I also had a deck global key command (apply to “fixed number of pieces” set at 1) to simply issue “down” to send the top card in the deck to the bottom.

But the latter seems to not work consistently anymore? This is with both 3.2.17 and 3.3.1. Maybe something changed in Java?

Here I have a simple test mod where I have a deck with 3 cards. If I right click on the deck and issue “send to bottom of the deck” sometimes the top card is sent, but sometimes another one below is sent in its place. Apparently at random.

Any clue?

All is still working “as designed” :slight_smile:

If your deck GKC is picking a random card instead of the top one it probably means you have it set to “Reshuffle Always”

Oh, right, thanks, that makes complete sense. It used to be set to “never”, but I switched back to “always”.

So, this begs the question… any idea how to make sure the top card is always selected, even if the deck is set to “reshuffle always”?

The cards in this game are always face up, in a randomly shuffled deck, and there is an event which calls for sending the top one to the bottom.

“Always Reshuffle” means, I believe, that the cards are reshuffled every time any interaction with the deck occurs (whenever a card is added, whenever a card is taken out, etc).

So it sounds like what you want is a deck that’s randomly shuffled once (or only at very specific additional times) and then otherwise maintains its ordering such that cards can be “sent to the bottom” and stuff.

The easiest/simplest way to do that is to change your shuffle setting to “via Right Click menu” and then you manually shuffle with that when you want the deck shuffled.

If you want to have the shuffling controlled from elsewhere (e.g. a reshuffle button, or as something that happens automatically when something else triggers int he game), then you’ll want to set this deck’s shuffle setting to Never (or to “via Right Click Menu” if you want to go ahead and at least make that path available), and then make ANOTHER deck in some arbitrary location (I often hide them off the map, though they don’t strictly have to be), and when you want to reshuffle send a GKC to all cards in your normal deck to “return-to-deck” themselves to the OTHER SECRET deck (which you will have set to Always Reshuffle), and then send another GKC to all those cards (now in the “other secret deck”) to return-to-deck themselves back to the main deck. At which point they will have been reshuffled per your desire, but will now commence to behave as a strictly ordered deck.

It would be NICE if the via-right-click-menu option allowed a Hotkey to be set so that it could simply be triggered by a Global Hotkey, but that’s presently missing.

Thnks, I was coming to the same conclusions myself (the need for another work deck where I do the initial shuffle or the right click command to shuffle etc).

However, then I thought one could try to exploit the “DeckPosition” property, but that’s no go either. Note that the order of cards in a deck is known to the engine, with any reshuffle setting, as the “draw specific cards” command does show them in the actual order you put them in (in the module editor or by drag and drop during a test game). Therefore, I guess DeckPosition should be a well defined property even for cards in a “reshuffle always” deck.

So, one could hope that the deck GCK that issues “DOWN” with Matching Properties set to “DeckPosition=1” and “Fixed Number of Pieces = 1” (or, alternatively, “All Pieces”) should do the job.

However, DeckPosition=1 just never ever fires (fixed=1 or all setting).

I tried then DeckPosition=2 and it works… randomly… sometimes the card showing at the top goes to the bottom, sometimes nothing happens (this with fixed number of pieces set to 1, with “all pieces” setting sometimes one card is sent to the bottom, sometimes two cards and sometimes all three). And the order seems to be always preserved (as checked by “draw specific cards”)! Please, see example module attached (this done with 3.3.1).

I also tried DeckPosition=4 and it also fires in unpredictable ways. Note that there are only 3 cards in this test deck.

Bug with DeckPosition?

Issues with DeckPosition were already reported in previous threads:
https://forum.vassalengine.org/t/deckposition-bug/6671/1
https://forum.vassalengine.org/t/deckposition-does-not-seem-to-work-vassal-3-2-0-beta4/5455/1