Skip to content
On this page

The config.json file

TIP

We will use our hello-world-addon to explaine this file!

This file describes the data structure and fields used within RTILA for the user to input its value and configure the said Custom Command.

Example

json
{
  "role": "variable",
  "type": "hello-world-addon",
  "label": "Hello",
  "description": "Nice Hello Command!",
  "defaultValues": {},
  "fields": []
}

Role

role is an important attribute in the RTILA config file of custom command because this will help RTILA define and give you access to a global variable that you need in script.js.

json
// config.json
{
  "role": "variable", // action,events,variables,conditions
  .....
}

IMPORTANT

role is a important attribute in custom command please check!

Type

Type is the same name that the folder of custom command have.

json
{
    ....
    "type": "hello-world-addon",
    ....
}

IMPORTANT

The "type": "hello-world-addon" need always to be the same name of your custom command folder name.

Label

The label in config.json is the name that appears in RTILA as a name of command. You can modify this label within RTILA. If the role of your custom command is variables, the label name will be the variable's name. Refer to the "Getting Started" guide for more information. Link to the guide

json
{
    ....
    "label": "Hello",
    ....
}

Description

Define a description is a good practice because it helps to clearly describe what your custom command does.

json
{
    ....
    "description": "Nice Hello Command!",
    ....
}

DefaultValues

defaultValues is an object that contained all default values of your fields as a key:value pairs. Link to fields in RTILA

json
{
    ....
    "defaultValues": {},
    ....
}

fields

fields is a array of objects that descrip the fields that you need in your custom command!

json
{
    ....
    "fields": []
    ....
}

INFO

For more information about fields and how you can define there default values in config.json Link to fields