Text Label property filter?


I have a Text Label on a game piece but I only want the label to display if they unit has suffered casualities - when the unit is at full strength I don’t want the label.

I tried to set the “Label text” to: {Damage==0?’’:CurrentStrength} but VASSAL gave me a bizarre infinite recursion error…

Any thoughts?

Try {Damage==0?"":CurrentStrength} (with double-quotes, not singles) instead.

Yup, that’d be the problem. It works but I’d still like to know a way to NOT display the label at all (this solution just displays a blank label)

What’s the difference between no label and a blank label?

Hey, sorry, haven’t been able to follow online stuff with courses starting.

Adding the blank label to the counter seems to have consequences to the counters bounding-box as I’m position the label off to the side. More than that, it’s about wanting a finer-grained level of control to be able to turn traits on and off based on other traits.

Not the usage it was really intended for, but you could probably use the Non-Rectangular trait to limit the bounding box to the actual image.

Thanks, but then I get into trouble when the text label has useful information - the non-rectangular would cut it off…