global key command in player hand

Hey,
I have a problem. when i put a global key command button which make sent to a location a card, it doesnt work when the card is on the main board but it work great when the card is already in the hand (the button place the card to the exact location i specified).
Its not a global key problem cause when i put this command in the main board it work great even if the card is on the main board.
WHY??? 2 hours of trying…
thx
rem

I’m not sure I understand the problem exactly, but make sure the following option on your global key command button is UNchecked:
Apply to counters on this map only?

-Seth

i think your understand what i was saying… but i didnt find any option like you said (apply to counters on this map only). where is it???
thx

just a thing, i assign to all my card in the draw pile a send to location command (ctrl +A hotkeys) after that i put a global key command button in the hand of player 1 (ctrl+ a) hotkeys. i retry it every time…i didnt see apply to counters on this map only

It applies to counter / token / cards not decks. For that you need to use a
Deck GKC

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of bonobo
Sent: Wednesday, January 25, 2012 1:51 AM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Re: global key command in player hand

just a thing, i assign to all my card in the draw pile a send to location
command (ctrl +A hotkeys) after that i put a global key command button in
the hand of player 1 (ctrl+ a) hotkeys. i retry it every time…i didnt see
apply to counters on this map only


Read this topic online here:
https://forum.vassalengine.org/t/global-key-command-in-player-hand/4622/4

That is a feature of 3.2 that cant be found in 3.1. Most users are not using
development builds. Best to use same when answering to avoid confusion unless you mean the Within a deck, apply to selection box? THis would work also as long as you have it set to “All pieces”

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of irishwulf
Sent: Wednesday, January 25, 2012 1:29 AM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Re: global key command in player hand

I’m not sure I understand the problem exactly, but make sure the following
option on your global key command button is UNchecked:
Apply to counters on this map only?

-Seth


Read this topic online here:
https://forum.vassalengine.org/t/global-key-command-in-player-hand/4622/2

ok, sorry for the confusion, i can resume what i want:
-a button in the player hand made to draw one card from a deck of the main board.

but if you say that is not possible on 3.1 i hope that the 3.2 will come shortly :slight_smile: (you know when?)
Thanks a lot for the time you according to me :slight_smile:

Knowing exactly how you are doing it now, it is possible.

If you want to draw a player handcard from the main board using a button GKC in the player hand you must specify the correct property so that the GKC knows where to look otherwise it will only work in its current map (which in this case is the player hand)

So what you will need is something like (replace the variables after “=” to match your terminology)

CurrentMap = NameOfYourMapWithDeck && DeckName = NameOfYourDeck

My apologies, I had forgotten that the option was introduced in 3.2. I have reproduced this problem in 3.1.17, and specifying the CurrentMap property doesn’t seem to fix it - it doesn’t seem that a toolbar GKC can reference counters on other maps at all. However, you can do the following:

  1. Make an at-start stack in your player hand with one piece, no image, to get the cards for you. I call mine CardRetriever.
  2. Give CardRetriever a GKC trait to do what you wanted your button to do, i.e. send CTRL-A to 1 card with matching properties: DeckName = yourDeck. You don’t need to specify CurrentMap = Main Map, but you can and it’s probably a good idea. The ‘Keyboard Command’ can be anything you like, even CTRL-A.
  3. Now redirect your GKC button to trigger the GKC trait on CardRetriever; so use matching properties: BasicName = CardRetriever and have the GKC match the ‘Keyboard Command’ you picked for the GKC trait on that piece.

-Seth

Whoa … are you saying that the matching expression has an implicit “CurrentMap = thisMap” constraint, but the parser looks to see if you include your own “CurrentMap =” clause and then overrides the implicit constraint? That sounds like a highly irregular way to apply conditions.

If I’m reading you correctly, you are saying “Type = X && CurrentMap = MyMap” matches all X-components on MyMap, but “Type = X” by itself matches all X-components on the current map. I think most of us would expect the latter to match X-components on all maps due to the obvious lack of any CurrentMap condition.

Am I getting this wrong?

Wouldn’t CardRetriever have to have a different name for each player’s hand? And possibly a different keystroke for each player?

Man, I must really be out of phase with this whole topic 'cause these answers are confusing me a lot.

Nope, you are reading it correctly as it applies to Global Key Command piece traits. A Global Key Command elsewhere in the module tree also default limits it’s search to the the “container” it resides in (i.e a toolbar GKC at Map level will search only within that Map unless you specifically tell it differently , whereas a toolbar GKC at the Module level will search everywhere because it does not belong to any Map / Zone etc…).

Actually, I do this all the time, and it can have the same name and keystroke for every player window. Usually I am very careful about keeping player side references abstract so that I can just copy/paste the player 1 window(s) at the very end of development. There are two ways I’ve gone about this:
(1) If your player windows’ names include the player side, you can have a Send To Location trait reference the playerSide global property in the Map name. You can also specify a zone, region, or coordinates at this point, but perhaps the Player Hand container automatically arranges the pieces for you.
(2) If the player windows aren’t named after the player sides, or if you need more flexibility, you can have the CardRetriever set a property, say, ‘Summoning’, and have your Send To Location use the ‘piece with matching properties’ (or whatever it’s called) with Summoning = true.
Note that Return to Deck must have its deck either chosen by the player at runtime, or specified statically at build time. It is therefore evil in my opinion, and can usually if not always be replaced by Send To Location.

-Seth

My own experimentation suggests that the GKC piece trait by default broadcasts to all pieces, even those on other maps, unless otherwise constrained. Is that not how it works?

-Seth

Um no - in fact, as my little demo here will show you, it actually generates a bug (which it seems has gone unnoticed by us until I built this) - it used to be that the GKC on the piece would just do nothing and the piece on the other map remained unaffected. If you fill in the PME though using CurrentMap = whatever, then you will affect the piece on the other map

With all due respect, I believe the bug in the posted module is an infinite loop as the GKC calls itself on the triggering piece. Changing the GKC command on piece ‘GKC’ to anything other than CTRL-F, or adding a PME ‘BasicName = Flip me’, appears to work, at least in 3.1.17.

-Seth

Yep you are right

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of irishwulf
Sent: Wednesday, February 01, 2012 1:53 AM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Re: global key command in player hand

“Tim M” wrote:

“irishwulf” wrote:

My own experimentation suggests that the GKC piece trait by
default broadcasts to all pieces, even those on other maps, unless
otherwise constrained. Is that not how it works?

-Seth

Um no - in fact, as my little demo here will show you, it actually
generates a bug (which it seems has gone unnoticed by us until I built
this) - it used to be that the GKC on the piece would just do nothing
and the piece on the other map remained unaffected. If you fill in the
PME though using CurrentMap = whatever, then you will affect the
piece on the other map

With all due respect, I believe the bug in the posted module is an infinite
loop as the GKC calls itself on the triggering piece. Changing the GKC
command on piece ‘GKC’ to anything other than CTRL-F, or adding a PME
‘BasicName = Flip me’, appears to work, at least in 3.1.17.

-Seth


Read this topic online here: