I need some help. In my module players can take a varying number of cards from a deck from 1 to 9 in to the players hand. I have a ‘Deck Global Key Command’ for each of these options and most of the time this works fine however occasionally you get less cards then you requested, for example you are after 9 and get 7? There are plenty of cards in the deck.
I have no idea why this happens? Any thoughts would be appreciated.
Hi,
I do know of one reason. This may or may not apply to you.
There is a bug in Vassal if you use Global Key command to affect a Fixed number of pieces in a Deck AND specify Matching Properties to check which cards to effect.
Let’s say you ask for X pieces to be affected by the Global Key Command.
The correct process would be to keep applying the Global Key Command until X pieces have been found that match the filter and had the Global Key Command applied.
What Vassal does is to keep applying the Global Key Command until X pieces have been checked to see whether or not they match the filter. If any of those pieces do not match the filter, then the total number of pieces affected by the Global Key Command will be less than X.
I found this problem recently and have a fix for it, but I am concerned that some modules may be depending on this ‘feature’ and may break if I fix it.
Possibly the way to fix it is probably to add a new option to the various Global Key Commands to force the new behaviour that would default false. All existing modules would continue to work in the same way. Not sure what you would call this option.
'Regards,
Brent.
Thanks Brett but I’m not applying any filters to the GKC. I have attached one of the GCK’s.
It has always worked when I am testing it just on my own and in the actual game everyone is drawing cards at the same time so could it be something to do with that?