VASSAL 3.4 Release Notes

In addition to many bug fixes, stability improvements, and performance enhancements, we've also added more new features to Vassal 3.4.0 than we have added in a while. This article will give you a quick tour of the new features, as well as listing some significant player-facing bug fixes.

= New Features =

New Expression Builder Functions
Many new methods are supported in Expressions. The Expression Builder is a good tool for finding them. Some, such as the string and math methods simply make it easier to use the Java string and math methods which were always accessible previously. Others, such as the Random and Count families are genuinely new. Some of the fun ones described in the table below:



HTML Chat Log
VASSAL's Chat Log now features HTML support, which means that your  traits can now use   tags to create bold text,   to create italics,   tags for custom styling, and   tags to display images, like the dice shown at left.

"Quick Colors" are also available by using a special character as the very first character in a line:  for green,   for pink , for red, and  (back apostrophe) for purple.

In order to take full advantage of this feature for your module, you will need to check the  option in the Global Options of your module (in the Editor, scroll down to the  component and open its Properties). This is to maintain compatibility with existing modules which may already have e.g.  symbols in text messages, that would otherwise be misinterpreted as HTML. 

Editor "Search" Function
Starting with VASSAL 3.4.0 the Editor has a Search function:  or select   from the Edit menu. You can search for the names of individual components or optionally the names of classes (component types). Presently you cannot search for Traits within a piece or prototype, but this may be supported in a future version. 

Editor Documentation
The online documentation has been substantially improved and updated. All of the screenshots and articles should now be "current to Version 3.4.0". Comprehensive documentation on the new Chat Log and other new features has been provided. There is also substantially more information on Trait ordering available in the Game Piece article. These documentation updates will eventually be rolled out to the Wiki and other locations as part of an ongoing effort. 

Band Select controls in Does Not Stack
The  trait now contains an additional field which gives module designers separate control over whether a piece can be selected with a band-select (dragging a lasso or box around a group of pieces). This can be used, for example, to automatically filter out minor markers from band-selects (leaving only "real" units), or to filter out large stationary "pieces" that are used to denote the position of provinces on the map. A piece with band-select disabled can still be selected by clicking directly on it, meaning that such pieces can still have functional right-click context menus. 

Movement Trails controls
The Movement Trails trait now offers additional key commands, so that traits can be turned explicitly to the  or   state, rather than merely toggled. Likewise the movement trail history of a piece can be cleared directly. These additional controls are intended to make it easier to implement Global trails on/off buttons e.g. on the Toolbar. 

Menu Separator Trait
A new  trait is available for Game Pieces. Adding a Menu Separator puts a horizontal bar in the piece's right-click context menu, so you can add these to your modules to provide better organization. The Menu Separator trait includes a  field, which indicates only when the Menu Separator should be hidden from the menu -- in other words you can assign it the same key as another trait, and if that trait is hidden the separator will also be hidden. 

