I have been futzing with this for awhile. I settled on a global key command. Ctrl+S reshuffles the deck. I have a global key command looking for Ctrl+S which sends a SoundShuffle key to a hidden counter that responds to the SoundShuffle key. As a button Pressing the button initiates the shuffle sound so I know the global key command can activate the shuffle sound on the hidden counter. But the Ctrl+S command on the deck does not active the global key command. Any help appreciated.
I don’t quite understand; how can you have a Global Key Command “look” for Ctrl+S? GKCs send commands, they don’t listen for them. You need to add a new GKC to your deck (and hide the existing shuffle command by removing its menu entry), which when triggered, sends a Ctrl-S. That way, the Ctrl-S will be seen by every piece. Otherwise, it’s only seen by the deck itself, which is why your sound isn’t firing.
I may be confused (obviously). I attached a pic of the GKC. It looks for Ctrl+S (the dot) and sends out a key command to cause a shuffle sound (the arrow). The root of the issue is that ‘shuffle’ is a function of the ‘deck’ not the card in the deck. The pieces don’t get a shuffle key command. So I am trying to intercept the shuffle key stroke (Ctrl+S) that goes to the deck and add a sound to it by then generating a SoundShuffle key command that causes a hidden piece to generate a shuffle sound.
I don’t want to send a command for 45 cards to generate a shuffle sound (even if I could do that- which I can’t seem to do either).
Ah sorry, the confusion was on my part; I had forgotten you could add a “Global Key Command” at the top level, and those do look for a keystroke. Now that I look closer at the options for a deck, I’m not sure there’s any way to accomplish what you want, unfortunately; I can’t see any way of manually triggering a reshuffle besides the right-click menu option, and there’s no way to make that option also send the Ctrl-S Hotkey.
Edit: OK, I’m more confused than I thought; how is that Global Key Command triggering a shuffle at all?
Edit 2: I’m guessing you have the reshuffle Hotkey for the deck also assigned to Ctrl-S.
Okay, there is a way to do what you want, but it’s awfully convoluted; it would require creating a second, hidden deck (set to Shuffle: Always), and sending all the cards to this hidden deck and then back again, plus triggering either the Ctrl-S Hotkey or the SoundShuffle GKC, when you trigger a reshuffle (instead of using the built-in reshuffle option of the deck).
As Per Edit #2 I have the Hotkey for the deck also assigned to Ctrl+S. But it doesn’t actually work.
I might try the send to hidden deck approach. Hmmm can I do the send and return with one keystroke?
Shouldn’t this be easy? I would have thought people would want a shuffle sound for a deck shuffle long before now. It might be important that other players know that a player has shuffled a deck (though there is the report of course).
If I have understood your issue then I think it is caused because Vassal does not respect multiple use of a Hot Key. You can re-use the same Hot Key as many times as you wish but only one will result in an action (I guess the first that the Vassal Player encounters). I have found this, for example, where the same Hot Key was defined for two decks, two show/hide windows and others.
One workaround would involve defining different Hot Keys on the deck & the GKC and adding a Global Hotkey trait on your shuffle sound piece.
Global Hotkey trait on the Shuffle sound piece:
Listens for Ctrl+S from the GKC (which also makes the Sound, as now).
Sends the “doShuffle” Hot Key (or whatever Hot Key you decide to define on the deck).
If you are tied to Ctrl+S for the deck then change the GKC hotkey instead.
Incidentally, I have had to avoid Deck Properties due to maintenance issues with a module that has lots of pre-set scenarios (Refresh Counters does not update Deck Properties). So, I have used the card trait method that you eschew. It has worked fine for me performance-wise at a small cost in save file size. The advantage is that I can use the trigger directly. As I think you realise, with the same GKC and appropriate conditions, you could then send the shuffle command to the sound shuffle piece and the cards in the deck simulteneously. Also, I have found this method more robust against deck displacement and other Refresh Counter quirks. In short, I find it is more serviceable that using the deck property.
Hope this helps. Good luck!
What is the ‘card trait method’? Is this putting a PLAY SOUND trait on every card? My issue there was the Ctrl+s didn’t actually make it to the card and trigger the sound. I am not married to Ctrl+S. I just want a right click menu command on the deck to shuffle. How I get that I don’t care. The other issue that may affect implementation is there are more than one deck on the map so I have to have (essentially) a different hotkey for each deck (or only allow right click SHUFFLE with no key combination).