## VASSAL Reference Manual

Home > Module > Game Piece Inventory Window

### Game Piece Inventory Window

Places a button in the module’s Toolbar. Clicking the button will open a window that organizes and summarizes the pieces in the game in a tree view (similar to browsing a file system, or indeed the VASSAL Editor). You can define exactly which pieces are included in the window and how they are organized. Name: The name that appears in the window title bar. Button Text: Text for the button on the module’s Toolbar. Hotkey: Keyboard shortcut or Named Key Command for the Toolbar button. Tooltip: Mouse-over tooltip for the Toolbar button. Show only pieces matching these properties: A Property Match Expression to filter which Game Pieces appear in the window. The window will only summarize pieces for which the matching expression evaluates to true. Properties of the pieces can be used in the expression to create the desired set of summaries. (Examples: limit the pieces to a single map with the CurrentMap property, e.g. { CurrentMap == "Main Map" }, or only select pieces with a a given value of a Marker trait, e.g. { Type == "Infantry" }) Sort and Group By Properties: A list of Property names. Pieces with the same value of a given property will be grouped together at the same level. (Example: listing the CurrentBoard and LocationName properties will give a top-level folder for each board and a second-level folder for each location that contains a piece.) Label for folders: A Message Format specifying the text used to label each folder in the tree. The PropertyValue property gives the value of the property that defines its group (for example, CurrentBoard for the board name or LocationName for the location name). Any property of the form sum XXX will be replaced with the sum of Property XXX for all pieces within that folder. ( _Example: A Game Piece uses a Layer trait named Manpower, giving it an automatic property named Manpower_Level. Using the sum_Manpower_Level property in the folder label will report the total manpower for all pieces inside that folder. Show only folders: If selected, then individual pieces within a folder will not be shown in the view. Label for pieces: A Message Format specifying the text used to label each piece in the tree. Sort: If selected, then sort pieces. Label for sort: A Message Format specifying the text by which pieces are sorted. (Example: A piece is named 3rd Bn, 4th Reg, 3rd Div; for sorting the markers $div$ $reg$ $bn$ are used rather than the pieces name) Sorting method: alpha sorts the inventory tree alphabetically, numeric by the value of the first integer found, and length uses the string length first. When two entries are equal for numeric and length, alpha is used for sorting. (Example: $id$ is the Label for sort. Three gamepieces have the ids 'a', 'aa', and 'b'. Sorting by alpha and numeric is ['a', 'aa', 'b']. Sorting by length is ['a', 'b', 'aa']. Three gamepieces have the ids 'a3', 'b2', 'c-4'. Sorting by alpha and length is ['a3', 'b2', 'c-4']. Sorting by numeric is ['c-4', 'b2', 'a3'].) Center on selected piece: If selected, then clicking on a piece in the tree will center the map on that piece. Forward key strokes to selected piece: If selected, then any keys pressed in the window will be sent as key commands to the selected piece. Selecting a folder will send the command to all pieces within that folder. Show right-click menu of piece: If selected, then right-clicking on a piece in the tree with display its context menu, which can be used to modify the piece or give it a command. Draw piece images: If selected, the tree will draw reduced-size images of the piece at the specified zoom factor. Zoom factor: The magnification factor for drawing pieces in the tree. Available to these sides: The Toolbar button will only be visible to the player sides listed here. An empty list makes the button visible to all players. |