Border outline conditions

I’m trying the new border outline function.

I understand that we can have two conditions, and that those conditions are tied to a property when this property is true or non-zero.

Would it be possible to be able to check if a property has a certain value and not only true/non zero ?

I would like to use this new feature to show which division is in which army. To do this, I can use a global key command to toggle a property between 0 and 1 - that is already feasible - to decide to show or not the border outlines.

Then I would like a second condition to check if an “army” property has a certain value - if yes, show a red border outline, if not, show nothing.

And do this 5 times if I have 5 different armies.

I can’t do the second condition because it is not only true/non zero.

Can’t you define a Calculated Property as {army == 3} and use that CP in the trait?

Not working.

Army works because it recognizes that the Army property is non zero.

{Army==“Iere Armée”} does not, the expression is not recognized. It is exactly what I would like to do.

I got it to work. As a test, I hacked Washington’s War v2.1 (with Vassal 3.7.0-beta5) as follows:

I created a boolean Global Property called ShowBorder, initialized to false.

I added 3 new traits (Dynamic Property, Calculated Property and Border Outline) to an existing prototype called General.

Here are screen shots of those 4 traits:

To test, I manually set the ShowBorder GP to true using the console command “/prop set ShowBorder true”, then used the right-click Define Army menu command on one of the General counters to manually set Army to “lere Army”. The red border appeared when both of those two conditions were set.

At first I thought it wasn’t working, but then I realized that the red border is obscured while the General counter is selected.

Cheers,
Jim Hunter.

Correcting a typo in my previous post:

To test, I manually set the ShowBorder GP to true using the console command “/prop set ShowBorder true”, then used the right-click Define Army menu command on one of the General counters to manually set Army to “lere Armee”.

Cheers,
Jim.

It works, thanks !

I was trying to use the dynamic property directly into the border outline.

Your model works. However, it means I have to add as many calculated properties as there are armies. Might still be a good idea to accept comparisons here.

You may be able to get by with just a single CP, by defining it to check equality of the DP against a Marker value instead of a hardcoded string value. Each piece would need to have that Marker defined and set to its corresponding Army.

Cheers,
Jim Hunter.

Army attachment may be changed by the player ingame so I guess markers are out of the equation here