Skip to content

Plugins

Gregory Smith edited this page Jul 1, 2023 · 3 revisions

Beginning with version 0.23, Aleph One supports plugins. These are an easier way to install MML, solo scripts, enhanced HUDs, and themes. To install a plugin, simply copy it into the scenario's Plugins directory. If no Plugins directory exists, create one.

You can create a plugin by creating a folder hierarchy:

  • My Sample Plugin
    • Plugin.xml
    • Sample.mml
    • resource.png

and writing a simple Plugin.xml:

<?xml version="1.0"?>
<plugin name="Sample" description="A sample plugin" version="1.0">
  <mml file="Sample.mml"/>
</plugin>

All resources will be loaded from the "My Sample Plugin" directory. You can then zip the "My Sample Plugin" folder, and drop it in any Aleph One Plugins folder.

Overrides

  • Solo Lua plugins can be overridden by checking the "Use Solo Script" checkbox
  • Theme plugins will override the current theme setting

Order

  • All MML Plugins are run in alphabetical order, based on their name
  • Only one solo Lua plugin can be run at once; the engine will run the last one in the list that is enabled (only in solo games)
  • Only one HUD Lua plugin can be run at once; the engine will run the last one in the list that is enabled
  • Only one Theme plugin can be active at once; the engine will use the last one in the list that is enabled
  • MML for solo Lua, HUD Lua, and Theme plugins is only run for the active solo Lua, HUD Lua, or Theme plugin

Plugin.xml

Plugin.xml recognizes the <plugin> tag and its children, the <mml> and <shapes_patch> tags. There can be multiple <mml> and <shapes_patch> tags.

  • <plugin>
    • name="..." - the name of this plugin
    • description="..." - a short description of the plugin
    • version="..." - for display purposes only
    • minimum_version="..." - the minimum Aleph One date version (e.g. 20091015) required to run this plugin. If the version is not new enough, the plugin will be disabled
    • hud_lua="..." - enhanced HUD Lua script file to run
    • solo_lua="..." - solo Lua script file to run
    • theme_dir="..." - directory to load theme from
    • <mml> - include as many as needed
      • file="..." - MML file to load
    • <shapes_patch> - include as many as needed
      • file="..." - shapes patch to load
      • requires_opengl="true" - shapes patches that require OpenGL will not be loaded when the software renderer is active
    • <scenario> - include as many as needed; if given, the plugin will only be loaded for listed scenarios. All fields must exactly match scenario MML.
      • name="..."
      • id="..."
      • version="..."
Clone this wiki locally