To port a Construct 2 plugin or behavior to Construct 3, use the following checklist.
- Start by copying the template SDK to a new folder.
- You can directly copy the runtime.js from your Construct 2 addon to c2runtime/runtime.js. Usually the runtime script does not require any modifications.
- Update the addon metadata in addon.json.
- Update the icon. An SVG icon is preferable. The .ico files Construct 2 uses are not supported in Construct 3, but you can use a PNG icon. Just delete icon.svg, add icon.png, and call
this._info.SetIcon("icon.png", "image/png"); in the plugin/behavior constructor.
- Update the plugin/behavior constants and identifiers in plugin.js/behavior.js, type.js and instance.js, as described in configuring plugins/configuring behaviors.
- Match your Construct 2 addon's configuration by making calls to IPluginInfo/IBehaviorInfo in the addon constructor. For example if your Construct 2 plugin was a single-global plugin, the Construct 3 plugin should call
this._info.SetIsSingleGlobal(true); in the plugin constructor.
- Add equivalent properties as the Construct 2 addon has. See Specifying plugin properties in configuring plugins. (The process is identical for behaviors.)
- Create corresponding action, condition and expression definitions. See defining actions, conditions and expressions. The key point to ensure Construct 2 projects using your addon can be imported to Construct 3 is:
- Give every action, condition and expression a new
id based on a string
- Also set the
c2id property to the corresponding numeric ID that the Construct 2 addon used
- Update the language file to contain the UI strings for the addon, properties, and ACEs.
- Consider porting the runtime script to the C3 runtime.
Once complete, zip all the addon files and rename the .zip to .c3addon. You should now have a addon you can install via the Addon Manager in Construct 3.