Card Count Button

Howdy Gents,

I’ve a game designer asking me to help him by inserting into his game’s module, he designs only the board games, a button one can tap that will give players a count of the number of cards being held in the hands of his opponents. He doesn’t want the game to reveal what the cards are, only a count.

I’ve been scratching my balding head, and I don’t have that much hair to lose, trying to figure this one out.

Any clues guys?


Is there a reason a button needs to be pushed? …or would a display on the game board showing a running count of the number of cards in everyone’s hand work?

The latter would be easier but the former is certainly doable.

Good question. I’m being asked to fill in for a vassal designer who I’m given to believe has died, so I’m a little in the dark as to how the game works. I’ve repaired a few things that didn’t work. I’ve added some new cards and counters and a new modified map. But this card button thing is interesting. I’ll ask that question of the game designer and get back to you.

Ok, the game designer says he wants a single button accessible to all players that reveals the number of cards in all players hands.

For instance the button displays the following Info:

Player #1: 2 Cards
Player #2: 4 Cards
Player #3: 5 Cards

There are only 3 players.
Western Alliance
The Axis Alliance (identified only as the Germans)
The Russians (which should be identified as the Soviets)

That’s simple enough but it will probably be easier to provide a sample than explain how to do it.

I’ll make a sample sometime today. Might already have something similar in my sample locker.

Thanks Very Much, I appreciate it.

Here you go.

The attached package contains what I believe is similar to what you want. The zip package contains the sample vmod and notes that explains what I did.

Hope that helps.

Got it, time now to study what you’ve done.

WOW that is far more than I can understand. i opened that thing up and didn’t understand a thing.

The way I do this is from a menu calling an inventory. Game Piece Inventory is a preset tool working fine with cards :
Show only pieces matching these properties: {type==“card” && map==“hand”} (each of the potential 5 players have 3 windows : 2 are private, 1 is public … only the private hand is named “hand”, as “black hand”, “blue hand” …
Sort and Group by Properties : CurrentMap
Label for folders : $CurrentMap$ : $sum_Cardcount$ card(s) ($sum_Cardcound$ is preset function, Cardcount is a trait for each card, with a weight of 1 …)
Show only folders : unchecked
Label for pieces : empty
Sort ? unchecked
Label for sort: $PieceName$
everything unchecked below…

The trick is in using Label for folders without showing the cards name.
For this method, as well as from DrNostromo, there is no automatic refresh : either clic on DrN button, or refresh the inventory manualy.

I like the idea of Game Piece Inventory, as you can set extra options if you want to see the piece names … maybe at the end of the game, after all resolutions, or from some options during specific times of the game ?

Hey Doc,

There’s apparently another problem that’s beyond my technical expertise. Has to do with the absence of the Observer player side and masking beginning counters and cards when setting up the original vsav games as pre-defined scenarios. At least I think it does. It’s had me scratching my head for a couple of days and I don’t have that much hair to spare. Could you contact me or Serge Bettencourt so we can beg your indulgence?


Observer is not a defined player side–it is the state of not occupying a player side at all. It doesn’t need to be configured to exist, it’s there by default.

What he said.

As far as the masking thing, I downloaded the mod and I’ll send you guys an E-mail on determining exactly what you want.

I thought that too about the Observer side, which ought to have access to everything so you can set up scenarios. But for some reason it went wrong. Whatever it was, went wrong before they came to me for help. I built the meat of the module, but there was always that nagging problem that I could never understand. “Why was nothing available for the Observer side that WAS available to the Solitaire side”. Never figured that out.

Thanks for helping,

Hard to say for sure without a complete picture of precisely what the problem is, but between this and talk of cards and masking above, perhaps this might be useful…

If someone (before your involvement) was creating predefined setups and doing it while occupying the “Solitaire” player side, there are some potential issues. Whatever player side draws cards off a deck and/or masks them is considered their owner. Depending on the module’s Global Options setting for “Allow non-owners to unmask pieces”, it’s possible that taking certain actions with cards and masking while occupying the Solitaire player side–even if the user abandoned that side and took observer status before saving–could render certain things unavailable to other player sides later on.

Doc came up with the right answer to the problem. It was this:

Whenever you are testing a module or creating pre-defined setups, you should do so without a username & password. The way to do this is simple enough …it’s just one of those tricks you never hear about. When you start a new game, it asks you for a username and password. Just click “Cancel”. This will take you to the game as an observer. You can then freely change sides and set the mod up anyway you like. If it’s a pre-defined setup, switch to observer before saving and everything should work.

 In Serge's case, you don't get to pick sides because it probably recognizes you as already having a side through the use of a username and password. In this case, open the mod and got to

File → Preferences → Personal tab

and delete your username and password. Then close down and restart the mod. This should force the mod to offer you a player side because it’s no longer locked into one.

This was something I had heard about, but had no direct education into “how” to do it. Learn something new every day.

You’re close in a couple of respects. For creating pre-defined setups, it’s not accurate to say you have to delete your password before starting. Simply resigning from any currently occupied player side and taking the “observer” role BEFORE saving the file is sufficient.

Also, the username chosen for a given module has no bearing whatsoever on locking to a player side. Only the password matters.

Hi there. First time here. I hope not breaking anything with this first post. :slight_smile:
I’d love to hear how “to display running counts of the number of cards in everyone’s hand on the game board”. I’ve just finished the first version of a card game with four players and two sides (north-soth vs west-east). Every player can only see his/her cards but it is important to know how many cards are left in every other players hands.

Thanks in advance,

Hi rgarciap,

The quickie way to do running card counts is by adding a “Game Piece Inventory Window” to your module (in the editor, right click on the master module entry at the top and it will be an option to add). And then you can use the show-only-pieces-matching-expression to filter the things you want to show. If you check “show only folders” then it won’t show what the cards actually are, only the count.


Thanks Brian!. I’ll give it a try.