VASSAL Reference ManualHome > Module > Map Window |
||||||||||||||||||||||||||||||
Map WindowA Map Window contains the main interface for playing games with VASSAL. It displays the playing surface on which the players move Game Pieces by dragging and dropping with the mouse. It is possible to have two or more Map Windows; the players may drag and drop pieces between the different windows. A Map Window should be configured with at least one Map Board (in the "Map Boards" component).To add additional Map Windows to your module, use the Editor to navigate to the [Module] entry at the very top of the Editor's configuration window hierarchy. Right click on the [Module] entry and select Add Map Window. Your new Map Window will be added to the very bottom of your Module's list of components. You can then open the [Map Window] entry, where you should right click on the [Map Boards] subcomponent and add at least one Board. You can also add additional subcomponents by right-clicking the [Map Window] entry and selecting one of the appropriate Add options. See Sub-Components, below. SEE ALSO: Player Hands and Private Windows are specialized forms of Map Window and share most of its properties and subcomponents. They are designed for holding pieces and cards that are private to one player or side.
Sub-ComponentsMap are created with several default sub-components, but new ones can be added. To add sub-components to a map, navigate to the [Map Window] component entry in the Editor, right click on the [Map Window] component, and select the appropriate Add option for the sub-component you would like to add. Once you configure it, your new sub-component will appear at the bottom of the Map's list of sub-components.Map Boards
Stacking OptionsThis component controls how stacking is handled in this Map Window. It may not be removed.
Overview Window, or "Mini Map"
Line of Sight Thread
Toolbar Menu
Hide Pieces ButtonAdds a button to the Toolbar of the Map Window. Clicking the button will temporarily hide all pieces on the map, until the button is clicked again.
Zoom capabilityAdds the ability to zoom in and out of the Map. Toolbar buttons for "Zoom in", "Zoom out", and "Select Zoom Level" are added to the Map Window's toolbar.
Mouse-over Stack ViewerAdds a tool that displays the contents of a stack when the player leaves the mouse resting over it, after a specified delay.
Last Move Highlighter
Game Piece Layers
|
![]() |
Allows you designate certain "layers" of Game Pieces to be drawn before others. Pieces in higher layers are
always drawn on top of lower layers, and pieces never combine into stacks with pieces from other layers. See full Game Piece Layers article for details. |
Adds a "Camera" button to the Toolbar of the Map Window. Clicking the button will dump the
contents of the Map Window to an image file. This allows you to take a screen shot even if the Map Window is
too large to fit entirely on the screen. |
![]() |
![]() |
Adds a "Save Text" Button to the Map Window's Toolbar. Clicking the button will write a plain text summary of
the contents of the map to a text file, using the names assigned to the pieces and the appropriate numbering and/or
naming of the board's grid. |
A deck of cards, a bag of chits, or a fixed supply of counters. Decks are versatile containers for collections of pieces -- especially the kind that need to be shuffled, randomized, hidden, and drawn from. See full article for details. |
![]() |
![]() |
A group of one or more pieces which begin the game on the map. See full article for more details. |
Adds a button to the map window's Toolbar. Clicking the button will shift the position of all pieces on the map such that they are centered around the middle of the map as much as possible. This is useful for games where there are no absolute terrain features, such as some air and naval games. | ![]() |
![]() |
An extension of Global Key Command
that fires automatically upon completion of module load, once all the key listeners are started up. All fields behave
identically to the corresponding ones in Global Key Command, except that those
pertaining to the physical representation of a Toolbar button are suppressed as being inapplicable.
If multiple start-up commands need to be run in a particular order, they should be combined in a MultiAction Button and then launched from a single instance of Startup Global Key Command, as the sequence in which multiple instances of StartupGlobalKeyCommand are fired is undetermined. NOTE: Startup Global Key Commands fire every time the module starts up, whether it is to begin a new game or to load and continue an existing one. Thus if you need the Startup GKC to initiate an activity that should only be done once at the very beginning of a game, then it would need to send a key command to a pre-designated piece, which could then check a Global Property (called, perhaps, "StartupDone") to determine whether the game had already been started -- if it hadn't, the piece could then perform those tasks and set "StartupDone" to true, which would prevent the actions from being taken on a subsequent load of a saved game. |
Adds a button to the map window's Toolbar. Clicking the button will pick certain pieces from
the map window and apply the same key command to all of them. Description: A description of the action, used for the button's mouse-over tooltip. Key Command: The key command or Named Key Command that will be applied to the selected pieces. Matching properties: The command will apply to all pieces on the map that match the given Property Match Expression. The Expression can use comparisons to match relevant Properties of the pieces on the map to determine which ones should receive the key command, such as { LocationName != "Rome" } or { ArmorValue < Hits + 5 }>. An empty expression field matches every piece it finds. Apply to counters on this map only?: If checked, then only pieces on this map will be eligible to receive the key command. Otherwise all pieces in the game will be eligible provide they match the expression above. Within a Deck, apply to: Select how this command applies to pieces that are currently stacked in a Deck. No pieces means that pieces in a Deck ignore the command. All pieces means that the command can apply to any piece in the entire Deck that matches the expression. Fixed number of pieces allows you to specify the number of pieces (drawn from the top) that the command will potentially apply to--the piece(s) in question must still match the expression in order to be included. Button text: Text for the Toolbar button. Tooltip text: Mouse-over hint text for the Toolbar button. Button icon: Icon for the Toolbar button. Hotkey: Keyboard shortcut or Named Key Command for the Toolbar button. This is the key command that will initiate the Global Key Command, not the one that will be sent to the matching pieces -- the command to be sent is the one defined in the "Key Command: " field up above. Suppress individual reports: If selected, then any auto-reporting of the action by individual pieces via Report Action traits will be suppressed. Report Format: A Message Format that will be echoed to the chat area when the button is clicked or the hotkey pressed. Example: Suppose you have configured some pieces to contain a Layer indicating that a piece has fired, activated by Ctrl+F and with the nameFired. Give each piece the Marker trait with property name canFire and value true. Configure the Global Key Command to apply to pieces whose properties match { canFire == "true" && Fired_Active == "true" }. Specify CTRL-F as the key command. Now clicking the Global Key Command's button will set all marked pieces on the map to not having fired. |
![]() |
![]() |
Name: A short name of this shading for reference by pieces with the Area of
Effect trait. Shading Always On: If selected then the shading is always drawn. Otherwise, visibility is controlled by a button on the Toolbar. Shading Starts turned on: If true, then the shading will begin visible when the module is loaded. Button text: Text for the Toolbar button. Tooltip text: Optional rollover text for the Toolbar button. Button icon: Icon for the Toolbar button. Hotkey: Keyboard shortcut or Named Key Command for the Toolbar button. All boards in map get Shaded: Allows you to select which Boards in the map to apply the shading to. Type: If set to Background then the shaded area includes the entire board, minus the areas attached to any Area of Effect traits. If set to Foreground, then the shaded area includes only the areas attached to Area of Effect traits. Draw Shade on top of Counters: If selected, then the shading will be drawn over any pieces on the map. Otherwise, it will be drawn underneath all pieces. Shade Pattern: Choose between 100/75/50/25 % hatch patterns, or choose a custom image. Color: The color of the shading (if not using a custom image). Opacity: The opacity of the shading. 0 is completely transparent, 100 is completely opaque. Border: If selected, will draw a border around the shading area. You can specify the thickness, color, and opacity of the border. |
![]() |
![]() To add a Global Property to your map, find the [Global Properties] subcomponent in the Editor, right-click it, and select Add Global Property. This will let you define the initial value and any numeric constraints. Then, you can right-click on the [Global Property] entry to optionally Add Change-property Toolbar Button, the configuration dialog for which is shown at left. See the article on the Global Property trait of pieces for more details and examples. |
Allows you to define additional ways to highlight the selected piece on a map. The additional
highlighters are drawn only if the selected piece matches the specified properties. If a piece matches the
properties of more than one highlighter, all will be drawn, in addition to the highlighting color/border specified in
the Map's properties. To add an Additional Selection Highlighter to your map, locate the [Additional Selection Highlighters] subcomponent of your map in the Editor. Right-click it and select Add Highlighter. You can then configure your Highlighter using the dialog described below. Name: A short name for reference in the editor. Active if Properties Match: The highlighter will be drawn for all pieces on the map that match the given Property Match Expression. The expression can refer to Properties of the pieces to determine which ones are an appropriate match. Use Image: Specify an optional image to be overlaid on top of the selected piece. The center of the image will be offset from the center of the piece by the given number of pixels. Border Color: The color of the border to be drawn around selected pieces. Border thickness: The thickness of the border |
![]() ![]() |