Create account / Log in

Send card to deck and shuffle

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Send card to deck and shuffle

Postby Khalcory » July 3rd, 2012, 2:04 am

I have a deck that needas to stay in order until a certain card comes up, then i want to be able to send the card to the deck and have it shuffle. I tried the same approach as "return to deck and send to bottom" trigger, but that doesn't seem to work as there isn't a reshuffle hotkey that i can find and the ones i create in the deck properties don't seem to work. Any suggestions?
Khalcory
 
Posts: 3
Joined: April 17th, 2011, 2:55 am

Re: Send card to deck and shuffle

Postby barbanera » July 3rd, 2012, 7:33 am

Reshuffle via right-click menu and defining an hotkey should be the way to do it. I made a quick test and seems working to me.
barbanera
 
Posts: 395
Joined: January 12th, 2012, 2:27 pm

Re: Send card to deck and shuffle

Postby Ratty » July 11th, 2012, 2:21 am

OK there is a slight issue with using Global Hot Keys to Shuffle Decks as part of a chain of triggers, that can cause a bug..

The best way is to create a hidden deck that is set to always shuffle.. IE when you draw a card from it,it comes up randomly. Then move all cards to that Deck (Don't use send to deck), then all cards from that Deck back to your original deck. This will have the same effect as shuffling, but won't cause errors.

The way I do it is... Note I'm using 3.2 which is a really good idea if you do lots of things like this

Hidden Object

Trigger:
Keyboard Command: Remake Deck
Perform these Keystokes:
Remake
Shuffle_Deck

GKC:
Keyboard Command: Remake
Global Key Command: SendShuffler
Matching Properties: DeckName = yourDrawDeck || PieceName = yourPieceName
Within a Deck, apply to: All Pieces


GKC:
Keyboard Command: Shuffle_Deck
Global Key Command: ShuffleBackToDeck
Matching Properties: DeckName = yourHiddenAlwaysShuffleDeck
Within a Deck, apply to: All Pieces

On Cards

Trigger:
Keyboard Command: SendShuffler
Perform these Keystokes:
SendCardToShuffler

Return to Deck:
Keyboard Command: SendCardToShuffler
Select Deck: yourHiddenAlwaysShuffleDeck

Trigger:
Keyboard Command: ShuffleBackToDeck
Perform these Keystokes:
SendCardToDeck

Return to Deck:
Keyboard Command: SendCardToDeck
Select Deck: yourDrawDeck
Ratty
 
Posts: 17
Joined: June 9th, 2012, 7:44 pm

Re: Send card to deck and shuffle

Postby barbanera » July 11th, 2012, 10:03 am

Is this long list of instructions really needed? As I said the one line instruction I gave seems working fine to me.

Care to specify whih bug you are talking about? Was it maybe a bug in older versions of Vassal?

I am interested because, if there really is a bug, I for one would surely know which one it is and what side effects it gives. Just to make sure I am not falling for it already in some of my modules!
barbanera
 
Posts: 395
Joined: January 12th, 2012, 2:27 pm

Re: Send card to deck and shuffle

Postby Ratty » July 21st, 2012, 3:04 pm

The issue appeared in 3.2


Using Global Hotkey can cause timing issues, I was finding that cards were getting flipped the wrong way up in the Deck and then once they reached the top, not dealing. Sending to a Hidden Auto-Shuffle stack fixed these issues.
Ratty
 
Posts: 17
Joined: June 9th, 2012, 7:44 pm

Re: Send card to deck and shuffle

Postby barbanera » July 21st, 2012, 3:15 pm

So is this now fixed though?

I don't remember anymore, but I think I did test with 3.2.0 beta 1 as well, but I might be wrong.
barbanera
 
Posts: 395
Joined: January 12th, 2012, 2:27 pm

Re: Send card to deck and shuffle

Postby Ratty » July 22nd, 2012, 1:35 am

It is still broken, However it might not be an issue in this case as there are less cards being sent and only one Global Hotkey. But there is a is possibility it will mess up, so I would probably opt for the safer though more long winded solution.
Ratty
 
Posts: 17
Joined: June 9th, 2012, 7:44 pm

Re: Send card to deck and shuffle

Postby barbanera » July 22nd, 2012, 8:29 pm

You might be referring to the fact that global hotkeys don't (seem to) respect the timing in network play. They seem to fire off right away, in random order or similar lack of manners. Are you?

This is some issue with global hotkeys that we discussed a bit here months ago with Irishwulf, but that might have been in chat because I cannot find the thread right now. I think he even filed a bug report about it. Of course other people, such as yourself, might have discussed this much earlier and in other threads and filed bug reports relative to it.

In the case discussed here, it seems just a matter of one command on the card invoking a return to deck first and the global hotkey to reshuffle the deck next. As you say: just one global hotkey. Unless this hotkey insists to fire off before the return to deck happens (which will result in the triggering card ending up at the top) then it should work. But probably global hotkeys across network just don't respect any predictable order among themselves, while respecting other traits.. if I remember correctly..

Some testing across network needed (no problem in offline mode), I guess.. But, as a fail safe, one might simply have a trigger firing the global hotkey after the return to deck is completed and the problem should go away..?

In short, just 3 traits on the given card:
1) return to deck with text like "send to deck and reshuffle",
2) trigger firing off on the return to deck command invoking the global hotkey (see below),
3) global hotkey to invoke the deck reshuffle command.
barbanera
 
Posts: 395
Joined: January 12th, 2012, 2:27 pm


Return to Module Design

Who is online

Users browsing this forum: Bing [Bot] and 3 guests