The .c3addon file

Ashley's avatar
Medal
Construct Team Founder
Published 3 Aug, 2017
383 words
~2-3 mins

Construct 3 addons are distributed as a .c3addon file. This is simply a .zip file renamed to end with .c3addon. You can rename a .c3addon file to .zip and inspect its contents, or create a .c3addon file by zipping some files and renaming it.

Structure of a .c3addon file

The files in a .c3addon for a plugin are arranged as follows. Note some features allow extra files to be added, but this is the minimal file structure for an empty plugin/behavior.

  • c2runtime/ — subfolder for Construct 2 runtime files. Normally only contains runtime.js. This can usually be the unmodified file used from an earlier Construct 2 plugin or behavior.
  • c3runtime/ — subfolder for Construct 3 runtime files.
  • lang/en-US.json — language file containing strings shown in the user interface. This is kept in a separate file to facilitate translation.
  • aces.json — JSON data file that defines actions, conditions and expressions.
  • addon.json — JSON data file with metadata about the addon.
  • icon.svg — addon icon.
  • plugin.js or behavior.js — class representing the plugin or behavior.
  • type.js — class representing an object type of the plugin, or behavior type of the behavior, in the editor.
  • instance.js — class representing an instance of the plugin, or behavior instance of the behavior, in the editor.

Specifying metadata

The basic metadata about your addon, such as its ID and type, is set in addon.json. See Addon metadata for more information.

Setting plugin information

For plugins, the detailed information about the plugin and its capabilities is set in plugin.js. See Configuring plugins for more information.

Setting behavior information

For behaviors, the detailed information about the behavior and its capabilities is set in behavior.js. See Configuring behaviors for more information.

Setting effect information

For effects, the detailed information about the effect and its capabilities is set using extra properties in addon.json. The effect itself is written in a .fx file. See Configuring effects for more information.

Defining actions, conditions and expressions

To define your plugin or behavior's actions, conditions and expressions (ACEs), they must be specified in aces.json and the corresponding language strings added in en-US.json. (Currently the language file must be in US English, but the fact it is in a separate file will help facilitate translation in future.)

For more information see Defining actions, conditions and expressions.

All Contributors

  • Ashley's avatar
    Ashley
    Last edited 26 Apr, 2018
    ~4,791 chars in 8 edits
  • Tom's avatar
    Tom
    Last edited 3 Aug, 2017
    ~3 chars in 3 edits