# Conditions Object ```json { "require": ["some-addon"], "companion": ["another-addon"], "exclude": ["incompatible-addon"] } ``` ## Optional properties All addons in the arrays are specified as addon IDs or namespaced addon IDs. They all need to be specified as optional relations in this version. ### require This is an array of addon IDs, which are required for this relation or file and must be present. ### companion This is an array of addon IDs which go together with this relation/file. This field is fairly complex. The `companion` field is used to represent a relation between an optional file/relation, and an optional relation. This means, if one of them isn't optional, an error occurs. The behaviour can be summarized as such: 1. The relation/file that declares companions is only installed if all companions are also installed. 2. A relation that is a companion also will not be installed, unless **all** files/relations of that relation declare it as a companion are also installed. This can be described as the relation and the relation/file that is a companion of the relation requiring **eachother**. The reason this isn't done by declaring a `require` condition both on the addon/file and the file, is that files cannot be referenced, as only addon-ids are used.
Name | Type | Installed if | Flags | Conditions |
---|---|---|---|---|
companion-relation | relation | example-file is installed | ```json ["optional"] ``` | ```json {} ``` |
example-file | file | companion-relation is installed | ```json ["optional"] ``` | ```json { "companion": [ "companion-relation" ] } ``` |