Plugin Registry

Information on the registry.json file. All Plugins must be registered on registry.json if it is to be searchable with the client.
The Plugin Registry can be found on GitHub Deeeep-Reef-Client/plugins-api.

To be registered, information about the plugin must be added under "list" in registry.json, in the below format:

{
    "name": "Your Plugin Name",
    "id": "a-unique-id",
    "type": "plugin **OR** theme",
    "description": "Your plugin description",
    "author": "Your name"
    "version": "Any string"
    "license": "Any string OR template"
}

Explanation:

  • name: Name of your Plugin or Theme
  • id: Unique identifier of your Plugin or Theme
  • type: Either "plugin" or "theme". Purpose is self-explanatory.
  • description: A short description of the Plugin or Theme. Will show up in the search function.
  • author: Your name.
  • version [Optional] [Plugin Only]: A string containing the version of your Plugin. Optional, but required for the Plugin Auto Updater to work..
  • license [Optional] [Plugin Only]: A string containing the license for the Plugin. If not specified, the Plugin will be implicitly licensed under the Unlicense. Include a proprietary license if you wish to do so. By contributing a Plugin, you agree that the Deeeep.io Reef Client Project's distributing of your Plugin will in no way violate your License, and if not, grant express permission for the Project to do so.
    Can optionally specify a Template:
    • <TEMPLATE_GPL-3.0>: The GNU General Public License v3.0
    • <TEMPLATE_LGPL-3.0>: The GNU Lesser General Public License v3.0
    • <TEMPLATE_MIT>: The MIT License. Name and year automatically filled.
    • <TEMPLATE_Apache-2.0>: The Apache License v2.0./li>
    • <TEMPLATE_BSD-3-Clause>: The 3-Clause BSD License. Name and year automatically filled.
    • <TEMPLATE_BSD-2-Clause>: The 2-Clause BSD License. Name and year automatically filled.
    • <TEMPLATE_ISC>: The ISC License. Name and year automatically filled.
    • <TEMPLATE_Unlicense>: The Unlicense. This is the default.
    Optional.

Furthermore, a directory must be created in the /plugins folder corresponding to the ID of your plugin.
A file must be created in the directory with a name of plugin.json which will contail your plugin/theme. The format of plugin.json will be detailed in the following sections.
Assets required for the plugin or theme will be hosted on GitHub Pages, at https://deeeep-reef-client.github.io/plugins-api/[PLUGIN ID].

Script Plugins

This is the required format of plugin.json if you are creating a Script Plugin (plugin that executes code).

Explanation:

Under key "src", insert an array of scripts.
Scripts should consist of a "type" key, specifying the type of the script and the "src" key, specifying the JS source of the script.
The script types are:
  • startup: Executes the source on client startup in index.js
  • preload: Executes code on preload.js startup
  • game: Executes code on game start in browser context (has access to game.* API but not preload)
  • domloaded: Executes code on DOM loaaded in preload.js
  • appstart: Executes code on Electron App start in main.js
  • install: Executes code on plugin install in preload.js
  • uninstall: Executes code on plugin uninstall in preload.js
  • update: Executes code on plugin update in preload.js

{
    "name": "Your Plugin Name",
    "id": "a-unique-id",
    "description": "Description of your plugin",
    "author": "Your name",
    "src": [
        {
            "type": "Script type (see above)"
            "src": "JavaScript code to be executed"
        }
    ]
}

Plugin User Data

Plugins are encouraged to store configuration and data in settings.pluginUserData[<name of plugin>]. Such a key will automatically be created upon plugin installation and deleted upon plugin uninstallation as an empty object. Any data structuring can be done with an Install script.

Auto Updater

There is an optional auto updater for plugins. This will compare the version key of the Registry with the version of the installation, and install the plugin if the versions do not match. The "update" Script type can be used to run reinitialisation procedures.

Theme Plugins

This is the required format of plugin.json if you are creating a Theme Plugin (a theme on the Theme Maker).
This is the exact format generated by the Theme Maker export function, so it is only neccessary to rename the file to plugin.json

  • name: Name of your theme
  • src: CSS source of your theme
  • themedata [Optional]: Allows the theme to be edited with the Theme Editor. This is automatically generated by the theme maker.
    Keys and expected values are currently (purpose is self explanatory): bgImage (URL), loadingBgImage (URL), modalBgColour (hexadecimal), modalTextColour (hexadecimal), modalTransparency (number, 0-10), loadingIconImage (URL), loadingBarColour (hexadecimal)
  • themetype [Optional]: Specifies whether the theme is a regular theme or an Advanced Theme (a theme that can specify JavaScript code to be executed). If themetype does not exist or is any value other than advancedtheme, it will be assumed to be of type theme.
  • script [Optional]: If themetype is advancedtheme, it will be evaluated on domloaded or on theme selection.
{
    "name": "Name of your theme",
    "src": "CSS source",
    "themedata": {},
    "themetype": "theme OR advancedtheme",
    "script": "String of script if themetype is advancedtheme"
}

Licensing

You can specify a license in the Registry. Do note that plugins without an explicit license are implicitly licensed under the Unlicense.
.
Furthermore, the Deeeep.io Reef Client should be able to distribute the plugin withot violating the license, or grant the DRC Project express permission to do so