## VASSAL Reference Manual

Home > Module > Game Piece Palette > Game Piece > Basic Piece

### Basic Piece

The simplest game piece consists of an image and a name.

Type a Name into the field at right - this name will be used whenever the piece is mentioned in a message.

Add a new Image for the piece by double-clicking on the box to the left, or select an image that has already been added from the drop-down menu.

For a quick method of generating simple piece images from scratch, see Game Piece Image Definitions.

To give a piece more complex behaviors, you can add more Traits to it in the Piece Definer dialog. For example you could omit or remove the image from the Basic Piece and instead add a Layer trait to allow the piece to use multiple images.

The image is optional, but you should always give each Basic Piece a name.

The following Properties are defined in a Basic Piece, meaning that any trait in the piece can refer to them:

- BasicName contains the name of Basic Piece trait, as specified in the properties

- PieceName contains the full name of the piece, including any additional strings added by e.g. Layer or Text Label traits

- PlayerSide contains the side of the current player, as specified in the Definition of Player Sides

- LocationName contains the name of the current location, as determined by the local grid. If the piece is in a Zone in a Multi-Zone Grid, then whether LocationName returns the name of the Zone or a Region within the Zone’s grid depends on the configuration of the Zone.

- CurrentMap contains the name of the current Map Window

- CurrentBoard contains the name of the current Board

- CurrentZone contains the name of the current Zone

- CurrentX contains the current map X coordinate

- CurrentY contains the current map Y coordinate

- DeckName contains the name of the Deck if the piece is currently stacked in one.

- DeckPosition contains the position of a piece within a Deck (top = 1) if the piece is currently stacked in one, or 0 otherwise.

- Selected contains true when the piece has been selected with the mouse

- PieceId contains a string that uniquely defines the source of the piece. All pieces sourced from the same Game Piece Palette slot will have the same PieceId string.

The following Properties are defined after a piece is moved, either manually by drag-and-drop movement or by a Send To Location trait:

- OldLocationName contains the name of the previous location, as determined by the local grid

- OldMap contains the name of the previous Map Window

- OldBoard contains the name of the previous Board

- OldZone contains the name of the previous Zone

- OldX contains the previous map X coordinate

- OldY contains the previous map Y coordinate

The following Properties are defined after the player has selected something from the piece’s right-click context menu:

- ClickedX contains the X location on current map where right-click took place.

- ClickedY contains the Y location on current map where right-click took place.