Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Plugin manifest (temp page)
Specifying which plugins to load (new, unfinished)
Plugins are loaded from a file that lists all plugins. This is called a plugin manifest. Listed in this file are all plugins to load, in the form of individual files, directories to search and other manifest to include.
Plugin configuration files are named
name is the name you want to give the plugin; although this doesn't have to match the name specified in the configuration file, it is recommended to use similar names. This name is used in the manifest when adding specific plugins and is used to uniquely identify plugins during loading.
A plugin's configuration file could look like this:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <plugin> <!--The name that will be used by administrative console commands. Keep it simple and short, but unique--> <name value="Killer Plugin"/> <!--A short description for the plugin.--> <description value="A plugin that will blow you away"/> <!-- Uncomment this to enable debug features Scripts are included in the order that they are specified here, so including this first enabled the debug features used by the main script <script name="KillerPluginDebug.as/> --> <script name="KillerPlugin.as"/> <!-- Minimum lifetime for the plugin. Controls when plugins are unloaded or reloaded when a server operator requests it. Available options are: HOTRELOADABLE: can be unloaded/reloaded at any time. MAP: unloaded/reloaded when a new map starts. SERVER: once loaded, will never be unloadable or reloadable. Always loaded when a new map starts. If not specified, defaults to HOTRELOADABLE. Plugins can specify the minimum required lifetime for themselves, and some API calls may increase the lifetime as needed to ensure that API functionality works as expected. --> <lifetime value="HOTRELOADABLE"/> <!--Console command namespace to prepend to any commands registered by this plugin. Used to distinguish between identically named commands in different plugins.--> <concommandns value="foo"/> <!-- Command line to pass to the plugin. The plugin will be able to retrieve these as a list of keyvalue pairs Allows for more advanced configuration of the plugin in a manner specific to the plugin itself Plugins can choose to process this for cvars, a helper function is provided in "scripts/util/CVarUtils.as", named cvar::ProcessCommandline. arguments is optional, if not specified it defaults to an empty command line Quoted values are considered as a single token Note that quotes must be added using " due to XML parsing limitations --> <commandline arguments=".mycvar="Hello World!" .mycommand="disable_kills""/> </plugin>
Note that the name specified in the configuration file must also be unique, if two or more plugins have conflicting names the first listed plugin is used, and the other ignored.
Manifest files are named
name is the name of the manifest, used with the
manifest element to add others.
The format of the manifest is as follows:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <plugins> <!--Add a single plugin--> <file name="cool_boy/KillerPlugin"/> <!--Look for all *.plugin.xml files in the given directory--> <directory path="cool_guy"/> <!--Add a plugin and pass additional command line arguments that are appended to any specified in the config file--> <file name="cool_girl/ComplexPlugin"> <!-- Specifies a command line for the plugin arguments is optional, if not specified it defaults to an empty command line action is optional and can be one of the following: replace: Default. If a command line is specified, even if empty, it will replace the command line specified in the plugin configuration file append: Append arguments to the existing arguments, with a space automatically added. prepend: Prepend arguments to the existing arguments, with a space automatically added. merge: Replace any existing arguments with keys matching those specified here, append remaining arguments. --> <commandline arguments="remove_all_weapons=true" action="append"/> </file> <!--Add all plugins listed in the given manifest.--> <manifest name="some_other_manifest"/> </plugins>
Any number of files and directories may be listed in the file. If multiple plugins have the same name, the duplicates are ignored.
Plugins are loaded after all manifests have been loaded.
You cannot add the same manifest multiple times; if a manifest includes a manifest already included elsewhere -or one of its parents- it will be ignored.
By default, plugins are loaded from the file
default.pluginmanifest.xml. This file is located in the main mod directory.
To load another file, set the cvar
as_plugin_manifest_file to the name of another file. This allows you to host multiple servers using the same mod installation while using different plugins on them.