In this tutorial, we show how to put together a module for a miniatures game, with terrain tiles instead of a map and pieces that don't move on a grid. The necessary data files and the final module are in the File:Minis.zip file
Our map will simply contain a blank board on which players can place tiles. Although the game pieces will not use a grid, we can use a map grid to make placing the tiles easier. Create a single board with no image, width 1200 and height 500, enough for three tiles across and two down. The grid will be a simple rectangular grid with the same width and height as a tile, with offset of half the size of a tile.
We will always want the tiles to be drawn underneath the game pieces, so we define a Game Piece Layers component with two layers: Tile and Army.
For measuring distances, we add a Line of Sight Thread with a resolution of 72 pixels per "inch"
For the tiles, we will make pieces that can be reversed before being placed but never move afterward. We'll put the main characteristics into a Prototype to make it easy for us later if we need to change how Tiles act. The Tile Prototype has three traits: Can Rotate to allow it to reverse:
Does not Stack to keep it from being selected after placement:
and a Marker trait to identify it as a Tile type for the Game Piece Layer:
Since Tiles aren't normally used once a game starts, we won't put them into the main Game Piece Palette. Instead, we'll create a separate one, with the Button_Tilesets.gif image for the toolbar button icon. Inside, we put a Tabbed Panel with six different Tile pieces. Each piece has just a Basic Piece with the image for that tile (the Tile_*.gif files) and a Prototype trait with name "Tile."
The Armies will be able to move and rotate freely. Again, we put the main characteristics into an Army Prototype. The first traits are Does not Stack with the "ignore map grid when moving" option selected. We give it a Marker trait with name=Layer and value=Army so that the Game Piece Layers component will always draw them on top of the tiles. The Can Rotate trait has the "allow arbitrary rotations" option checked. This allows players to rotate the piece interactively to any facing with the mouse.
For convenience, we define menu/keyboard commands that move the army forward exactly 1,2, or 3 inches and group them all together under a "Move" sub-menu:
The Army pieces themselves go into the main Game Piece Palette. Use the Dwarf.gif image for the palette's toolbar button icon. In the palette, we add a Panel with just one Single Piece. The Army, named "Goblin" uses the Goblin.gif for its Basic Piece image and the Army Prototype. In addition, we add two Can Pivot traits that automatically pivot the piece by 90 degrees around its upper left and lower left corners:
Because the size of different armies may vary, we put these pivot traits into the Goblin piece itself rather than into the Army prototype.
Now, when you start a new game, you'll find you can move the Goblin army anywhere with the mouse, rotate it using the mouse and use the Move and Pivot commands to move it using the keyboard. The Move commands move the piece in the "forward" direction relative to its current facing, and the Pivot commands behave similarly. If we had put the Move traits before the Rotate trait in the army prototype, the move commands would not take the piece's rotation into account.
In order to track information associated with the piece, we will give it a PropertySheet trait. We give it a "Label Only" property to indicate the unit type, a "Tick Mark" property HP for hit points, and a "Multi-line Text" property for general notes. After saving the piece, right-click on the piece in the Game Piece Palette and show the stats. Right-click on the HP property to set the initial and maximum values of the hit points.
For one final player convenience, we put together a couple of pre-configured tile setups so that players can use them directly without needing to place the tiles themselves. Each setup is simply a saved game. While still in edit mode, we begin a game, place some tiles and save. Then we add a Pre-defined Setup component with one setup for each saved game (the Maze.sav and Pit.sav files), and one more that corresponds to a blank board. If you use player sides, you must resign before you save, to permit other players access the module in that side without your user and password information.
You can of course enhance the pieces with other VASSAL game piece traits to make them even more interactive and informative. As you can see, the end result is a game that feels like playing miniatures should.