Key Command pieces ending move on map: Map specific OR Filter for map?

Howdy,

What are the relative merits and drawbacks of the styles of issuing a Key Command to a piece ending movement on a map?

The piece receiving the command could be ending its movement on one of several maps in the module, and different actions are desired depending on which map the movement ends.

I’m currently thinking of two ways (or styles) of doing this:

  1. Each map issues its own Key Command, for example MapA issues “OnMoveMapA”. Then the pieces have traits such as Trigger Actions that listen for such commands to perform the desired action depending on the command received. OR

  2. All maps issue the same command such as “OnMove”, and the pieces have traits such as Trigger Actions with a Trigger when properties match expression that filters for which map the piece ended its movement on to determine which action to perform.

So for style 1 a Trigger Action could be watching for a list of possible Key Commands. For style 2 a Trigger Action could have a rather complex property match expression filter.

As I write this I’m thinking that style 1 would likely be easier to construct, interpret and debug.

I would appreciate the thoughts and comments from experienced module designers.

1 Like

I started Vassal work on a module that had a single movement key command on all maps. As I started expanding the functionality, I soon found it useful to have distinct key commands for each map - for the reasons you give; easy to debug, less load on the pieces (the key command tells you where you are without a further check) etc.

The exception is when a set of maps share functionality. Hand windows are a good example. For those, I generally have the same map movement key command and functional differences are mediated through each map’s global properties, distinct Global Hotkeys (since v3.7 provides Action Buttons on maps) etc.

1 Like