The data in this repo is stored in the form of Kodi add-ons. This documentation describes the schema used for these add-ons.
The add-ons consist of several files:
-
addon.xml - the add-on fluff
-
layout.png - the picture shown in the configuration GUI
-
mask.png - optional, the button mask of layout.png
-
icon.png - the thumbnail used in the GUI
-
layout.xml - the button layout and topology
-
strings.po - The names of the buttons
This schema is described by Kodi's add-on system. It includes:
- Controller ID (identical to add-on ID)
- Metadata version
- Controller name
- Internationalized controller name
- Internationalized 2-3 sentence description including release year
- Path to icon.png
- Path to layout.xml
- Image credit
Metadata version uses semantic versioning (MAJOR.MINOR.PATCH). Increment the:
- MAJOR version when you make incompatible schema changes
- MINOR version when you make schema changes in a backwards-compatible manner, and
- PATCH version when you make data changes.
Transparent image of the controller. Recommended size 1024x1024.
Unused currently. Same dimensions as layout.png.
Possible use of this is to generate a costmap for automatic line placement.
Opaque image of the controller. This should be the transparent image against background.png in the textures
folder. Recommended size 512x512 as per Kodi add-on rules.
This file describes the button layout and topology (how controllers connect to each other). The root <layout>
tag contains the following attributes:
- Path to layout.png
- Path to mask.png
The button layout is given by <category>
tags. Categories are groups for buttons shown in the controller mapping window. Categories have the following attributes defined in categories.po:
- Category name
- Internationalized name
- Category description
- Kodi string ID
Categories contain a list of features. Each feature has the following attributes:
- Feature name
- Internationalized name
- Feature type
- Input type (analog or digital, defaults to analog)
The following feature types are available:
button
analogstick
accelerometer
motor
relpointer
abspointer
wheel
throttle
key
Buttons must provide a type
attribute to specify analog or digital input.
Keys must provide a symbol
attribute to facilitate keyboard mapping. Symbols are hardware-independent virtual key representations.
See Readme-Keyboard.md for a list of symbols and their properties.
The topology is given by the <physicaltopology>
tag. This allows for hubs and daisy-chaining. It describes the physical connections possible for this controller.
Controller topologies have the following properties:
- Whether the controller provides input - true for controllers, false for hubs
- List of ports on the device
A port contains:
- Port ID (used in Kodi's Game API)
- List of controllers that the port accepts
This file contains the internationalized versions of the translatable strings above. Its format is described by Kodi's translation system.