Vassal 3.5.0 and Fast Match problems in GKCs

First, thanks to the develops for the “view” overhaul. I appreciate it.

I have 2 problems editing global key commands–specifically with the new Pre-select (Fast Match) options.

Problem 1. I created a map-level global key command that sends a key (string) to a piece in the same map. The piece has a marker property: type == cashHandler. The GKC sends “add10” (the global command) with matching expression { type == “cashHandler”} when you press the appropriate toolbar button.

I decided to set up the map-level GKC with Fast Match. I checked off “property” and set type equal to cashHandler. All fine. I saved and tested the module. All good. But when I re-edit the GKC, I see that vassal has erased all the Fast Match fields. No property and no property test. I find it also erases the location fields too. I’m guessing it sent the command to all pieces, and it worked because only the cashHandler piece understood what “add10” meant. This erasure does not happen at piece-level GKCs, only those defined at the map level. The only way I could get the property test to stick is to put it instead in “additional matching expression.”

Problem 2. In each player window, I have an “assistant” piece that when you right-click it, it gets just about anything you need. One option is to get 5 orange pieces from a deck that contains pieces of different colors. Each piece in the deck has a marker that identifies its color (e.g. color = “orange”). In this case, I set up the GKC so I got a fixed number of pieces from the deck (5). The property test looks like this: {DeckName == “cowboys” && color == “orange”}.

Again, I decided to set up a piece-level GKC trait with Fast Match. I checked location, chose deck, and specified “cowboys.” I also checked “by property” and specified color equal to orange. And within a deck I set it to fixed and 5. When I ran it, it ignored my “5” request and sent me ALL orange pieces in the deck. I felt like Lucille Ball boxing cakes coming down a conveyor belt. It did not erase the Fast Match fields in this case. I was able to get it to work properly when I transferred the check to “additional matching expression.”

Edit: I forgot to add one important note. The “orange” case does work if the fixed count is 1. It does not work, in my case, for 3, 4, or 5.

Complicated! Do you have a little samply-testy module you could upload to show us reproducing these dealies?

I will work on it and get back to you.

Brian, I sent you a private message with a test module. While making the test vmod, I encountered two more problems. Summarizing the first two followed by the new two:

  1. If I create a map-level GKC and use Fast Match, the fast-match fields vanish. I fill in “by location” and “by property” (both or one only, either one), save the module, and exit. I edit again. All the fast match fields will be empty.

  2. I want to draw 3 black cards off a deck of mixed colors. If I create a piece-level GKC with fast match “by location” to be the deck name and property == “black”, and then I say “fixed number of cards” == 3, it draws ALL black cards from the deck. It works for 1 card but not for more than one. It always draws them all.

  3. (new) I want to edit all cards contained in a deck using the deck-level command to do it. If I add any trait to the cards, vassal will crash (90% of the time), and any inserted traits will have garbage in their fields. The fields look like they contain random fragments from the buildfile.

  4. (new) In a map, I create a multi-action button. I add menu entries “one”, “two”, and “three”. If I hit OK and then later return, then the last menu entry (“three” in this case) will have been dropped. To get around this, I must add a 4th blank line so it can be dropped instead.

Confirming we’ve got these and are looking at them.

Snapshot build 746b66d47 that should fix all four problems is available here:

vassalengine.org/~uckelman/tmp/