# Mask whole stack/number of counters

**URL:** <https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564>\
**Category:** Module Design\
**Created:** [October 5, 2026, 8:50pm UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564 "2026-10-05T20:50:24Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![craig83](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/c/fbc32d/32.png) [@craig83](https://forum.vassalengine.org/u/craig83)\
**Post date:** [October 5, 2026, 8:50pm UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/1 "2026-10-05T20:50:24Z")

</div>

Hello,

Not sure the best place to post something like this but, working on a Vassal Mod and I’m wondering if there’s any way to Mask a whole stack of units, so the opponent can no longer see how many units are in the stack? Just a single blank counter etc.

I don’t want to remove stacking across the whole map.

Has anyone seen this implemented before?

Thanks!

---

<div class="post-metadata">

**Author:** ![jrwatts](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/jrwatts/32/6972_2.png) [@jrwatts](https://forum.vassalengine.org/u/jrwatts)\
**Post date:** [October 5, 2026, 9:02pm UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/2 "2026-10-05T21:02:27Z")

</div>

One possibility would be to move the stack to a `Private Window` only accessible to the side who owns the counters, and replace it with a dummy counter.

---

<div class="post-metadata">

**Author:** ![craig83](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/c/fbc32d/32.png) [@craig83](https://forum.vassalengine.org/u/craig83)\
**Post date:** [October 5, 2026, 9:17pm UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/3 "2026-10-05T21:17:40Z")

</div>

Thanks for the quick reply. Yes, that’s the work around I’m using at the moment. Only annoying thing with that, When I click a stack of two or more counters, and trigger the action, it’s placing a marker per piece, which is annoying. Know any way to send the stack to the private window, and only have one marker drop on the main map?

---

<div class="post-metadata">

**Author:** ![cholmcc](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cholmcc/32/8319_2.png) [@cholmcc](https://forum.vassalengine.org/u/cholmcc)\
**Post date:** [October 5, 2026, 11:21pm UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/4 "2026-10-05T23:21:09Z")

</div>

> [@craig83](#):
>
> Know any way to send the stack to the private window, and only have one marker drop on the main map?

It can be done, but a tad more complicated.

1. When you select the pieces (whether in a stack or not), and you execute - say - `Hide by Moving to Private Window`, then that command is executed in turn for each selected piece.
2. The command arrives at the _one_ of the selected pieces.
3. That piece should send a Global Hotkey - say `MarkSelected` - but this should be done under the condition that `Selected` is true - for example via a Trigger Action trait.
4. The Hotkey then sends a command to all `Selected` pieces - say `MarkForMoveToPrivateWindow`
5. That command then marks the selected pieces with some attribute - say `ToMoveToPrivateWindow`.
6. The control goes back piece, which
  - Places a marker in its location
  - then executes the `Deselect` trait.

7. It then issues a Global Hotkey - say `MoveMarkedToPrivateWindow`
8. The Global Hotkey then sends a command, but only to those pieces with the mark - say `MarkForMoveToPrivateWindow`. The command could be `MoveToPrivateWindow`.
9. The command is seen by all piece with `MarkForMoveToPrivateWindow`
10. The pieces then moves themselves to the private window.
11. Since there are no selected pieces, it means the rest of the pieces do not see the initial - `Hide by Moving to Private Window`.
12. Pieces moved to the private window should have their `MarkForMoveToPrivateWindow` property reset.

Yours,  
_Christian_

---

<div class="post-metadata">

**Author:** ![craig83](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/c/fbc32d/32.png) [@craig83](https://forum.vassalengine.org/u/craig83)\
**Post date:** [October 6, 2026, 1:32am UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/5 "2026-10-06T01:32:16Z")

</div>

Thanks so much for sending a very detail reply there, I might be a little out of my depth with this though, Not so familiar with global hotkeys, or marking attributes.

I tried to go through these steps but not quite understanding.

Perhaps Its not such a big deal to manually move the pieces between the windows. lol

---

<div class="post-metadata">

**Author:** ![shilinski](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/shilinski/32/6980_2.png) [@shilinski](https://forum.vassalengine.org/u/shilinski)\
**Post date:** [October 6, 2026, 4:30am UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/6 "2026-10-06T04:30:28Z")

</div>

I have a crazy idea. In each map window, there’s an element related to stacking. If you open it up, you can set the “overlap” distance between pieces both expanded and unexpanded. What if you set these to zero? Would that make it look like there was only one piece in a stack? Just a thought.

---

<div class="post-metadata">

**Author:** ![cholmcc](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cholmcc/32/8319_2.png) [@cholmcc](https://forum.vassalengine.org/u/cholmcc)\
**Post date:** [October 6, 2026, 12:47pm UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/7 "2026-10-06T12:47:05Z")

</div>

> [@shilinski](#):
>
> … “overlap” distance between pieces both expanded and unexpanded. What if you set these to zero?

@craig83 _explicitly_ said …

> [@craig83](#):
>
> I don’t want to remove stacking across the whole map.

… so I guess it’s not an option.

> [@craig83](#):
>
> Not so familiar with global hotkeys, or marking attributes.

- [Global Key Commands](https://vassalengine.org/doc/latest/ReferenceManual/GlobalKeyCommands.html#top) - what I termed above as `Global Hotkey` are `GlobalKeyCommand` (GKC) attached to a module or map - i.e., commands that _can_ be shown in the toolbar, or can be excuted by all pieces. A piece can initiate a module or map GKC via the trait [Global Hotkey](https://vassalengine.org/doc/latest/ReferenceManual/GlobalHotKey.html#top)
- [Global Hotkey](https://vassalengine.org/doc/latest/ReferenceManual/GlobalHotKey.html#top) trait defines a _constant_ property on a piece. A [Dynamic Property](https://vassalengine.org/doc/latest/ReferenceManual/DynamicProperty.html#top) trait defines a mutable property on a piece.

Thus, you define on your map

- [Global Key Commands](https://vassalengine.org/doc/latest/ReferenceManual/GlobalKeyCommands.html#top)
  - Button text: `""` (empty)
  - Tooltip: `""` (empty)
  - Button icon: `""` (empty)
  - Hotkey: `MarkSelected`
  - Global hotkey: `MarkForMoveToPrivateWindow`
  - Preselect:
    - By Property: `true`
    - Property name: `Selected`
    - Comparison: `==`
    - Value: `true`

  - Apply to counters on this map only: `true`

- [Global Key Commands](https://vassalengine.org/doc/latest/ReferenceManual/GlobalKeyCommands.html#top)
  - Button text: `""` (empty)
  - Tooltip: `""` (empty)
  - Button icon: `""` (empty)
  - Hotkey: `MoveMarkedToPrivateWindow`
  - Global hotkey: `MoveToPrivateWindow`
  - Preselect:
    - By Property: `true`
    - Property name: `ToMoveToPrivateWindow `
    - Comparison: `==`
    - Value: `true`

  - Apply to counters on this map only: `true`

Define on your piece(s) or, preferably, in a Prototype

- [Trigger Action](https://vassalengine.org/doc/latest/ReferenceManual/TriggerAction.html#top)
  - Command: `Hide by Moving to Private Window`
  - Key: `Ctrl+H` (or whatever you want)
  - Action Keys:
    - `TrampolineMarkSelected`
    - `DeselectAll`
    - `TrampolineMoveMarkedToPrivateWindow`

  - Expression: `{Selected==true}`

- [Global Hotkey](https://vassalengine.org/doc/latest/ReferenceManual/GlobalHotKey.html#top)
  - Command: `""` (empty)
  - Key: `TrampolineMarkSelected`
  - Global Hotkey: `MarkSelected`

- [Deselect](https://vassalengine.org/doc/latest/ReferenceManual/Deselect.html#top)
  - Command: `""` (empty)
  - Key: `DeselectAll`
  - Type: `All`

- [Global Hotkey](https://vassalengine.org/doc/latest/ReferenceManual/GlobalHotKey.html#top)
  - Command: `""` (empty)
  - Key: `TrampolineMoveMarkedToPrivateWindow`
  - Global hotkey: `MoveMarkedToPrivateWindow`

- [Send to Location](https://vassalengine.org/doc/latest/ReferenceManual/SendToLocation.html#top)
  - Command: `""` (empty)
  - Key: `MoveToPrivateWindow
  - Destination: `Grid Location on Selected Map` (for example)
  - Map: `SideAPrivateMap`
  - Location: _some location_

This approach can also be used if one wants to calculate the combat odds between selected pieces, or similar.

Yours,  
_Christian_

---

<div class="post-metadata">

**Author:** ![craig83](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/c/fbc32d/32.png) [@craig83](https://forum.vassalengine.org/u/craig83)\
**Post date:** [October 6, 2026, 1:59pm UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/8 "2026-10-06T13:59:39Z")

</div>

Can’t thank you enough for helping out with this. I went through this very methodically this morning and when I run it on the piece, it doesn’t move. Is there a way I can see a log of the actions/commands to problem solve where the issue is?

---

<div class="post-metadata">

**Author:** ![craig83](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/c/fbc32d/32.png) [@craig83](https://forum.vassalengine.org/u/craig83)\
**Post date:** [October 6, 2026, 2:22pm UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/9 "2026-10-06T14:22:26Z")

</div>

Actually worked it out. Was an issue with my send to location trait. Now I just need to add something in to replace the stack on the map, with a single marker.

---

<div class="post-metadata">

**Author:** ![craig83](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/c/fbc32d/32.png) [@craig83](https://forum.vassalengine.org/u/craig83)\
**Post date:** [October 6, 2026, 11:41pm UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/10 "2026-10-06T23:41:36Z")

</div>

Only Issue I’m having now is that all pieces on the map are being moved to the off map window. So guessing its an issue with the Selected==true expression. Have been looking but can’t see where the error is.

---

<div class="post-metadata">

**Author:** ![cholmcc](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cholmcc/32/8319_2.png) [@cholmcc](https://forum.vassalengine.org/u/cholmcc)\
**Post date:** [October 6, 2026, 11:52pm UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/11 "2026-10-06T23:52:18Z")

</div>

Try `{Selected}` instead of `{Selected==true}`.

---

<div class="post-metadata">

**Author:** ![cholmcc](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cholmcc/32/8319_2.png) [@cholmcc](https://forum.vassalengine.org/u/cholmcc)\
**Post date:** [October 7, 2026, 12:01am UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/12 "2026-10-07T00:01:42Z")

</div>

> [@craig83](#):
>
> Now I just need to add something in to replace the stack on the map, with a single marker.

- [Trigger Action](https://vassalengine.org/doc/latest/ReferenceManual/TriggerAction.html#top)
  - Command: `Hide by Moving to Private Window`
  - Key: `Ctrl+H` (or whatever you want)
  - Action Keys:
    - `TrampolineMarkSelected`
    - `DeselectAll`
    - `PlaceDummyMarker`
    - `TrampolineMoveMarkedToPrivateWindow`

  - Expression: `{Selected}`

- [Place Marker](https://vassalengine.org/doc/latest/ReferenceManual/Marker.html#top)
  - Key: `PlaceDummyMarker`
  - Path: …

Perhaps you want to set a global property to the `UniqueID` of the placed marker, and modify ``MoveToPrivateWindow`to be a`Trigger Action`that first stores that global property in a`Dynamic Property`, and only then does the `Send to Location`. In that way, the moved pieces knows which dummy piece has taken their place, and you can therefore move them back to that piece.

Another way to achieve this is via [`Attachment`](https://vassalengine.org/doc/latest/ReferenceManual/Attachment.html#top) - the moved pieces are attached to the dummy, and vice-versa. That will allow them to communicate very efficiently. For example, the dummy piece can query the moved units for their properties, sum that, or count number of masked units.

---

<div class="post-metadata">

**Author:** ![craig83](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/c/fbc32d/32.png) [@craig83](https://forum.vassalengine.org/u/craig83)\
**Post date:** [October 7, 2026, 1:25am UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/13 "2026-10-07T01:25:17Z")

</div>

What does "Global hotkey: `MarkForMoveToPrivateWindow"` actually trigger? Should there be another trait in the piece that assigns a property?

---

<div class="post-metadata">

**Author:** ![cholmcc](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cholmcc/32/8319_2.png) [@cholmcc](https://forum.vassalengine.org/u/cholmcc)\
**Post date:** [October 7, 2026, 10:29am UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/14 "2026-10-07T10:29:43Z")

</div>

> [@craig83](#):
>
> What does …

My mistake - forgot to write it in. Here’s everything revised

You define on your map

- [Global Key Commands](https://vassalengine.org/doc/latest/ReferenceManual/GlobalKeyCommands.html#top)
  - Button text: `""` (empty)
  - Tooltip: `""` (empty)
  - Button icon: `""` (empty)
  - Hotkey: `MarkSelected`
  - Global hotkey: `MarkForMoveToPrivateWindow`
  - Preselect:
    - By Property: `true`
    - Property name: `Selected`
    - Comparison: `==`
    - Value: `true`

  - Apply to counters on this map only: `true`

- [Global Key Commands](https://vassalengine.org/doc/latest/ReferenceManual/GlobalKeyCommands.html#top)
  - Button text: `""` (empty)
  - Tooltip: `""` (empty)
  - Button icon: `""` (empty)
  - Hotkey: `MoveMarkedToPrivateWindow`
  - Global hotkey: `MoveToPrivateWindow`
  - Preselect:
    - By Property: `true`
    - Property name: `ToMoveToPrivateWindow`
    - Comparison: `==`
    - Value: `true`

  - Apply to counters on this map only: `true`

Define on your piece(s) or, preferably, in a Prototype

- [Trigger Action](https://vassalengine.org/doc/latest/ReferenceManual/TriggerAction.html#top)
  - Command: `Hide by Moving to Private Window`
  - Key: `Ctrl+H` (or whatever you want)
  - Action Keys:
    - `TrampolineMarkSelected`
    - `DeselectAll`
    - `PlaceDummyMarker`
    - `TrampolineMoveMarkedToPrivateWindow`

  - Expression: `{Selected==true}`

- [Global Hotkey](https://vassalengine.org/doc/latest/ReferenceManual/GlobalHotKey.html#top)
  - Command: `""` (empty)
  - Key: `TrampolineMarkSelected`
  - Global Hotkey: `MarkSelected`

- [Deselect](https://vassalengine.org/doc/latest/ReferenceManual/Deselect.html#top)
  - Command: `""` (empty)
  - Key: `DeselectAll`
  - Type: `All`

- [Global Hotkey](https://vassalengine.org/doc/latest/ReferenceManual/GlobalHotKey.html#top)
  - Command: `""` (empty)
  - Key: `TrampolineMoveMarkedToPrivateWindow`
  - Global hotkey: `MoveMarkedToPrivateWindow`

- [Trigger Action](https://vassalengine.org/doc/latest/ReferenceManual/TriggerAction.html#top)
  - Command: `""` (empty)
  - Key: `MoveToPrivateWindow`
  - Action keys:
    - `ClearMoveToPrivateWindow`
    - `MoveToPrivateWindowReal`

- [Send to Location](https://vassalengine.org/doc/latest/ReferenceManual/SendToLocation.html#top)
  - Command: `""` (empty)
  - Key: `MoveToPrivateWindowReal`
  - Destination: `Grid Location on Selected Map` (for example)
  - Map: `SideAPrivateMap`
  - Location: _some location_

- [Place Marker](https://vassalengine.org/doc/latest/ReferenceManual/Marker.html#top)
  - Key: `PlaceDummyMarker`
  - Path: …

- [Dynamic Property](https://vassalengine.org/doc/latest/ReferenceManual/DynamicProperty.html#top)
  - Name: `ToMoveToPrivateWindow`
  - Numeric: `true`
  - Commands:
    - _set to true_
      - Command: `""` (empty)
      - Key: `MarkForMoveToPrivateWindow`
      - Type: `Direct`
      - Expression: `{true}`

    - _clear_
      - Command: `""` (empty)
      - Key: `ClearMoveToPrivateWindow`
      - Type: `Direct`
      - Expression: `{false}`

Note, if you are sure the pieces are in the same location, you can probably avoid the trampolines to GKC, and do

- [Trigger Action](https://vassalengine.org/doc/latest/ReferenceManual/TriggerAction.html#top)
  - Command: `Hide by Moving to Private Window`
  - Key: `Ctrl+H` (or whatever you want)
  - Action Keys:
    - `DeselectAll`
    - `PlaceDummyMarker`
    - `LocalMoveMarkedToPrivateWindow`

  - Expression: `{Selected==true}`

- [Global Key Command](https://vassalengine.org/doc/latest/ReferenceManual/GlobalKeyCommand.html#top)
  - Key: `MoveToPrivateWindow`
  - Global key: `MoveToPrivateWindowReal`
  - Restrict range: `true`
  - Fixed range: `true`
  - Range: `0`

- [Send to Location](https://vassalengine.org/doc/latest/ReferenceManual/SendToLocation.html#top)
  - Command: `""` (empty)
  - Key: `MoveToPrivateWindowReal`
  - Destination: `Grid Location on Selected Map` (for example)
  - Map: `SideAPrivateMap`
  - Location: _some location_

- [Trigger Action](https://vassalengine.org/doc/latest/ReferenceManual/TriggerAction.html#top)
  - Command: `""`
  - Key: `PlaceDummyMarker`
  - Action Keys:
    - `PlaceDummyMarkerReal`

  - Expression: `{Selected==true}`

- [Place Marker](https://vassalengine.org/doc/latest/ReferenceManual/Marker.html#top)
  - Key: `PlaceDummyMarkerReal`
  - Path: …

This will move _all_ pieces that have these commands, which are in the same location as the initating piece, to the private window, whether selected or not.

Yours,  
_Christian_

---

<div class="post-metadata">

**Author:** ![danielwrg](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/d/858c86/32.png) [@danielwrg](https://forum.vassalengine.org/u/danielwrg)\
**Post date:** [October 8, 2026, 4:44pm UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/15 "2026-10-08T16:44:18Z")

</div>

when you build a counter or a game piece prototype definition, you can add “mask” and “invisible” function. So, when you play, you can select a unit will be masked or unmasked; That means opponent will see a neutral marker, a flag for instance, instead of the unit. But you will see the real unit. Its more confortable than put units outside the map. Secondly, you can choose the unit will be invisible from opponent view, but not for you.

---

<div class="post-metadata">

**Author:** ![cholmcc](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cholmcc/32/8319_2.png) [@cholmcc](https://forum.vassalengine.org/u/cholmcc)\
**Post date:** [October 8, 2026, 5:06pm UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/16 "2026-10-08T17:06:57Z")

</div>

> [@danielwrg](#):
>
> when you build a counter or a game piece prototype definition, you can add “mask” and “invisible” function.

Yes, but …

> [@craig83](#):
>
> … if there’s any way to Mask a whole stack of units, so the opponent can no longer see how many units are in the stack?

which precludes using the [Mask](https://vassalengine.org/doc/latest/ReferenceManual/Mask.html#top) or [Invisible](https://vassalengine.org/doc/latest/ReferenceManual/Hideable.html#top) traits - unless one does more. Just [Mask](https://vassalengine.org/doc/latest/ReferenceManual/Mask.html#top)’ing pieces will still allow the opponent to count the number of pieces in a stack. You can of course make them all [Invisible](https://vassalengine.org/doc/latest/ReferenceManual/Hideable.html#top), but then you’d still need a piece to indiciate to the opponent that there is a stack at the location.

The above suggestions was based on @jrwatts suggestion to

> [@jrwatts](#):
>
> … move the stack to a `Private Window`

---

<div class="post-metadata">

**Author:** ![craig83](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/c/fbc32d/32.png) [@craig83](https://forum.vassalengine.org/u/craig83)\
**Post date:** [October 8, 2026, 5:11pm UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/17 "2026-10-08T17:11:34Z")

</div>

Thanks all, well I’ve worked through this so many times and tried to get it to work in a smooth way, but unfortunately every time I can’t get it to function as desired, so I’ve decided to just go with a less automated option and have a manual command to drop a marker, then a separate command to move the counters. Works just fine, but not as elegant as I was hoping. Need to keep moving forward to actually have something playable.

Appreciate all the advice!

---

<div class="post-metadata">

**Author:** ![danielwrg](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/d/858c86/32.png) [@danielwrg](https://forum.vassalengine.org/u/danielwrg)\
**Post date:** [October 8, 2026, 5:27pm UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/18 "2026-10-08T17:27:31Z")

</div>

if you have 5 units in a stack you can make 4 units invisible and the last one masked; Opponent will see one flag but won’t know the number of units.

---

<div class="post-metadata">

**Author:** ![danielwrg](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/d/858c86/32.png) [@danielwrg](https://forum.vassalengine.org/u/danielwrg)\
**Post date:** [October 8, 2026, 5:28pm UTC](https://forum.vassalengine.org/t/mask-whole-stack-number-of-counters/90564/19 "2026-10-08T17:28:45Z")

</div>

what is the name of the game? Perhaps it is possible to make something

I am acccustomized with the functions, playing often with masked units
