Create account / Log in

Global command to shuffle multiple Decks

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Global command to shuffle multiple Decks

Postby greenknight » September 20th, 2016, 8:39 am

I'm looking for a Global command to shuffle multiple Decks

Premises:

Each of up to 4 players has one [Player Hand], containing a plain white board [Map Boards], with a Damage Deck [Deck] and Discard Pile [Deck].

I only want the cards in the Damage Deck to be shuffled once, at game start. Or manually, if the deck runs out of cards and the discard pile needs to be shuffled back in.

The manual part is not a problem.

What I can't get to work is a global key command to trigger the reshuffling. I've tried with Deck Global Key Commands, and Module level Global Key Commands. Nothing works, as I can't get the Deck to trigger the shuffle.

Is it not possible, or am I doing it wrong?
greenknight
 
Posts: 49
Joined: November 18th, 2015, 9:46 pm

Re: Global command to shuffle multiple Decks

Postby Nelud » September 20th, 2016, 10:56 pm

Reshuffe hotkey is not a "Global Key Command", but "Global Hotkey".
Nelud
 
Posts: 26
Joined: September 28th, 2008, 5:20 am
Location: Saratov, Russia

Re: Global command to shuffle multiple Decks

Postby greenknight » September 21st, 2016, 7:09 am

OK, didn't stop that one, but that explains it.

So basically it's impossible to make a button to shuffle a deck, but you can do it using a hotkey?

Sounds a bit odd.
greenknight
 
Posts: 49
Joined: November 18th, 2015, 9:46 pm

Re: Global command to shuffle multiple Decks

Postby Nelud » September 21st, 2016, 8:28 am

Doesn't Action Button do what you want?
Nelud
 
Posts: 26
Joined: September 28th, 2008, 5:20 am
Location: Saratov, Russia

Re: Global command to shuffle multiple Decks

Postby greenknight » September 21st, 2016, 8:35 am

I dunno...never tried it (still very much learning new features every time I try to do something). Let me give it a try!
greenknight
 
Posts: 49
Joined: November 18th, 2015, 9:46 pm

Re: Global command to shuffle multiple Decks

Postby greenknight » September 21st, 2016, 8:40 am

Yup, that did the trick. Never used that function before. Thanks!
greenknight
 
Posts: 49
Joined: November 18th, 2015, 9:46 pm

Re: Global command to shuffle multiple Decks

Postby Nelud » September 21st, 2016, 8:45 am

Ah! Sorry. If you want do it by Startup Global Key Command then do following. Make invisible piece, assign to it Global Hotkey trait, which will fire reshuffle. Then make Sturtup Global Key Command send to that piece a command, which will fire Global Hotkey, wich will fire reshuffle. )
Nelud
 
Posts: 26
Joined: September 28th, 2008, 5:20 am
Location: Saratov, Russia

Re: Global command to shuffle multiple Decks

Postby greenknight » September 21st, 2016, 9:03 am

That's even better!

I'll implement it right away.
greenknight
 
Posts: 49
Joined: November 18th, 2015, 9:46 pm

Re: Global command to shuffle multiple Decks

Postby greenknight » September 22nd, 2016, 12:23 pm

It worked, sort of:

- I made an invisible piece with 4 Global Hotkey traits (since there are 4 decks to shuffle)
- A made a Startup Global Key Command that sent a command to the invisible piece

All 4 decks gets shuffled, no problem.

However, when a deck is shuffled, it generates a report. This is as intended.

BUT

When I start a new game, then close it, then start another game, it looks like the startup command keeps triggering new shuffles in the old damage decks.

Here is an example after I've started 3 new games. If I start a 4th, I get 4 lines per message.

* Green Knight shuffled Damage Deck 1
* Green Knight shuffled Damage Deck 1
* Green Knight shuffled Damage Deck 1
* Green Knight shuffled Damage Deck 2
* Green Knight shuffled Damage Deck 2
* Green Knight shuffled Damage Deck 2
* Green Knight shuffled Damage Deck 3
* Green Knight shuffled Damage Deck 3
* Green Knight shuffled Damage Deck 3
* Green Knight shuffled Damage Deck 4
* Green Knight shuffled Damage Deck 4
* Green Knight shuffled Damage Deck 4

Since the reports are triggered by hotkey, not key command, I can't suppress individual reports.

I tried setting a global property that changes when the decks are shuffled, but it looks like this property is discard when I close a game and start a new one.

Or I'm just doing it wrong.

Any suggestions?
greenknight
 
Posts: 49
Joined: November 18th, 2015, 9:46 pm

Re: Global command to shuffle multiple Decks

Postby greenknight » September 22nd, 2016, 12:27 pm

Btw

The same thing happened when I used an Action button to shuffle the decks. For each instance of new game I get one report.
greenknight
 
Posts: 49
Joined: November 18th, 2015, 9:46 pm

Re: Global command to shuffle multiple Decks

Postby greenknight » September 22nd, 2016, 4:27 pm

I've tried even more variations over this theme, and the result is always the same:

If I start multiple games, I get multiples of the same message.
greenknight
 
Posts: 49
Joined: November 18th, 2015, 9:46 pm

Re: Global command to shuffle multiple Decks

Postby greenknight » September 23rd, 2016, 8:57 am

Strangely, if I manually press the relevant hotkeys, I do not get the same duplication.
greenknight
 
Posts: 49
Joined: November 18th, 2015, 9:46 pm


Return to Module Design

Who is online

Users browsing this forum: No registered users and 1 guest