You will need to be able to identify the ship counters by Side - e.g. with a Marker trait, or maybe in the name of the piece.
If you have got such a side id, you can then check the PlayerSide in the Text Label. For example, if you have a Marker called Side that contains the name of the Side owning the counter, this Text label will only display to the Player on that Side.
{PlayerSide == Side ? localHull/10 : ""}
If your module has a moderator or solitaire side then you may need something like this, allowing whatever those PlayerSide name are: {PlayerSide == Side || PlayerSide == "Solitaire" ? localHull/10 : ""}
This suggestion takes advantage of the fact that the Label text field will accept Beanshell, even though it lacks an Expression Builder.
Use Calculated Properties sparingly, as they have performance impacts. If you just want to assign a text string as a property of a piece and it won’t change, the Marker trait is ideal.
Restrict Commands is to conditionally hide/block the ability to execute a key command, not conditionally display the contents of a Text Label. In this instance you have a menu command (hideHull) assigned to what would be the feature that lets you change the content of a Text Label, but no key command assigned, so that won’t currently work. Your Restrict Commands has no key commands listed to be hidden anyway, so it’s non-functional as well. If you set a key command on the Text Label and put that same key command as the thing to be hidden by the Restrict Commands trait, all you’d accomplish is block one player from being able to change what the contents of the Text Label shows, not display it to one player but hide it from the other.
Your advice was perfect. Thank you.
It took some fiddling but this is what I ended up with.
In the text label for the localHull I ended up with
{PlayerSide != “Entente” ? localHull+“/10” : “”}
Since there are Solo, Umpire, Central Powers, and Entente I just disallowed the enemy side to allow the others
I also restricted the commands for the enemy player so now one side, Solo, and Umpire can interact with the units but only the enemy cannot nor see the hull values.
A library of sample modules that demonstrate this sort of thing would go a long way to reduce the learning curve. Contributions could be made by designers and stored here online in the Modules section. I have found that a sample Module makes things so much clearer than written explanations and less time wasted for all. Just my 2c
What you guys just said is exactly what I was thinking. This concept here is something I may use and so I was going to ask what game this is so I can download and explore the design to learn from it.
Hey Lebatron. It is for Avalanche Press Great War at Sea: Jutland 2e. But they are only available to owners of the physical game (their IP so if I want to do the modules, I have to respect that)(Although I am trying to get them to let me release a cut down version of Coral Sea so that I can show this off and get people started on the Vassal Modules and maybe they buy the physical game. )
I don’t get out much, to see many modules, but these are great. we have (old style) Midway, Coral Sea, South Pacific (Solomon Islands Campaign), Java Sea, Eastern Fleet (Ceylon strike in early 1942), Bismarck and Russo Japanese War.
New style we have Jutland 2e (and extensions for North Sea 1914 and Dogger Bank 1915), and Remember the Maine.