VASSAL Reference Manual

Home > Module > Game Piece Palette > Game Piece > Mask

Mask


A masked piece looks different to players other than the one who hid it, but remains visible to all players (unlike an invisible piece).  This trait is useful for playing cards.  Players may drag a card face down from their hand to the playing area.  The owning player will be able to see the identity of the card, but other players will only see the back until it is turned face up.  Board games with a concept of concealment will also use this trait.

Like the "Can be Invisible" trait, this trait only hides traits that appear before it.  Generally, it should be before any Invisible trait and after all other traits of the piece.

A piece with the Mask trait is "owned" by the player who masks it.  If unmasked and masked again by a different player, the second player becomes the owner.  Menu commands of traits hidden by a masked piece are not available to non-owning players.  A setting in the Global Options determines whether or not non-owning players can unmask pieces.

Mask Command:  The name of the right-click menu entry that mask/unmasks this piece

Keyboard Command:  The keyboard command to mask/unmask this piece.  

Can be masked by:  Defines who may "own" this piece (i.e. mask it from other players). Any Player means that any player may mask this piece, including observers. Any Side means that any player who has been assigned a side in a game (not an observer) can mask this piece. If the player resigns and another player takes the side, then the new player for that side will be the owner. Any of the Specified Sides allows you to enter a list of sides. Only players assigned to one of the named sides can mask the piece, but the players of all the listed sides will be able to see and modify the piece. This is useful for referee players or games with multi-player teams.

View when masked: To non-owning players, the piece will be drawn using this image.

Name when masked: To non-owning players, the piece will be given this name.

Display style:  Determines how a masked piece is seen by the owning player.  The following options are available:
  • Inset draws the regular piece with the mask image at reduced size in the upper left corner
  • Background draws the mask image at full size and the regular piece at reduced size centered within it
  • Plain draws only the mask image, so the piece looks the same to all players.  A "Peek" command key may be specified.  When the owning player selects the "Peek" command, he will see the unmasked piece so long as it remains selected (i.e. until he clicks elsewhere on the map).  If the "Peek" command key is left blank, then the owning player will see all selected pieces in their unmasked state.
  • Use Image draws the unmasked piece and then a specifiable image on top of the piece.  The image should make use of transparency to let some of the information through.
EXAMPLE: An ordinary playing card can be implemented by setting the basic image to represent the front of the card.  In the "Mask"
controls, specify an image for the back of the playing card.  When a player types CTRL-F, that card will be known only to him (as though
held in his hand).  Typing CTRL-F again will reveal the card to the other players (as when playing it on the table).

This trait sets the Property ObscuredToOthers=true when the piece is masked.