Plugin System

Plugin File Format

Plugin Directory + enabled + cml.config --Any other files/folders--

Plugin Directory : The name of the directory will be interpreted as the name of your plugin.

enabled : An empty file that (if it exists) makes your plugin enabled by default.

cml.config : This plaintext file is used to let CML know how and when to run your plugin. See the Config File heading for more information.

Any other files/folders : CML will disregard all files besides those mentioned above.

Config File 

Lines that do not contain a  are considered to be arguments to pass during execution. See below for more info.

Lines that contain a  are considered to be properties. See below for more info.



Arguments

Exceptions:

- For plugins that replace a section of code (Shorthand for )

- For plugins that launch on startup (E.g. backup manager)

- Handles mods prior to being applied (Shorthand for )



Replaced at runtime:

or  - Gets replaced by the plugin's working directory

or  - Gets replaced by the plugin's working directory (with surrounding quotes)

- Gets replaced by the version of SM that the user is using, as determined by hashing the EXE file.

Properties

- Relative path to the executable file (if applicable).

- Relative path to the FXML file (if applicable).

- Gives the method of execution. See Execution for more.

- /  property to set whether this plugin is a hook. [Default: ]

- / . property to set whether this plugin is a handler. [Default: ]
 * When  is , the arguments are effectively appended with   - the input and output files, respectively.
 * If the handler wishes to ignore the file given, it may write a file to . If it is a directory, then CML uses this directory instead of the original mod's directory.

or  - Adds the section after the colon to the list of arguments.

- URL to the plugin's info page. If not supplied, the button will be disabled.

- URL to the plugin's help page. If not supplied, the button will be disabled.

- URL to the plugin's image.

- The display name of the plugin.

- The author(s) to display on the plugin screen.

- A description of the plugin. Use  instead of newline characters.

Execution

The  property has some special properties.



Special properties

If an  exists:
 * files automatically use  unless the   value is set.
 * The end result is.

If an  exists:
 * Execution has no effect.

If no  or   exists:
 * The end result is.



Special keywords

- Replaced by the plugin's working directory at runtime.



Example

Inside of a plugin named "Test Plugin,"  will run the command:.