2026-05-08 12:18:48 +00:00
2020-09-24 13:47:11 +00:00
<!DOCTYPE html>
2024-06-01 15:21:33 +00:00
< html class = "writer-html5" lang = "en" data-content_root = "./" >
2020-09-24 13:47:11 +00:00
< head >
2024-06-01 15:21:33 +00:00
< meta charset = "utf-8" />< meta name = "viewport" content = "width=device-width, initial-scale=1" />
2023-09-20 17:06:52 +00:00
2021-01-18 21:09:43 +00:00
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" />
2023-09-20 17:06:52 +00:00
< title > Type of Plugins — MO2 Python Plugin API documentation</ title >
2026-05-08 12:18:48 +00:00
< link rel = "stylesheet" type = "text/css" href = "_static/pygments.css?v=b86133f3" />
< link rel = "stylesheet" type = "text/css" href = "_static/css/theme.css?v=e59714d7" />
< link rel = "stylesheet" type = "text/css" href = "_static/graphviz.css?v=4ae1632d" />
2024-06-01 15:21:33 +00:00
2020-09-24 14:17:15 +00:00
< link rel = "shortcut icon" href = "_static/mo2.ico" />
2026-05-08 12:18:48 +00:00
< script src = "_static/jquery.js?v=5d32c60e" ></ script >
< script src = "_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c" ></ script >
< script src = "_static/documentation_options.js?v=5929fcd5" ></ script >
< script src = "_static/doctools.js?v=9bcbadda" ></ script >
< script src = "_static/sphinx_highlight.js?v=dc90522c" ></ script >
2023-09-20 17:06:52 +00:00
< script src = "_static/js/theme.js" ></ script >
2020-09-24 13:47:11 +00:00
< link rel = "index" title = "Index" href = "genindex.html" />
< link rel = "search" title = "Search" href = "search.html" />
< link rel = "next" title = "Writing Plugins" href = "writing-plugins.html" />
< link rel = "prev" title = "Setting up the environment" href = "setup-tools.html" />
</ head >
2023-09-20 17:06:52 +00:00
< body class = "wy-body-for-nav" >
2020-09-24 13:47:11 +00:00
< div class = "wy-grid-for-nav" >
< nav data-toggle = "wy-nav-shift" class = "wy-nav-side" >
< div class = "wy-side-scroll" >
< div class = "wy-side-nav-search" >
2023-09-20 17:06:52 +00:00
< a href = "index.html" class = "icon icon-home" >
MO2 Python Plugin API
2020-09-24 13:47:11 +00:00
</ a >
< div role = "search" >
< form id = "rtd-search-form" class = "wy-form" action = "search.html" method = "get" >
2023-09-20 17:06:52 +00:00
< input type = "text" name = "q" placeholder = "Search docs" aria-label = "Search docs" />
2020-09-24 13:47:11 +00:00
< input type = "hidden" name = "check_keywords" value = "yes" />
< input type = "hidden" name = "area" value = "default" />
</ form >
</ div >
2023-09-20 17:06:52 +00:00
</ div >< div class = "wy-menu wy-menu-vertical" data-spy = "affix" role = "navigation" aria-label = "Navigation menu" >
< p class = "caption" role = "heading" >< span class = "caption-text" > Contents:</ span ></ p >
2020-09-24 13:47:11 +00:00
< ul class = "current" >
< li class = "toctree-l1" >< a class = "reference internal" href = "setup-tools.html" > Setting up the environment</ a >< ul >
< li class = "toctree-l2" >< a class = "reference internal" href = "setup-tools.html#required-tools" > Required tools</ a ></ li >
< li class = "toctree-l2" >< a class = "reference internal" href = "setup-tools.html#preparation" > Preparation</ a >< ul >
< li class = "toctree-l3" >< a class = "reference internal" href = "setup-tools.html#get-the-mobase-stubs" > 1. Get the < code class = "docutils literal notranslate" >< span class = "pre" > mobase</ span ></ code > stubs</ a ></ li >
< li class = "toctree-l3" >< a class = "reference internal" href = "setup-tools.html#configure-visual-studio-code-for-mobase" > 2. Configure Visual Studio Code for < code class = "docutils literal notranslate" >< span class = "pre" > mobase</ span ></ code ></ a ></ li >
2021-02-26 18:26:36 +00:00
< li class = "toctree-l3" >< a class = "reference internal" href = "setup-tools.html#optional-configure-black-to-auto-format-your-source-files" > 3. [Optional] Configure < code class = "docutils literal notranslate" >< span class = "pre" > black</ span ></ code > to auto-format your source files</ a ></ li >
2021-01-18 21:09:43 +00:00
< li class = "toctree-l3" >< a class = "reference internal" href = "setup-tools.html#optional-automatically-reload-plugins-during-development" > 4. [Optional] Automatically reload plugins during development</ a ></ li >
2020-09-24 13:47:11 +00:00
</ ul >
</ li >
< li class = "toctree-l2" >< a class = "reference internal" href = "setup-tools.html#testing-the-setup" > Testing the setup</ a ></ li >
</ ul >
</ li >
< li class = "toctree-l1 current" >< a class = "current reference internal" href = "#" > Type of Plugins</ a >< ul >
< li class = "toctree-l2" >< a class = "reference internal" href = "#installers" > Installers</ a ></ li >
< li class = "toctree-l2" >< a class = "reference internal" href = "#previewers" > Previewers</ a ></ li >
< li class = "toctree-l2" >< a class = "reference internal" href = "#mod-page" > Mod Page</ a ></ li >
< li class = "toctree-l2" >< a class = "reference internal" href = "#game" > Game</ a ></ li >
< li class = "toctree-l2" >< a class = "reference internal" href = "#tool" > Tool</ a ></ li >
< li class = "toctree-l2" >< a class = "reference internal" href = "#proxies" > Proxies</ a ></ li >
< li class = "toctree-l2" >< a class = "reference internal" href = "#free-plugins" >< em > Free Plugins</ em ></ a ></ li >
< li class = "toctree-l2" >< a class = "reference internal" href = "#extension-interfaces" > Extension Interfaces</ a >< ul >
< li class = "toctree-l3" >< a class = "reference internal" href = "#diagnose" > Diagnose</ a ></ li >
< li class = "toctree-l3" >< a class = "reference internal" href = "#file-mappings" > File Mappings</ a ></ li >
</ ul >
</ li >
</ ul >
</ li >
< li class = "toctree-l1" >< a class = "reference internal" href = "writing-plugins.html" > Writing Plugins</ a >< ul >
< li class = "toctree-l2" >< a class = "reference internal" href = "writing-plugins.html#getting-started" > Getting started</ a >< ul >
< li class = "toctree-l3" >< a class = "reference internal" href = "writing-plugins.html#single-file-plugins" > Single file plugins</ a ></ li >
< li class = "toctree-l3" >< a class = "reference internal" href = "writing-plugins.html#module-plugins" > Module Plugins</ a ></ li >
</ ul >
</ li >
< li class = "toctree-l2" >< a class = "reference internal" href = "writing-plugins.html#writing-the-plugin" > Writing the plugin</ a >< ul >
< li class = "toctree-l3" >< a class = "reference internal" href = "writing-plugins.html#iplugin-interface" >< code class = "docutils literal notranslate" >< span class = "pre" > IPlugin</ span ></ code > interface</ a ></ li >
</ ul >
</ li >
2020-10-07 18:49:09 +00:00
< li class = "toctree-l2" >< a class = "reference internal" href = "writing-plugins.html#examples" > Examples</ a >< ul >
< li class = "toctree-l3" >< a class = "reference internal" href = "writing-plugins.html#tutorial-plugins" > Tutorial Plugins</ a ></ li >
< li class = "toctree-l3" >< a class = "reference internal" href = "writing-plugins.html#official-plugins" > Official Plugins</ a ></ li >
< li class = "toctree-l3" >< a class = "reference internal" href = "writing-plugins.html#unofficial-plugins" > Unofficial Plugins</ a ></ li >
</ ul >
</ li >
2021-02-06 18:58:42 +00:00
< li class = "toctree-l2" >< a class = "reference internal" href = "writing-plugins.html#internationalization" > Internationalization</ a >< ul >
< li class = "toctree-l3" >< a class = "reference internal" href = "writing-plugins.html#adding-translation-code" > Adding translation code</ a ></ li >
< li class = "toctree-l3" >< a class = "reference internal" href = "writing-plugins.html#generating-qt-translation-files" > Generating Qt translation files</ a ></ li >
< li class = "toctree-l3" >< a class = "reference internal" href = "writing-plugins.html#translating" > Translating</ a ></ li >
< li class = "toctree-l3" >< a class = "reference internal" href = "writing-plugins.html#distributing-translations" > Distributing translations</ a ></ li >
</ ul >
</ li >
2020-09-24 13:47:11 +00:00
</ ul >
</ li >
< li class = "toctree-l1" >< a class = "reference internal" href = "faq.html" > FAQ</ a >< ul >
< li class = "toctree-l2" >< a class = "reference internal" href = "faq.html#why-is-mo2-throwing-an-exception-when-i-try-to-create-a-type-inheriting-one-of-mo2-class" > 1. Why is MO2 throwing an exception when I try to create a type inheriting one of MO2 class?</ a ></ li >
< li class = "toctree-l2" >< a class = "reference internal" href = "faq.html#how-can-i-be-sure-to-implement-all-the-required-methods-when-creating-a-plugin" > 2. How can I be sure to implement all the required methods when creating a plugin?</ a ></ li >
< li class = "toctree-l2" >< a class = "reference internal" href = "faq.html#why-are-my-isinstance-x-qobject-and-isinstance-y-qwidget-not-working" > 3. Why are my < code class = "docutils literal notranslate" >< span class = "pre" > isinstance(x,</ span > < span class = "pre" > QObject)</ span ></ code > and < code class = "docutils literal notranslate" >< span class = "pre" > isinstance(y,</ span > < span class = "pre" > QWidget)</ span ></ code > not working?</ a ></ li >
</ ul >
</ li >
2024-08-09 08:57:44 +00:00
< li class = "toctree-l1" >< a class = "reference internal" href = "autoapi/index.html" > API Reference</ a >< ul >
< li class = "toctree-l2" >< a class = "reference internal" href = "autoapi/mobase/index.html" > mobase</ a >< ul >
2026-05-08 12:18:48 +00:00
< li class = "toctree-l3" >< a class = "reference internal" href = "autoapi/mobase/index.html#submodules" > Submodules</ a >< ul >
2024-08-09 08:57:44 +00:00
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/widgets/index.html" > mobase.widgets</ a ></ li >
2023-09-20 17:06:52 +00:00
</ ul >
</ li >
2024-08-09 08:57:44 +00:00
< li class = "toctree-l3" >< a class = "reference internal" href = "autoapi/mobase/index.html#attributes" > Attributes</ a ></ li >
< li class = "toctree-l3" >< a class = "reference internal" href = "autoapi/mobase/index.html#classes" > Classes</ a ></ li >
< li class = "toctree-l3" >< a class = "reference internal" href = "autoapi/mobase/index.html#functions" > Functions</ a ></ li >
< li class = "toctree-l3" >< a class = "reference internal" href = "autoapi/mobase/index.html#package-contents" > Package Contents</ a >< ul >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.BSAInvalidation" >< code class = "docutils literal notranslate" >< span class = "pre" > BSAInvalidation</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.DataArchives" >< code class = "docutils literal notranslate" >< span class = "pre" > DataArchives</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.EndorsedState" >< code class = "docutils literal notranslate" >< span class = "pre" > EndorsedState</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.ExecutableForcedLoadSetting" >< code class = "docutils literal notranslate" >< span class = "pre" > ExecutableForcedLoadSetting</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.ExecutableInfo" >< code class = "docutils literal notranslate" >< span class = "pre" > ExecutableInfo</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.FileInfo" >< code class = "docutils literal notranslate" >< span class = "pre" > FileInfo</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.FileTreeEntry" >< code class = "docutils literal notranslate" >< span class = "pre" > FileTreeEntry</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.GameFeature" >< code class = "docutils literal notranslate" >< span class = "pre" > GameFeature</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.GamePlugins" >< code class = "docutils literal notranslate" >< span class = "pre" > GamePlugins</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.GuessQuality" >< code class = "docutils literal notranslate" >< span class = "pre" > GuessQuality</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.GuessedString" >< code class = "docutils literal notranslate" >< span class = "pre" > GuessedString</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IDownloadManager" >< code class = "docutils literal notranslate" >< span class = "pre" > IDownloadManager</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IFileTree" >< code class = "docutils literal notranslate" >< span class = "pre" > IFileTree</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IGameFeatures" >< code class = "docutils literal notranslate" >< span class = "pre" > IGameFeatures</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IInstallationManager" >< code class = "docutils literal notranslate" >< span class = "pre" > IInstallationManager</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IModInterface" >< code class = "docutils literal notranslate" >< span class = "pre" > IModInterface</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IModList" >< code class = "docutils literal notranslate" >< span class = "pre" > IModList</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IModRepositoryBridge" >< code class = "docutils literal notranslate" >< span class = "pre" > IModRepositoryBridge</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IOrganizer" >< code class = "docutils literal notranslate" >< span class = "pre" > IOrganizer</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPlugin" >< code class = "docutils literal notranslate" >< span class = "pre" > IPlugin</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginDiagnose" >< code class = "docutils literal notranslate" >< span class = "pre" > IPluginDiagnose</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginFileMapper" >< code class = "docutils literal notranslate" >< span class = "pre" > IPluginFileMapper</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginGame" >< code class = "docutils literal notranslate" >< span class = "pre" > IPluginGame</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginInstaller" >< code class = "docutils literal notranslate" >< span class = "pre" > IPluginInstaller</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginInstallerCustom" >< code class = "docutils literal notranslate" >< span class = "pre" > IPluginInstallerCustom</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginInstallerSimple" >< code class = "docutils literal notranslate" >< span class = "pre" > IPluginInstallerSimple</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginList" >< code class = "docutils literal notranslate" >< span class = "pre" > IPluginList</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginModPage" >< code class = "docutils literal notranslate" >< span class = "pre" > IPluginModPage</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginPreview" >< code class = "docutils literal notranslate" >< span class = "pre" > IPluginPreview</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginRequirement" >< code class = "docutils literal notranslate" >< span class = "pre" > IPluginRequirement</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginTool" >< code class = "docutils literal notranslate" >< span class = "pre" > IPluginTool</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IProfile" >< code class = "docutils literal notranslate" >< span class = "pre" > IProfile</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.ISaveGame" >< code class = "docutils literal notranslate" >< span class = "pre" > ISaveGame</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.ISaveGameInfoWidget" >< code class = "docutils literal notranslate" >< span class = "pre" > ISaveGameInfoWidget</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.InstallResult" >< code class = "docutils literal notranslate" >< span class = "pre" > InstallResult</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.LoadOrderMechanism" >< code class = "docutils literal notranslate" >< span class = "pre" > LoadOrderMechanism</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.LocalSavegames" >< code class = "docutils literal notranslate" >< span class = "pre" > LocalSavegames</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.Mapping" >< code class = "docutils literal notranslate" >< span class = "pre" > Mapping</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.ModDataChecker" >< code class = "docutils literal notranslate" >< span class = "pre" > ModDataChecker</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.ModDataContent" >< code class = "docutils literal notranslate" >< span class = "pre" > ModDataContent</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.ModRepositoryFileInfo" >< code class = "docutils literal notranslate" >< span class = "pre" > ModRepositoryFileInfo</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.ModState" >< code class = "docutils literal notranslate" >< span class = "pre" > ModState</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.PluginRequirementFactory" >< code class = "docutils literal notranslate" >< span class = "pre" > PluginRequirementFactory</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.PluginSetting" >< code class = "docutils literal notranslate" >< span class = "pre" > PluginSetting</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.PluginState" >< code class = "docutils literal notranslate" >< span class = "pre" > PluginState</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.ProfileSetting" >< code class = "docutils literal notranslate" >< span class = "pre" > ProfileSetting</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.ReleaseType" >< code class = "docutils literal notranslate" >< span class = "pre" > ReleaseType</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.SaveGameInfo" >< code class = "docutils literal notranslate" >< span class = "pre" > SaveGameInfo</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.ScriptExtender" >< code class = "docutils literal notranslate" >< span class = "pre" > ScriptExtender</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.SortMechanism" >< code class = "docutils literal notranslate" >< span class = "pre" > SortMechanism</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.TrackedState" >< code class = "docutils literal notranslate" >< span class = "pre" > TrackedState</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.UnmanagedMods" >< code class = "docutils literal notranslate" >< span class = "pre" > UnmanagedMods</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.VersionInfo" >< code class = "docutils literal notranslate" >< span class = "pre" > VersionInfo</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.VersionScheme" >< code class = "docutils literal notranslate" >< span class = "pre" > VersionScheme</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.getFileVersion" >< code class = "docutils literal notranslate" >< span class = "pre" > getFileVersion()</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.getIconForExecutable" >< code class = "docutils literal notranslate" >< span class = "pre" > getIconForExecutable()</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.getProductVersion" >< code class = "docutils literal notranslate" >< span class = "pre" > getProductVersion()</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.GameFeatureType" >< code class = "docutils literal notranslate" >< span class = "pre" > GameFeatureType</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.INVALID_HANDLE_VALUE" >< code class = "docutils literal notranslate" >< span class = "pre" > INVALID_HANDLE_VALUE</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.MoVariant" >< code class = "docutils literal notranslate" >< span class = "pre" > MoVariant</ span ></ code ></ a ></ li >
< li class = "toctree-l4" >< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.__version__" >< code class = "docutils literal notranslate" >< span class = "pre" > __version__</ span ></ code ></ a ></ li >
2023-09-20 17:06:52 +00:00
</ ul >
</ li >
2020-09-24 13:47:11 +00:00
</ ul >
</ li >
</ ul >
</ li >
</ ul >
</ div >
</ div >
</ nav >
2023-09-20 17:06:52 +00:00
< section data-toggle = "wy-nav-shift" class = "wy-nav-content-wrap" >< nav class = "wy-nav-top" aria-label = "Mobile navigation menu" >
2020-09-24 13:47:11 +00:00
< i data-toggle = "wy-nav-top" class = "fa fa-bars" ></ i >
< a href = "index.html" > MO2 Python Plugin API</ a >
</ nav >
< div class = "wy-nav-content" >
< div class = "rst-content" >
2023-09-20 17:06:52 +00:00
< div role = "navigation" aria-label = "Page navigation" >
2020-09-24 13:47:11 +00:00
< ul class = "wy-breadcrumbs" >
2023-09-20 17:06:52 +00:00
< li >< a href = "index.html" class = "icon icon-home" aria-label = "Home" ></ a ></ li >
< li class = "breadcrumb-item active" > Type of Plugins</ li >
2020-09-24 13:47:11 +00:00
< li class = "wy-breadcrumbs-aside" >
< a href = "_sources/plugin-types.rst.txt" rel = "nofollow" > View page source</ a >
</ li >
</ ul >
< hr />
</ div >
< div role = "main" class = "document" itemscope = "itemscope" itemtype = "http://schema.org/Article" >
< div itemprop = "articleBody" >
2023-09-20 17:06:52 +00:00
< section id = "type-of-plugins" >
< span id = "id1" ></ span >< h1 > Type of Plugins< a class = "headerlink" href = "#type-of-plugins" title = "Link to this heading" > </ a ></ h1 >
2020-09-24 13:47:11 +00:00
< p > Plugins are passive, that is: they react to events emitted by the core application or extend
an existing functionality (like adding support for additional types of installers). Plugins
should integrate with Mod Organizers concepts. While you could write an INI editor that works with
the global INI files instead of the profile specific ones, what would be the point?</ p >
< p > Depending on where/how the plugin integrates with MO you need to write a different type of plugin,
in practice this means you need to implement a different interface (inherit from a different base
plugin class from < code class = "docutils literal notranslate" >< span class = "pre" > mobase</ span ></ code > ). As mentioned above, plugins are passive: the plugin type decides how/when
MO makes requests to/invokes your plugin.
All plugins however gain access to MOs own plugin interface so all plugins get to make the same requests
to MO.</ p >
2023-09-20 17:06:52 +00:00
< section id = "installers" >
< h2 > Installers< a class = "headerlink" href = "#installers" title = "Link to this heading" > </ a ></ h2 >
2020-09-24 13:47:11 +00:00
< div class = "line-block" >
2024-08-09 08:57:44 +00:00
< div class = "line" >< strong > Interface:</ strong > < a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginInstaller" title = "mobase.IPluginInstaller" >< code class = "xref py py-class docutils literal notranslate" >< span class = "pre" > IPluginInstaller</ span ></ code ></ a > , < a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginInstallerSimple" title = "mobase.IPluginInstallerSimple" >< code class = "xref py py-class docutils literal notranslate" >< span class = "pre" > IPluginInstallerSimple</ span ></ code ></ a > ,
< a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginInstallerCustom" title = "mobase.IPluginInstallerCustom" >< code class = "xref py py-class docutils literal notranslate" >< span class = "pre" > IPluginInstallerCustom</ span ></ code ></ a ></ div >
2020-09-24 13:47:11 +00:00
< div class = "line" >< strong > Examples:</ strong > < code class = "docutils literal notranslate" >< span class = "pre" > installer_bain</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > installer_bundle</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > installer_fomod</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > installer_ncc</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > installer_quick</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > installer_manual</ span ></ code > .</ div >
</ div >
< p > An installer is invoked when the user tries to install a mod, either by double clicking in the download
view or through the “Install Mod..” button or “Reinstall mod” item from the mod lists context menu.
There are actually two ways to write an installer, < em > simple</ em > or < em > complex</ em > :</ p >
< ul class = "simple" >
< li >< p > With < em > simple</ em > installers, MO does the unpacking of the file but this works only with standard archive formats.
The plugin can then select the files and folders that requires extraction, and where to extract them.</ p ></ li >
< li >< p >< em > Complex</ em > installers are more flexible but require a bit more work.</ p ></ li >
</ ul >
2023-09-20 17:06:52 +00:00
</ section >
< section id = "previewers" >
< h2 > Previewers< a class = "headerlink" href = "#previewers" title = "Link to this heading" > </ a ></ h2 >
2020-09-24 13:47:11 +00:00
< div class = "line-block" >
2024-08-09 08:57:44 +00:00
< div class = "line" >< strong > Interfaces:</ strong > < a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginPreview" title = "mobase.IPluginPreview" >< code class = "xref py py-class docutils literal notranslate" >< span class = "pre" > IPluginPreview</ span ></ code ></ a ></ div >
2020-09-24 13:47:11 +00:00
< div class = "line" >< strong > Examples:</ strong > < code class = "docutils literal notranslate" >< span class = "pre" > preview_base</ span ></ code ></ div >
</ div >
< p > These plugins add support for previewing files in the data pane.
Right now all image formats supported by Qt are implemented (including < cite > .dds</ cite > ) but no audio files and
no 3d mesh formats.</ p >
2023-09-20 17:06:52 +00:00
</ section >
< section id = "mod-page" >
< h2 > Mod Page< a class = "headerlink" href = "#mod-page" title = "Link to this heading" > </ a ></ h2 >
2020-09-24 13:47:11 +00:00
< p >< em > WIP</ em ></ p >
< div class = "line-block" >
2024-08-09 08:57:44 +00:00
< div class = "line" >< strong > Interfaces:</ strong > < a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginModPage" title = "mobase.IPluginModPage" >< code class = "xref py py-class docutils literal notranslate" >< span class = "pre" > IPluginModPage</ span ></ code ></ a ></ div >
2020-09-24 13:47:11 +00:00
< div class = "line" >< strong > Examples:</ strong > < code class = "docutils literal notranslate" >< span class = "pre" > page_tesalliance</ span ></ code ></ div >
</ div >
< p > Mod Page plugins implement interfaces to modding communities where mods can be downloaded, checked
for updates and so on.
This interface is not finished and some of the bits that are do not actually get used. The goal is
that the whole Nexus integration can be implemented through this interface and can then be removed
from the core application. This is a task for the distant future, unless someone wants to volunteer.</ p >
2023-09-20 17:06:52 +00:00
</ section >
< section id = "game" >
< h2 > Game< a class = "headerlink" href = "#game" title = "Link to this heading" > </ a ></ h2 >
2020-09-24 13:47:11 +00:00
< div class = "line-block" >
2024-08-09 08:57:44 +00:00
< div class = "line" >< strong > Interfaces:</ strong > < a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginGame" title = "mobase.IPluginGame" >< code class = "xref py py-class docutils literal notranslate" >< span class = "pre" > IPluginGame</ span ></ code ></ a ></ div >
2020-09-24 13:47:11 +00:00
< div class = "line" >< strong > Examples:</ strong > < code class = "docutils literal notranslate" >< span class = "pre" > game_oblivion</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > game_fallout3</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > game_falloutnv</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > game_skyrim</ span ></ code > , …</ div >
</ div >
< p > These plugins (shall eventually) implement all the game specific features and further game plugins are
able to add support for further games.
The plugin is also responsible to help MO determine if (and where) the game is installed in the first place.
Since supporting a game properly requires extensions in many places of the UI.
2024-08-09 08:30:28 +00:00
To allow this without creating one huge plugin interface that involves every aspect of MO,
2024-08-09 08:57:44 +00:00
game plugins can register only the features they need to MO2 using < a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IGameFeatures.registerFeature" title = "mobase.IGameFeatures.registerFeature" >< code class = "xref py py-meth docutils literal notranslate" >< span class = "pre" > registerFeature</ span ></ code ></ a ></ p >
2020-09-24 13:47:11 +00:00
< p > As an example for a game feature take BSA invalidation: If the game requires BSA invalidation it will implement
this feature.
Wherever the core can support BSA invalidation it will query whether the current game has this feature and if so
query the implementation on specifics (like “How should the invalidation BSA be called” and “what’ s the right bsa version”).
Of course, the goal is for feature interfaces to be as generic as possible without limiting usefulness.</ p >
2024-08-09 08:57:44 +00:00
< p >< strong > Note:</ strong > The < a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginGame" title = "mobase.IPluginGame" >< code class = "xref py py-class docutils literal notranslate" >< span class = "pre" > IPluginGame</ span ></ code ></ a > interface is complex, and mostly designed for Gamebryo games. If you plan
2020-09-24 13:47:11 +00:00
on writting a game plugin for another type of games, you might be interested by a simpler interface and might
want to check out the < a class = "reference external" href = "https://github.com/ModOrganizer2/modorganizer-basic_games" > Basic Games</ a > meta-plugin.</ p >
2023-09-20 17:06:52 +00:00
</ section >
< section id = "tool" >
< h2 > Tool< a class = "headerlink" href = "#tool" title = "Link to this heading" > </ a ></ h2 >
2020-09-24 13:47:11 +00:00
< div class = "line-block" >
2024-08-09 08:57:44 +00:00
< div class = "line" >< strong > Interfaces:</ strong > < a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginTool" title = "mobase.IPluginTool" >< code class = "xref py py-class docutils literal notranslate" >< span class = "pre" > IPluginTool</ span ></ code ></ a ></ div >
2020-09-24 13:47:11 +00:00
< div class = "line" >< strong > Examples:</ strong > < code class = "docutils literal notranslate" >< span class = "pre" > tool_configurator</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > tool_inieditor</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > fnistool</ span ></ code ></ div >
</ div >
< p > This is the simplest of plugin interfaces. Such plugins simply place an icon inside the tools submenu and get
invoked when the user clicks it. They are expected to have a user interface of some sort.
These are almost like independent applications except they can access all Mod Organizer interfaces like querying
and modifying the current profile, mod list, load order, use MO to install mods and so on.
A tool plugin can (and should!) integrate its UI as a window inside MO and thus doesn’ t have to initialize a
windows application itself.</ p >
2023-09-20 17:06:52 +00:00
</ section >
< section id = "proxies" >
< h2 > Proxies< a class = "headerlink" href = "#proxies" title = "Link to this heading" > </ a ></ h2 >
2020-09-24 13:47:11 +00:00
< div class = "line-block" >
< div class = "line" >< strong > Interfaces:</ strong > < code class = "xref py py-class docutils literal notranslate" >< span class = "pre" > IPluginProxy</ span ></ code ></ div >
< div class = "line" >< strong > Examples:</ strong > < code class = "docutils literal notranslate" >< span class = "pre" > plugin_python</ span ></ code ></ div >
</ div >
< p > Proxy Plugins expose the plugin api to foreign languages. This is what allows you to write plugins using python
in the first place.
The python proxy is easily the most complicated plugin and requires constant updating so if you’ re considering
writing a Haskell plugin because that is your programming language of choice, I am fairly certain learning python
is easier than writing the haskell proxy. Just saying.
And no, you can not write a proxy for a third language in Python, do not be silly.</ p >
2023-09-20 17:06:52 +00:00
</ section >
< section id = "free-plugins" >
< h2 >< em > Free Plugins</ em >< a class = "headerlink" href = "#free-plugins" title = "Link to this heading" > </ a ></ h2 >
2020-09-24 13:47:11 +00:00
< div class = "line-block" >
2024-08-09 08:57:44 +00:00
< div class = "line" >< strong > Interfaces:</ strong > < a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPlugin" title = "mobase.IPlugin" >< code class = "xref py py-class docutils literal notranslate" >< span class = "pre" > IPlugin</ span ></ code ></ a ></ div >
2020-09-24 13:47:11 +00:00
< div class = "line" >< strong > Examples:</ strong > < code class = "docutils literal notranslate" >< span class = "pre" > check_fnis</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > bsa_extractor</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > diagnose_basic</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > tool_inibakery</ span ></ code ></ div >
</ div >
< p > “Free” plugins implement none of the interfaces and thus initially do not integrate with MO at all.
They are initialized by MO and get access to the MO interface.
This makes sense if you only want to implement one of the extension interfaces (see below) or register handlers
for events.</ p >
2023-09-20 17:06:52 +00:00
</ section >
< section id = "extension-interfaces" >
< h2 > Extension Interfaces< a class = "headerlink" href = "#extension-interfaces" title = "Link to this heading" > </ a ></ h2 >
2020-09-24 13:47:11 +00:00
< p > In Python, these interfaces are similar to other plugin types, but in C++, those do not inherit < code class = "docutils literal notranslate" >< span class = "pre" > IPlugin</ span ></ code > so
that plugins can implement one or more of these interfaces, in addition to a normal plugin type.</ p >
2023-09-20 17:06:52 +00:00
< section id = "diagnose" >
< h3 > Diagnose< a class = "headerlink" href = "#diagnose" title = "Link to this heading" > </ a ></ h3 >
2020-09-24 13:47:11 +00:00
< div class = "line-block" >
2024-08-09 08:57:44 +00:00
< div class = "line" >< strong > Interfaces:</ strong > < a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginDiagnose" title = "mobase.IPluginDiagnose" >< code class = "xref py py-class docutils literal notranslate" >< span class = "pre" > IPluginDiagnose</ span ></ code ></ a ></ div >
2020-09-24 13:47:11 +00:00
< div class = "line" >< strong > Examples:</ strong > < code class = "docutils literal notranslate" >< span class = "pre" > diagnose_basic</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > installer_ncc</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > plugin_python</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > script_extender_plugin_checker</ span ></ code ></ div >
</ div >
< p > This interface lets the plugin report issues that are then listed in the “Problems” icon in the main window.
If possible the plugin can also provide an automatic or guided fix to the problem.
The < code class = "docutils literal notranslate" >< span class = "pre" > diagnose_basic</ span ></ code > plugin does nothing but analyze the MO installation and report problems it discovers (like
< em > “There are files in your overwrite directory.”</ em > ) but usually a plugin will want to report issues relevant for its
own operation.
For instance, < code class = "docutils literal notranslate" >< span class = "pre" > installer_ncc</ span ></ code > requires a specific version of .NET and will report a problem if it is not installed.
This should always be the prefered way to communicate problems the user has to fix but should never be used for problems
he cannot fix (i.e. < em > “This plugin does not work with this game.”</ em > ).
An empty problem list should always be achievable.</ p >
2023-09-20 17:06:52 +00:00
</ section >
< section id = "file-mappings" >
< h3 > File Mappings< a class = "headerlink" href = "#file-mappings" title = "Link to this heading" > </ a ></ h3 >
2020-09-24 13:47:11 +00:00
< div class = "line-block" >
2024-08-09 08:57:44 +00:00
< div class = "line" >< strong > Interfaces:</ strong > < a class = "reference internal" href = "autoapi/mobase/index.html#mobase.IPluginFileMapper" title = "mobase.IPluginFileMapper" >< code class = "xref py py-class docutils literal notranslate" >< span class = "pre" > IPluginFileMapper</ span ></ code ></ a ></ div >
2020-09-24 13:47:11 +00:00
< div class = "line" >< strong > Examples:</ strong > < code class = "docutils literal notranslate" >< span class = "pre" > tool_inibakery</ span ></ code > , < code class = "docutils literal notranslate" >< span class = "pre" > game_gamebryo</ span ></ code ></ div >
</ div >
< p > This interface allows plugins to add virtual file (or directory) links to the virtual file system in addition to the
mod files.
Profile-local save games, ini-files and load-orders are all implemented this way in MO2.</ p >
2023-09-20 17:06:52 +00:00
</ section >
</ section >
</ section >
2020-09-24 13:47:11 +00:00
</ div >
</ div >
2023-09-20 17:06:52 +00:00
< footer >< div class = "rst-footer-buttons" role = "navigation" aria-label = "Footer" >
2021-01-18 21:09:43 +00:00
< a href = "setup-tools.html" class = "btn btn-neutral float-left" title = "Setting up the environment" accesskey = "p" rel = "prev" >< span class = "fa fa-arrow-circle-left" aria-hidden = "true" ></ span > Previous</ a >
2023-09-20 17:06:52 +00:00
< a href = "writing-plugins.html" class = "btn btn-neutral float-right" title = "Writing Plugins" accesskey = "n" rel = "next" > Next < span class = "fa fa-arrow-circle-right" aria-hidden = "true" ></ span ></ a >
2020-09-24 13:47:11 +00:00
</ div >
< hr />
< div role = "contentinfo" >
2023-09-20 17:06:52 +00:00
< p > © Copyright 2023, Holt59.</ p >
2020-09-24 13:47:11 +00:00
</ div >
2023-09-20 17:06:52 +00:00
Built with < a href = "https://www.sphinx-doc.org/" > Sphinx</ a > using a
2021-01-18 21:09:43 +00:00
< a href = "https://github.com/readthedocs/sphinx_rtd_theme" > theme</ a >
2023-09-20 17:06:52 +00:00
provided by < a href = "https://readthedocs.org" > Read the Docs</ a > .
2020-09-24 13:47:11 +00:00
</ footer >
</ div >
</ div >
</ section >
</ div >
2023-09-20 17:06:52 +00:00
< script >
2020-09-24 13:47:11 +00:00
jQuery ( function () {
SphinxRtdTheme . Navigation . enable ( true );
});
2023-09-20 17:06:52 +00:00
</ script >
2020-09-24 13:47:11 +00:00
</ body >
</ html >