Jump to: navigation, search

VASSAL Reference Manual

Home > Module > Game Piece Palette > Game Piece > Report Action

Report Action

A Game Piece that has this trait will report a configurable message to the main controls chat window when any of a given set of key commands are entered.

'Report on these keystrokes:   Specifies the keys that this trait will respond to.   Hit the Add button to specify more than one key.
Cycle through different messages:   If left unchecked, the same message will be reported whenever any of the above keys are pressed.   If checked, the message to be reported will cycle through the list specified below.   Each time one of the keys if pressed, the next message in the list will be reported, returning to the beginning after the end is reached.
Report Format:   The  Message Format for reporting non-cycling messages:  
menuCommand is the name of the piece's right-click menu command that corresponds to the control key pressed, oldPieceName is the name of the piece before the action is applied, newPieceName is the name of the piece after the action is applied,   mapName is the name of the map where the piece is located, oldMapName is the name of the map before the action, location is the map location where the piece is located, oldLocation is the location before the action is applied. Note: if a piece is deleted or replaced as the result of an action, then the value of oldLocation and oldMapName will depend on the order of the traits, while mapName and location will be blank.

Message Formats:   a list of Message Formats for cycling messages.   Available variables are the same as above.   Any Properties defined on the piece will be substituted.   To access the value of a Property before the change, add old to the name.   For example, if a piece has a property hitPoints, then $hitPoints$ gives the value after the key command and $oldhitPoints$ gives the value before.'''''''''''''''''

Report previous on these keystrokes:   When any of these keys are pressed, the message reported will be the one the precedes the last reported message, instead of the following one.

EXAMPLE:   A unit named 'Infantry' has a single layer that is activated with a CTRL-F "Flip" command.   By adding a Report Action trait with report key 'F' and message $newPieceName$ flips in $location$ the chat text will echo "Infantry flips in A9" whenever a player flips the unit.

EXAMPLE:   If the unit above has the Can be Invisible   trait activated by CTRL-I, then an additional Report Action trait with report key 'I' and two cycling messages $oldPieceName$ goes invisible in $location$   and $newPieceName$ revealed in $location$ will report when the unit becomes invisible/revealed.

EXAMPLE:   If the counter above has the Can Rotate trait with 4 facings controlled by CTRL-] and CTRL-[, then an addition Report Action trait with report key ']' and report-previous key '[' and cycling messages $newPieceName$ rotates to face North, etc., will automatically report the appropriate facing.