VASSAL Reference Manual
Home > Module > Game Piece Palette > Game Piece > Report Action
Report Action
A Game Piece with this trait will report a configurable message to the Chat Log in the main window when any of a given set of Keystrokes or Named Commands are either typed or activated by other traits.
Note
|
Note that the Chat Log now supports bold text, italicized text, and even colored text and . See the Chat Log article for full details. |
IMPORTANT: When HTML is enabled in the chat log, it is important to remember that the <
character will be interpreted as the beginning of an HTML tag, rather than simply displaying a "less than" or "left angle bracket" symbol. Thus, modules which use the <
symbol to indicate "less than" or to "draw an arrow" or enclose a username, etc., will need to have those instances changed to <
(the HTML escape code which causes a literal <
character to be printed). Otherwise, you may
experience odd behaviors such as chat log messages failing to appear (or seeming to be delayed until the next chat message is printed).
Troubleshooting: (If a Report Action trait doesn’t seem to be showing a message)
-
Check to make sure that the Map where the piece is located has its Auto-report format for units modified on this map field set to include the string $message$ since otherwise Report Action traits will not generate messages for pieces on that map.
-
If the Report Action trait is activated by a Global Key Command, then it will only generate a message if the Global Key Command’s Suppress individual reports field is not checked.
EXAMPLE: A unit named "Infantry" has a single Layer trait that is activated with a Ctrl+F "Flip" command. By adding a Report Action trait with report key Ctrl+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 Invisible trait activated by Ctrl+I , then an additional Report Action trait with report key Ctrl+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 Ctrl+] and report-previous key Ctrl+[ and cycling messages $newPieceName$ rotates to face North, etc., will automatically report the appropriate facing.
|
Simple Report, Single Message Adding Multiple Cycling Messages *Bold*, Italicized, and Colored text are supported. Using a Beanshell expression to generate a report |
SEE ALSO: Chat Log