Game Piece Palette Scaling
The Game Piece Palette, as well as its  and   sub-components, now accept a scale ("zoom") factor at which pieces within should be drawn. This can allow more usable, compact graphics in a piece palette, so that you can get more use out of valuable screen space (and won't be dependent solely on scrolling lists). 

= User Interface Improvements =

Menu Click Location
Beginning with VASSAL 3.4.0, two new properties are exposed on :   and. These record the location, in map coordinates, of the exact location of the mouse the last time it was used to bring up the context menu (in other words, normally a Right Click, though on certain platforms other methods are possible). An example of use: imagine a large immovable piece that represented the area of a province or country. Right clicking on e.g. "Czechoslovakia" now leaves a record (in the Czechoslovakia piece) of precisely where the click occurred, so that if the menu item were to place a new piece it would be able to then move the piece to the exact click location.

Undo hotkey
The Undo button can now be assigned a hotkey (e.g. Ctrl+Z) by a module designer.

Mouse-over Stack Viewer Overlap
The Mouse-over Stack Viewer now offers an option to find all pieces overlapping the mouse location (rather than only pieces matching the precise location of the top piece found).

Resign Button Flow
The Resign (aka Switch Sides) button now has a streamlined flow. It is in particular designed to make switching sides in "Hotseat" games faster, and will offer "successive defaults" for that purpose. In most cases during "Hotseat", pressing the shortcut key for the Resign button and then  will be all it takes to switch to the next player's point of view -- this removes three mouse clicks from the former flow.

Mac Interface modernization
In previous versions of Vassal, the Mac version did not use modifier keys in the recommended way. VASSAL 3.3.3 corrects that for the default interface: the  key will now be the normal "shortcut" key, and will automatically map to shortcuts that on other platforms are mapped to the   key. Likewise if a module designer on a Mac gives a piece the  shortcut, it will be shown as   on other platforms. Likewise,  + Left Click on a piece will toggle that piece in and out of a selection. Meanwhile, the  key on Mac is now set to do what it is normally supposed to do on Macs: to function as a way to generate a "right click" using the main mouse button.

For players who over the years have become "trained" to "The Old Way", there is a preference offered to restore the "Legacy" controls, which will restore the behavior of 3.2.17, etc.

We've pulled back, at least for now, the Mac Interface modifications that we trialed in 3.3.3-beta1.

Center on Opponent Moves always a player preference
In the past, the module designer controlled whether "Center on Opponent Moves" was a player preference or was "always on" or "always off" for a module. This led to lots of confusion, annoyed users, mystified module designers, etc. So we bid all that adieu! From Vassal 3.4.0, "Center on Opponent Moves" is strictly a player preference -- it will appear in the main preferences tab for every module.

Ctrl+Mousewheel Zooms In & Out on Maps
If a Map has a "Zoom Capability" component, then Ctrl+Mousewheel will now zoom in/out in addition to the other normal ways of zooming in and out.

SVG Art File dimensions
Previously VASSAL only supported SVG files if their dimensions were given in "px" (pixels). As of 3.4.0, SVG files with any of the standard "fixed" dimensions are supported. (e.g. "pt", "cm", etc).

= Notable Player-facing Bug Fixes =

Although there are many many bug fixes and performance improvements in VASSAL 3.4.0, the following is a list of some of the more important ones for module designers and players:
 * "Undo" substantially cleaned up, with at least two major bugs fixed. The Undo button's code is now quite solid. For those who've been afraid to use the Undo button in their online play, give it another try!
 * Beanshell property match expressions for Global Key Commands now evaluate e.g.  correctly to match target properties w/ issuing piece properties
 * Mouse wheel scrolls help/chart/chat windows at a more reasonable speed
 * No longer possible to accidentally band-select and move the entire contents of a Deck
 * Band-select can start on an immovable piece without being improperly turned into a drag
 * Inventory Window bug drawing piece images (especially cards) incorrectly cleaned up
 * Erratic Deck “Select Specific Cards” naming behavior cleaned up
 * + Left Click ( + Left Click on Mac)now toggles pieces in and out of selection (rather than only deselecting)
 * Global Key Commands within a Deck now apply to the correct (specified) number of pieces, rather than "All"
 * The "Drag Threshold" was broken, leading movement of even a single pixel while "clicking" to be interpreted as a drag-and-drop operation. This is now fixed with the default threshold adjusted to 10 pixels. A  preference on the main VASSAL preferences tab allows this to be adjusted to suit individual users.
 * Using Java string functions in Beanshell used to require some odd workarounds such as using  or extra parentheses  . This is no longer necessary as of Vassal 3.4.0 and you can use simply e.g.  . The old workarounds will still work.

= Additional Fixes since 3.3.3-beta1 =
 * Pulled back, at least for now, the Mac Interface changes that were trialed in 3.3.3-beta1.
 * Ctrl+MouseWheel will now zoom the map in and out (Yay sneaky new mini-features!)
 * HTML-Enable player preference for Chat Log now appears properly for pre-3.4.0 modules
 * Fixed Beanshell issues with $$ variable processing
 * Don't print "Saving game" twice when using Save As
 * Stop logging debug messages by default
 * Added inadvertently removed throws declaration for Embellishment0.getCurrentImage
 * BasicCommandEncoder.DecoratorFactory and BasicPieceFactory should have remained public
 * Fixed NPE in KeyStrokeListener.keyPressed
 * Multiline HTML labels no longer break toolbar alignment
 * VM Options file so that users who need to adjust e.g. D3D pipeline options have a place to put them
 * Editor: Prevent pasting a cut ancestor as its own child
 * Fixed NPE in Map.setup when attempting to dock main map
 * Fixed NPE in FlowView$FlowStrategy.layoutRow
 * Fixed ClassCastException: NullCommand cannot be cast to AddPiece
 * Fixed Setup stack doesn't recover from a piece build failure
 * Fixed NPE in SendToLocation.getSendLocation
 * Fixed NPE in MassPieceLoader$MyTreeTable.getCellRenderer
 * Fixed Global Options icons do not update themselves properly

= Additional Fixes since 3.4.0-beta1 =
 * Non-HTML text labels are now rendered directly at the required size rather than rendered at 100% and scaled
 * It is now possible to use SVG files with non-px dimensions
 * Improved save game write time
 * Editor: Additional fix for cut-and-paste
 * Prevent units in Zones setting OldLocationName incorrectly
 * Game refresher no longer incorrectly copies Marker state
 * SequenceEncoder.Decoder.copy should uses start offset from parent
 * Don't create new GPIDs for temporary pieceslots
 * Some characters in Text Labels were rendering poorly at 8pt on Windows in 3.3+ -- made some improvements.
 * Fixed NPE in Decorator.getOutermost caused by PlaceMarker
 * Fixed NPE in StackMetrics.merge