VASSAL Reference Manual

Home > Module > Game Piece Palette > Game Piece > Prototype (Trait)


Prototype (Trait)

UsePrototype

The Prototype trait allows a piece to share a set of common traits with other pieces. The traits themselves are defined elsewhere in a Prototype Definition in the [Global Piece Prototype Definitions] section of your module. A Game Piece may contain any number of Prototype traits, intermixed with regular traits, in any order.

EXAMPLE: A Prototype named Vehicle can be defined with Can Rotate, Text Label, and Mark When Moved traits. Any counter can use these traits by using a Prototype trait and specifying Vehicle as the name. If the module author later decides that vehicles should also have another trait, it need only be added to the Prototype definition, and all game pieces with a Prototype - Vehicle trait will automatically gain the new trait. Similary, modifying or deleting a trait from a Prototype will change or remove that trait for all pieces that reference the Prototype.