# Units that stack on top and

**URL:** <https://forum.vassalengine.org/t/units-that-stack-on-top-and/84883>\
**Category:** Module Design\
**Created:** [March 22, 2025, 11:40pm UTC](https://forum.vassalengine.org/t/units-that-stack-on-top-and/84883 "2025-03-22T23:40:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lorenzo](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/lorenzo/32/11120_2.png) [@Lorenzo](https://forum.vassalengine.org/u/Lorenzo)\
**Post date:** [March 22, 2025, 11:40pm UTC](https://forum.vassalengine.org/t/units-that-stack-on-top-and/84883/1 "2025-03-22T23:40:52Z")

</div>

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! 😃

---

<div class="post-metadata">

**Author:** ![marktb1961](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/marktb1961/32/231_2.png) [@marktb1961](https://forum.vassalengine.org/u/marktb1961)\
**Post date:** [March 23, 2025, 12:09pm UTC](https://forum.vassalengine.org/t/units-that-stack-on-top-and/84883/2 "2025-03-23T12:09:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Lorenzo](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/lorenzo/32/11120_2.png) [@Lorenzo](https://forum.vassalengine.org/u/Lorenzo)\
**Post date:** [March 23, 2025, 1:54pm UTC](https://forum.vassalengine.org/t/units-that-stack-on-top-and/84883/3 "2025-03-23T13:54:26Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![marktb1961](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/marktb1961/32/231_2.png) [@marktb1961](https://forum.vassalengine.org/u/marktb1961)\
**Post date:** [March 23, 2025, 2:24pm UTC](https://forum.vassalengine.org/t/units-that-stack-on-top-and/84883/4 "2025-03-23T14:24:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Korval](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Korval](https://forum.vassalengine.org/u/Korval)\
**Post date:** [March 23, 2025, 5:11pm UTC](https://forum.vassalengine.org/t/units-that-stack-on-top-and/84883/5 "2025-03-23T17:11:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Lorenzo](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/lorenzo/32/11120_2.png) [@Lorenzo](https://forum.vassalengine.org/u/Lorenzo)\
**Post date:** [March 23, 2025, 7:34pm UTC](https://forum.vassalengine.org/t/units-that-stack-on-top-and/84883/6 "2025-03-23T19:34:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Korval](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Korval](https://forum.vassalengine.org/u/Korval)\
**Post date:** [March 24, 2025, 12:47am UTC](https://forum.vassalengine.org/t/units-that-stack-on-top-and/84883/7 "2025-03-24T00:47:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Lorenzo](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/lorenzo/32/11120_2.png) [@Lorenzo](https://forum.vassalengine.org/u/Lorenzo)\
**Post date:** [March 24, 2025, 8:07am UTC](https://forum.vassalengine.org/t/units-that-stack-on-top-and/84883/8 "2025-03-24T08:07:08Z")

</div>

Great answers, thanks guys!

---

<div class="post-metadata">

**Author:** ![JoelCFC25](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/joelcfc25/32/2687_2.png) [@JoelCFC25](https://forum.vassalengine.org/u/JoelCFC25)\
**Post date:** [March 24, 2025, 3:18pm UTC](https://forum.vassalengine.org/t/units-that-stack-on-top-and/84883/9 "2025-03-24T15:18:24Z")

</div>

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.
