Question on Text Label trait

Hi all,

I have the following situation.

I have a single piece that has the traits:
Basic Piece
Dynamic Property - Control (numeric, 0, 1 or 2 only)
Dynamic Property - Influence (numeric, 0 to 100)
Layer - Background (3 levels that follow $Control$, 0 is no background image, 1 is light color background, 2 is dark color background)
Text Label - $Influence$

What I need to do is have the Text Label display the value of $Influence$ depending on the $Control$.
If Control = 0, do not display anything.
If Control = 1, display $Influence$ with black font.
If Control = 2, display $Influence$ with white font.

So i think I need some sort of Conditional Text Label ? Is that even possible ?

Or any other idea is appreciated.

The way I handled this in my mod was to use PNGs on layers. but i only had to deal with a range of 1 to 10.

You can set up 2 text labels:
one will display a dynamic property $inf1$ (“influence when control is 1”) with black font
one will display a dynamic property $inf2$ (“influence when control is 2”) with white font

Let’s say that the “control” value is set to 0, 1, 2 thanks to ctrl+0, ctrl+1 and ctrl+2.
You set up “inf1” with 3 “set value directly” commands : ctrl+1 => $influence$, ctrl+0 & ctrl+2 => keep blank
Same for “inf2” : ctrl+2 => $influence$, ctrl+0 & ctrl+1 => keep blank

To manage the “influence” value changes, you set up 2 triggers, watching for the keystrokes which modify “influence”:
one “trigger when properties match” control=1 ; it performs ctrl+1
one “trigger when properties match” control=2 ; it performs ctrl+2

In v3.2.3 you should be able to use calculated properties with “If” function instead of dynamic properties and triggers (right now this makes Vassal crash), but as far as I know you need 2 different text labels to get 2 different text colors anyway.

Works like a charm.
Thank you very much for you reply.