The hardware-controls-list container is a config.txt file entry used by the controls tag in the controller-device-list container for tni-controls-plugin assets. It provides the specification for an individual control on a hardware device (e.g. the throttle lever on a RailDriver device).
The hardware-controls-list container is a list of hardware-control subcontainers with no standalone tags. Each hardware-control subcontainer supports the following tags.
name-token desc-token type
- Type: string
- Desc: The id of a string-table entry for the localised name of the control. This string table entry will be used in the Trainz UI to refer to the control. It should be very short (i.e. one or two words).
- Type: string
- Desc: The id of a string-table entry for the localised description of the control. This string table entry will be used in the Trainz UI to give detail to the player about the control. It should be fairly short (i.e. one short sentence), and is best omitted for anything other than complex controls.
- Type: hardware-control-type (hardware-control-types.txt)
- Desc: Specifies the 'type' of this control, as follows:
- lever- A single axis lever control, like a RailDriver throttle, or some kind of slider.
- button - A button control, which will send input events for pressed, released and held, identically to a key on a keyboard.
- switch- A switch control, this is identical to a button except it has no 'held' behaviour.
Note that all of these controls support analog input in the range of 0 to 1. Controls with two or more dimensions of movement may be specified by using multiple controls. For example, a joystick/thumbstick can be represented as two levers, one for each axis. See the TNIControls documentation for more information about control input.