DEVICECONFIG XML PROPERTIES

The DeviceConfig.xml file is used to determine how different device profiles will be displayed within the UI. Each device input package should only ever have one of these files, and it must always be named "DeviceConfig" for the simulation to recognize it.

 

This file is created automatically for you when you use The Input Device Editor, and a such, this page is provided purely for reference and all edition of the file should be done using the editor to ensure that it is set up correctly. Please see the following page for more information on how to do this:

 

The DeviceConfig.xml file has the following schematic structure:

<?xml version= "1.0" encoding= "utf-8" ?>
<DeviceConfig>
    <!-- List Of Devices -->
    <Device [attributes] />
    <Device [attributes] />
    ...
    <!-- List Of Devices And Associated Icons-->
    <Device [attributes] >
        <MergeIcons [attibutes]/>
        <MergeIcons [attibutes]/>
        ...
        <!-- List Of Device Inputs And Associated Translations-->
        <ButtonTT [attibutes]/>
        <ButtonTT [attibutes]/>
        ...
    </Device>
    ...
</DeviceConfig>

 

 

<DeviceConfig>

This is a container element where you will place one or more <Device> sub-elements. This element has no attributes.

 

 

<Device>

This element is a sub-element of <DeviceConfig> and is used to setup a specific device definition for use in the simulation UI. If the device has no icons then the element is self-closing, otherwise it will have one or more <MergeIcons> sub-elements. Note that if the device is Keyboard or Mouse then you cannot use the <MergeIcons> sub-element as these inputs will always use the default UI icons.

 

It can have the following attributes:

 

Attribute Description Type Required
ProductID

This is the product ID for the device being defined. The ID should be formatted as a hexadecimal value, prefixed by "0x". You can find the product ID from the Input Device Editor. For example, if the Product ID is 767 you would have:

ProductID="0x02FF"
String Yes
Platform

This sets the platform(s) that the device can be used on. If the device can be used on all platforms, this attribute can be omitted, otherwise you can use one of the following strings to limit the device to that platform:

  1. "PC"
  2. "XBOX"
  3. "PLAYSTATION"
  4. "PC, XBOX"
  5. "PC, PLAYSTATION"
  6. "XBOX, PLAYSTATION"
  7. "ALL"
String No
CompositeID This is the composite ID for the device being defined, expressed as an integer. You can find the composite ID from the Input Device Editor. Integer No
DisplayName This is the name of the device that will be displayed in the UI. String Yes
TextureFolder This is the relative path to the texture folder where the required images and optional icons can be found. Each device requires a unique folder which should be named the same as the Input Configuration XML file. String Yes
Priority This sets the priority in the UI for the device profile, expressed as an integer, where a lower value will represent a higher priority in the UI list. If this attribute is not included, then the default priority is 0. Integer No

 

 

<MergeIcons>

This is a sub-element of <Device> and is used to define one or more icons that can be used to represent a button, axis or slider on the device being defined. The icons to be used should be placed within the folder defined in the <Device> attributes. It is recommended that you have a merge icon tag for every input on the controller, although it is assumed that you will assign the same icon to multiple inputs (for example, a single "Left Stick" icon can be assigned to the left stick +X, -X, +Y and -Y inputs).

 

This element can have the following attributes:

 

Attribute Description Type Required
SourceIcons

A combination of "keys" which represent specific in-sim actions. These "keys" will be bound to the target icon and localised text. See the Device Keys section for more information. For multiple keys, they should be concatenated using &amp; symbol, for example:

SourceIcons="R-STICK LEFT&amp;R-STICK RIGHT"
String Yes
TargetIcon

This is the name of the SVG file that should be linked to the source icon key. The name is given without the file extension, for example, the file R-STICK_1.svg would be given as:

TargetIcon="R-STICK_1"
String Yes
TargetTT

This is a localisable string that describes the action/icon. It is used as a fallback for those times when the icon cannot be displayed, and will not generally be shown in the simulation (but should still be supplied). For example:

TargetTT="TT:INPUT.GAMEPAD.ANALOGLEFT"

or

TargetTT="Analogue Left Stick"

Note that if you do not have a *.loc file or have not localised the inputs, then you can leave this blank, or - preferably - add a string with an English description. Also note that if a text description is required by the simulation for any input, then the <ButtonTT> will be used.

String Yes

 

 

<ButtonTT>

This is a sub-element of <Device> and is used to define one or more localisable strings that represent a button, axis or slider on the device being used. These strings are used in the simulation when an icon is not appropriate or hasn't been defined, and there should be one <ButtonTT> for every input on the device. For example, if the device has a joystick, you should have 4 <ButtonTT> for up / down / left / right, or if there is a slider, there should be two <ButtonTT> for slider up and slider down, etc...

 

It can have the following attributes:

 

Attribute Description Type Required
buttonId This is the ID string of the button that you want to describe. String Yes
TT This is the description of the button. If you have a *.loc file then you can use the TT:[string] format, otherwise the button should be described in English. String Yes

 

0/255