VASSAL Reference Manual

Home > Module > Game Piece Image Definitions > Game Piece Layouts


Game Piece Layouts

This component contains all the layouts used to define a Game Piece Image. Right-click on the [Game Piece Layouts] component and select Add Game Piece Layout to add a new layout.

A Game Piece Layout defines the general look and layout of the items used in drawing an image. Specific color and text information is defined later for individual piece images in the Game Piece Image properties.

Note
Once you have configured your new Game Piece Layout, you will need to right-click on its [Game Piece Layout] entry and select Add Game Piece Image to create one or more individual images based on your layout.

An image is built up by drawing in order:

  1. A rectangle of the background color.

  2. A border.

  3. Each defined item in the order displayed in the Item panel.

Name:

The name of the Image Layout.

Counter width:

The width of all images created using this layout.

Counter height:

The height of all images created using this layout.

Border style:

The border style for all images created using this layout. Border styles currently available are:

  • None - No Border

  • Plain - Single pixel line of defined color.

  • Fancy - Two pixel shaded line of defined color. Mild 3D effect.

  • 3D - A 3D-style shaded border. Two pixels wide, colour automatically determined from background color.

imagelayout

GamePieceImageDefinitionsWhere

Visualizer

The next section contains a visualizer, showing you in actual size how your finished image will look. No colors or text have been defined yet, so sample text values and images placeholders are displayed.

imagelayoutvisualizer

Item List

The Items panel shows the list of defined items for this Layout. Layout items are drawn onto the image in the order specified. Click on an item in the panel to display and edit its attributes in the lower display panel.

imagelayoutitems

Buttons

Use the buttons to add, remove or move items in the list.

  • Symbol - Add a NATO Unit Symbol.

  • Label - Add a Text label.

  • Text Box - Add a Text box.

  • Image - Add an image from the module images directory.

  • Shape - Draw and color fill a rectangle, rounded rectangle or oval.

  • Remove - Remove the selected item.

  • Up - Move the selected item up the list (i.e. draw earlier, and thus "towards the back").

  • Down - Move the selected item down the list (i.e. draw later and thus "towards the front").

imagelayoutbuttons

Advanced Options

Each item type has a checkbox to enable a set of advanced options to better control the position and display of the item.

Advanced options:

Display the advanced options.

X/Y offset:

How many pixels to move the item to the right/down from its default display position seleted in the Location option.

Rotation (degrees):

Allows the item to be rotated about its center.

Anti-alias:

Turn on anti-aliasing when drawing the item. Can improve the look of the certain items, especially when they are small or contain narrow lines.

imagelayoutadvanced]

Symbol Item

A Symbol Item is a generic symbol to be drawn by the program. An Infantry symbol will be shown as a placeholder but the particular symbol is chosen later when configuring an individual Game Piece Image.

Name:

The name of the item. Items MUST be uniquely named within an Image Layout.

Location:

Select the location of the item on the counter.

Symbol set:

Select the Symbol Set to use. The only Symbol Set currently available is NATO Unit Symbols.

Width:

The width of the body of the symbol in pixels.

Height:

The height of the body of the symbol (not including the Size specifier) in pixels.

Line width:

The width of the line (in pixels) used to draw the symbol. Fractional line widths can be used. The lines are drawn with antialiasing turned on to produce smooth looking lines of any width. When using a small symbol size, a line width of 1.0 will usually give the best results.

symbolitem]

Label Items

A Label Item is a text label drawn in a particular font at a particular location. The value of the text can be specified in the individual images or in the layout, in which case all images using this layout share the same value.

Name:

The name of the item. Items MUST be uniquely named within an Image Layout.

Location:

Select the location of the item on the counter. The location also determines the text justification, i.e. selecting Top Left ensures that the upper left corner of the text is in the upper left corner of the image. Once the justification is set by the Location, you can still use the X/Y offset in the advanced options to place the text in a different location.

Font style:

Select the name of the Font Style to be used for this Text Item.

Text option:

Select how the text is provided for each image created using this layout:

Specified in individual imagaes - Each image has its own version of the text

Fixed for this layout - All images created using this layout have the same text.

Text:

Enter the text to display on each image when the Fixed for this layout Text option is selected.

imagelayouttext1

Text Box Items

A Text Box Item is multi-line area of text drawn in a particular font at a particular location. The text in a Text Box will wrap to stay within the bounds of the box. The value of the text can be specified in the individual images or in the layout, in which case all images using this layout share the same value.

Name:

The name of the item. Items MUST be uniquely named within an Image Layout.

Location:

Select the location of the item on the counter. The location also determines the text justification, i.e. selecting Top Left ensures that the upper left corner of the text is in the upper left corner of the image. Once the justification is set by the Location, you can still use the X/Y offset in the advanced options to place the text in a different location.

Use HTML:

If selected, then the contents will be interpreted as HTML.

Font style:

Select the name of the Font Style to be used for this Text Item.

Text option:

Select how the text is provided for each image created using this layout:

Specified in individual imagaes - Each image has its own version of the text.

Fixed for this layout - All images created using this layout have the same text.

Text:

Enter the text to display on each image when the Fixed for this layout Text option is selected.

imagelayouttextbox

Image Item

An Image item is an imported image.

Name:

The name of the item. Items MUST be uniquely named within an Image Layout.

Location:

Select the location of the item on the counter.

Image option:

Specify whether the image is specified right here in this layout or later on in the Game Piece Image properties that use this layout. Use the File Open Dialog box to locate a copy of the image you wish to use on your PC. When you save the module, VASSAL will attempt to copy this image into the images folder within the module zip file. You can also manually copy images into your images folder.

Image:

Select an image to load into the module when the Fixed for this layout option is selected.

imageitem

Shape Item

A Shape Item is a simple geometric shape.

Name:

The name of the item. Items MUST be uniquely named within an Image Layout.

Location:

Select the location of the item on the counter.

Width:

Select the width of the shape.

Height:

Select the height of the shape.

Shape:

Select the type of shape.

  • Rectangle - A simple Rectangle of the given size.

  • Rounded Rectangle - A Rectangle with rounded corners.

  • Oval - A circle or oval shape that fills the given size.

Bevel:

For Rounded Rectangle shapes, larger bevel values mean rounder corners.

ShapeItem


Sub-Components

Game Piece Image

An image created using this layout. You can create as many individual Game Piece Images as you’d like using each Game Piece Layout. To add a Game Piece Image, right-click on the [Game Piece Layout] component where you created the desired layout and select Add Game Piece Image.