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.
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?
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.
The command arrives at the one of the selected pieces.
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.
The Hotkey then sends a command to all Selected pieces - say MarkForMoveToPrivateWindow
That command then marks the selected pieces with some attribute - say ToMoveToPrivateWindow.
The control goes back piece, which
Places a marker in its location
then executes the Deselect trait.
It then issues a Global Hotkey - say MoveMarkedToPrivateWindow
The Global Hotkey then sends a command, but only to those pieces with the mark - say MarkForMoveToPrivateWindow. The command could be MoveToPrivateWindow.
The command is seen by all piece with MarkForMoveToPrivateWindow
The pieces then moves themselves to the private window.
Since there are no selected pieces, it means the rest of the pieces do not see the initial - Hide by Moving to Private Window.
Pieces moved to the private window should have their MarkForMoveToPrivateWindow property reset.
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
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.
Global Key Commands - 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
Global Hotkey trait defines a constant property on a piece. A Dynamic Property trait defines a mutable property on a piece.
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?
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.
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.
Perhaps you want to set a global property to the UniqueID of the placed marker, and modify ``MoveToPrivateWindowto be aTrigger Actionthat first stores that global property in aDynamic 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 - 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.
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.
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.
which precludes using the Mask or Invisible traits - unless one does more. Just Mask’ing pieces will still allow the opponent to count the number of pieces in a stack. You can of course make them all Invisible, 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
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.