Invisible at start

How do you make a piece that is invisible to the opponent at start?

Currently I place the invisible trait on the piece along with a trigger being activated by the piece being placed on the map. I also need a dynamic property preventing this happening every time the piece is moved. It actually works - but unfortunately the messages from the map reveal which piece is placed where, as this message apparently is sent before the piece turns invisible.

This is quickly becoming, what Clint Eastwood would refer to as a ‘cluster f**k’ :smile: There surely must be a better way. But how?

Btw. the same problem applies to masking as well.

The answer for masking is easy - forget about it… Afternote - this is in relation to initially hidden units by the Scenario Developer (see next post for player).

The mask functionality is bound to the password of who turned mask on. Which means if the scenario developer masks a unit, then the players can’t unmask it (unless they have the same password). Essentially, its a security problem…

If intending to simply implement “hidden” (but not “secure hidden”) functionality, I would consider adding a “blank back” layer (which could look exactly like masked) and then allow “flipping” from the initial-hidden state to the revealed state.

For initially hidden units by player, I would do the following.

Start the units in a player unique window. The player can then mask them in this window and THEN move them to the main map.

I need the owning player to be able to mask/unmask the units.

The hidden units need to be completely hidden.

It would be nice to be able to select the initial state of the mask and invisible traits.

The solution with an extra private window is also a kludge. And an even worse one than mine, I think. For this solution to work, it requires the user/player to act in a specific way - this is a no-no in my book :slight_smile:

You could try adding a Startup Global Key Command which checks if the current PlayerSide is the matching player, and then masks/hides the necessary pieces if so.

Unclear why some solutions won’t work. You are trying to implement a corner case in Vassal. From what I can see, Vassal will allow you to do what you want even if it’s “kludgy.”

You can (for instance) clear map report movement commands so movement is not reported.

Units can be set to invisible via either private window or startup commands.

Thx to Korval and jrwatts for your comments and suggestions. Much appreciated.

I wasn’t even aware of the Startup Global Key Command :blush: Unfortunately my pieces do not exist at startup. They are markers used for plotting the moves for one or more upcoming turns.

As for the map messages: move messages are not a problem. The piece becomes invisible when placed and the move messages are automatically suppressed for that piece. But the create message is sent before the piece becomes invisible. I can suppress that message by clearing create messages on that map as Korval suggests. Alternatively it should be possible to give the pieces a marker trait and use that to suppress messages from those pieces via a Beanshell script - I haven’t tried it yet. But I will :slight_smile:

The essence of the original question was if pieces can be made invisible (or masked) at start in a quick and simple way as it would be silly to implement a kludge, if I had just overlooked a simple solution.
I have now learned that the answer is no…

thx again…

Unfortunately my pieces do not exist at startup.

So make them exist at startup.