in Storm of Steel each player has a few dummy counters to be secretly added to his stacks in order to confuse the opponent. The opponent sees the top unit in each stack normally, but he can’t examine what is below until combat is declared.
Is there any feature in Vassal to prevent a player from peeking at his opponent’s stacks, short of turning all units hidden?
Dummy counters are a secondary element in SoS. The idea of forcing players to unmask the top counter and to mask those below everytime they manage a stack seems a bit extreme.
What I would need is an indipendent Vassal function, but I am afraid there is none, or a way to automatically mask/unmask pieces depending on where they are in the stack. However, that would probablty require programming skills.
Indeed. This was the party piece of the late George Hayward’s custom code for the series of OCS modules–it made the mouseover stack viewer show the info of only the top piece in a stack, and prevented opponents from digging through an opponent’s stack to see anything other than the top piece.
Position in a stack is a property, StackPos, as is StackSize, so masking and unmasking triggers could be applied automatically, without any programming skills.
OK, bear in mind I haven’t actually done this before, and I’m not going to break everything down into examples and screenshots, hopefully you can experiment yourself.
First you’ll want a key command applied to every move on the map, this is a field in the Map properties, I typically use “auto” or similar.
Then an appropriate Mask on the prototype for all the pieces you want this effect to apply to.
Then you’ll want a Trigger on the prototype for all the pieces you want this effect to apply to, triggered by “auto”. Since StackPos and StackSize are always 1 for non-stacked pieces, I guess two Triggers. One Trigger to apply when StackPos == StackSize and ObscuredToOthers is true, which will trigger the Mask flip to reveal the unit whenever it’s not stacked or is on top of a stack, or is moved onto the top of a stack. The second Trigger to apply with StackPos != StackSize and ObscuredToOthers is false, which will trigger the Mask flip to conceal the unit whenever it is in a stack and not the top piece. Make sure the Triggers are below the Mask in trait order so they can function even when a piece is Masked.
I haven’t given any consideration as to how this system could be abused by a cheat, because there’s no practical way to prevent cheating in Vassal when playing async. But for honest players or live players this should provide a solid effort-free way to get the effect you seem to be after.
Also, I suppose a piece moved onto a stack would stay face-up when another piece is moved on top of the stack, until the stack itself is moved. Perhaps another “auto” trigger then, to send a global key command (not “auto”) to all pieces at the same XY coordinates that also activates the Triggers mentioned above.