# VASSAL Reference Manual

Home > Module > Game Piece Palette > Game Piece > Dynamic Property

## Dynamic Property

This trait attaches a Property to a Game Piece and allows you to define commands to change the value of the property during play.
Name: The name of the property. Any other trait of this piece can reference this name in an Expression or Message Format to check or display its value.
Value: The value of the property at the start of a new game or when a piece is first created.
Is Numeric? If true, then changes to the value of the property will be restricted to integer values.
Minimum Value: Numeric values will be restricted to no less than this number whenever an Increment numeric value or Prompt user operation is performed. Note that Set Value Directly operations will not honor this constraint.
Maximum Value: Numeric values will be restricted to no more than this number whenever an Increment numeric value or Prompt user operation is performed. Note that Set Value Directly operations will not honor this constraint.
Wrap Around If true, then when incrementing this numeric property, values will wrap around from the maximum to the minimum and vice versa.
Key Commands Adds any number of commands to the right-click context menu for this Game Piece. Click the New button to add a new command and the Remove button to remove one. For each command:
Menu Command: Right-click context menu item that will initiate this operation (can be left blank if only the Key Command portion is to be used).
Key Command: Key Command or Named Key Command that will initiate this operation.
Type: Select the way in which this command will change the property:

- Set value directly: Set the property directly to the value of the Expression entered in the New Value field. Note: When setting the value of a numeric property directly with this option, the Minimum/Maximum constraints are not honored.
- Increment numeric value: Increment the value of the property by the value of the Expression entered in the Increment by field. Maximum/Minimum constraints will be honored.
- Prompt user: Pop up a dialog and ask the player for a new value for the property. They will be prompted for a new value using the text prompt entered in the Prompt field.
- Prompt user to select from list: Similar to Prompt User but displays a list of items to select from in a drop-down menu. The items in the list can be generated dynamically by Expressions.

SEE ALSO: Marker, Set Global Property