Prototypes

From VASSAL
Jump to: navigation, search

VASSAL Reference Manual

Home > Module > Prototypes


Prototypes

Most games have many counters that look different but behave very similarly.   Prototypes are a method of using templates to vastly simplify the definition of most game pieces. The module author first defines a Prototype as a set of traits, then uses it in the definition of other game pieces.   If the module author needed to change to a unit definition, such as using a different graphic for a layer trait, the author needs only to make the change in the prototype definition, instead of making the change in each individual game piece definition.   Any number of Prototypes may be used within the same piece.

Once a piece based on a Prototype has been created during a game, it loses memory of being based on that prototype.   Therefore, the definition of the prototype can change in a later version of the module without invalidating saved games from previous versions.   All pieces in a Game Piece Palette, At Start Stack, or Deck will reset when a prototype definition changes while editing a module.

If you want your pieces in the palette to start in a certain state, then you can edit the traits that appear in this prototype by right-clicking in the area below the name. You may need to resize the window to expose that area.

Sub-Components

Definition



The dialog for defining a prototype is just the same as for defining a Game Piece, but with a name and without the innermost Basic Piece.   Prototypes may contain other prototypes.

PrototypeDefinition.png