Vassal 3.6.12 changed behavior of Game Piece Inventory Window

It was recently discovered that after vassal engine 3.6.12 was released, the “Cards in Hand” window of the Washington’s War 2.0 module stopped working correctly. Specifically, it always reported a zero card count for both player hands when those hands actually held at least one card.

The “Cards in Hand” window was implemented as a Game Piece Inventory Window as follows:

The way this window behaved prior to 3.6.12 is that it reported a folder for each player hand that held at least one card, and the label for that folder included the hand’s card count, like this:


If a player hand was empty, its folder didn’t appear in the folder at all. That is the expected behavior.

Starting with 3.6.12, the window reported an explicit card count of zero for each player hand which actually held at least one card, like this:


The information displayed in the Cards In Hand window is defined by the Label for folders field of the GPIW trait; that field is supposed to contain a Message Format expression. The module design seems to expect $sum_countthis_yes$ to be resolved as the number of game pieces (Cards) within each folder (player hand) which include the property “countthis” with a value of “yes” (note that all Cards defined a Marker trait with countthis=“yes”). However, I could not find such a $sum_property_value$ syntax defined in the Reference Manual nor mentioned in the Forum.

I suspect that this window had been functioning correctly only by accident, up until something changed in vassal 3.6.12. Looking at the changes for that release, I think it may have been this bug fix which exposed the problem with the module:

  • 11462: Don’t +1 inventory sum if property isn’t even defined

I don’t require a fix, or even a confirmation; I’ve fixed the module by re-implementing that GPIW using documented methods (and released it as module v2.1). I am bringing this to your attention only on the remote chance that there is more to the situation, and that this may shed light on some other open issue that you are aware of.

Jim Hunter.


Missed this at the time, but yes that is correct.

In fact, I don’t think it’s relevant that the module example appears to be evaluating whether the property is set to “yes”… sum_THIS was just returning a count of pieces, regardless.

One solution is to replace the old sum_… with a reference to a property that does exist. In a simple case, sum_BasicName` will do.

If you really need to evaluate a property value, change to BeanShell and use an appropriate variant of the Sum() or Count() family of functions.

Just curious, what happens if you remove the &&countthis==“yes” from the Show only pieces matching these properties line? You may need to remove a parenthesis or two as well, but give that a try. I use that window for the same purpose in my game, and I don’t have that part in mine.