Units that stack on top and

Hi, I would like to know how I can make a piece that stacks on top of other pieces AND automatically hides all stacking lines in the hex it is in.

In the module I am working on (I am remaking my and Dori Illiano’s old The cossacks are coming ADC2 gameset), Headquarter units hide friendly units in the same hex. In the cardboard game, units stacked with a friendly HQ are moved to an off-map display that remains hidden from the opponent’s view. In order to reproduce this mechanic in a fast and efficient way, I would like to make headquarters that stack on top of other units and hide any stacking line in the hex. This way, the opponent won’t be able to see if there are units other than the HQ in the hex.

Help appreciated! :smiley:

An opaque HQ piece sized to cover the entire hex would do what you as, if that piece was in a Game Piece Layer above that of the other pieces.

To allow a player to view what’s underneath, you could explore the Mouseover component or the Layer trait with a view to using the PlayerSide property to restrict that to the owning player.

Thanks Mark.

However, this means that HQ units shall be made a lot larger than other game pieces, right? Is there no way to solve the problem with normal-sized counters?

Maybe the Visible trait, that can toggle counters to be only visible to the owning player. You might combine this with the action of placing the HQ piece. I am not sure if it will work to have the HQ piece stacked on top of the others, it might need to be an unstackable piece.

The “easy” way to do this is to NOT try to replicate exactly how the F2F game works. Vassal already implements a “hide” functionality. 1) Make sure all of the pieces have the ability to be hidden.
2) Then when playing and you move a HQ unit, hide/unhide the relevant units and put the HQ unit on top of the stack.

2 Likes

You mean using the invisibility trait to hide units stacked with HQs? It seems an excellent solution.

1 Like

The Invisible trait makes the counters disappear completely. Alternatively, you can create a “blank” side for counters, which shows there is “something” there, but not it’s identity.

In a face-to-face game, even if you have a “HQ” unit on top of the stack (hiding the values), a player could estimate how many units are there by the height of the stack.

The way to do this in Vassal is with the “MASK” trait and define a blank back for the counters.

Assuming you are using a prototype for your counters, this would be a one-line addition. Easy-Peasy.

Great answers, thanks guys!

A desire similar to this was the origin of the late George Hayward’s bespoke programming for the series of OCS modules. Players were entitled to see the size of an enemy stack, but not any of its contents beyond the top unit. VASSAL can’t do that out of the box.