<liclass="toctree-l3"><aclass="reference internal"href="../setup-tools.html#get-the-mobase-stubs">1. Get the <codeclass="docutils literal notranslate"><spanclass="pre">mobase</span></code> stubs</a></li>
<liclass="toctree-l3"><aclass="reference internal"href="../setup-tools.html#configure-visual-studio-code-for-mobase">2. Configure Visual Studio Code for <codeclass="docutils literal notranslate"><spanclass="pre">mobase</span></code></a></li>
<liclass="toctree-l2"><aclass="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>
<liclass="toctree-l2"><aclass="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>
<liclass="toctree-l2"><aclass="reference internal"href="../faq.html#why-are-my-isinstance-x-qobject-and-isinstance-y-qwidget-not-working">3. Why are my <codeclass="docutils literal notranslate"><spanclass="pre">isinstance(x,</span><spanclass="pre">QObject)</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">isinstance(y,</span><spanclass="pre">QWidget)</span></code> not working?</a></li>
<h1>IPluginGame<aclass="headerlink"href="#iplugingame"title="Permalink to this headline">¶</a></h1>
<dlclass="class">
<dtid="mobase.IPluginGame">
<emclass="property">class </em><codeclass="sig-prename descclassname">mobase.</code><codeclass="sig-name descname">IPluginGame</code><aclass="headerlink"href="#mobase.IPluginGame"title="Permalink to this definition">¶</a></dt>
<td><p>Retrieve the valid ‘short’ names for this game.</p></td>
</tr>
</tbody>
</table>
<pclass="rubric">Methods Documentation</p>
<dlclass="method">
<dtid="mobase.IPluginGame.CCPlugins">
<emclass="property">abstract </em><codeclass="sig-name descname">CCPlugins</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.CCPlugins"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The current list of active Creation Club plugins.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">DLCPlugins</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.DLCPlugins"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The list of esp/esm files that are part of known DLCs.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">binaryName</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.binaryName"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The name of the default executable to run (relative to the game folder).</p>
<emclass="property">abstract </em><codeclass="sig-name descname">dataDirectory</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.dataDirectory"title="Permalink to this definition">¶</a></dt>
<emclass="property">abstract </em><codeclass="sig-name descname">detectGame</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.detectGame"title="Permalink to this definition">¶</a></dt>
<dd><p>Detect the game.</p>
<p>This method is the first called for game plugins (before <cite>init()</cite>). The following
methods should work properly after the call to <cite>detectGame()</cite> (and before <cite>init()</cite>):</p>
<emclass="property">abstract </em><codeclass="sig-name descname">documentsDirectory</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.documentsDirectory"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The directory of the documents folder where configuration files and such for this game reside.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">executableForcedLoads</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.executableForcedLoads"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>A list of automatically discovered libraries that can be force loaded with executables.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">executables</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.executables"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>A list of automatically discovered executables of the game itself and tools surrounding it.</p>
<codeclass="sig-name descname">feature</code><spanclass="sig-paren">(</span><emclass="sig-param">feature_type</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.feature"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve a specified game feature from this plugin.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>feature_type</strong>– The class of feature to retrieve.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>The game feature corresponding to the given type, or <cite>None</cite> if the feature is</p>
</dd>
</dl>
<p>not implemented.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Return type</dt>
<ddclass="field-odd"><p>~GameFeatureType</p>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="mobase.IPluginGame.featureList">
<codeclass="sig-name descname">featureList</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.featureList"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve the list of game features implemented for this plugin.</p>
<p>Python plugin should not implement this method but <cite>_featureList()</cite>.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>A mapping from feature type to actual game features.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">gameDirectory</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.gameDirectory"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The directory containing the game installation.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">gameIcon</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.gameIcon"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The icon representing the game.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">gameName</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.gameName"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The name of the game (as displayed to the user).</p>
<emclass="property">abstract </em><codeclass="sig-name descname">gameNexusName</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.gameNexusName"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The name of the game identifier for Nexus.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">gameShortName</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.gameShortName"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The short name of the game.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">gameVariants</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.gameVariants"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve the list of variants for this game.</p>
<p>If there are multiple variants of a game (and the variants make a difference to the
plugin), like a regular one and a GOTY-edition, the plugin can return a list of them
and the user gets to chose which one he owns.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The list of variants of the game.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">gameVersion</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.gameVersion"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The version of the game.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">getLauncherName</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.getLauncherName"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The name of the launcher executable to run (relative to the game folder), or an</p>
<emclass="property">abstract </em><codeclass="sig-name descname">iniFiles</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.iniFiles"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The list of INI files this game uses. The first file in the list should be the</p>
<emclass="property">abstract </em><codeclass="sig-name descname">initializeProfile</code><spanclass="sig-paren">(</span><emclass="sig-param">directory</em>, <emclass="sig-param">settings</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.initializeProfile"title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize a profile for this game.</p>
<p>The MO app does not yet support virtualizing only specific aspects but plugins should be written
with this future functionality in mind.</p>
<p>This function will be used to initially create a profile, potentially to repair it or upgrade/downgrade
it so the implementations have to gracefully handle the case that the directory already contains files.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>directory</strong>– The directory where the profile is to be initialized.</p></li>
<li><p><strong>settings</strong>– The parameters for how the profile should be initialized.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="mobase.IPluginGame.isInstalled">
<emclass="property">abstract </em><codeclass="sig-name descname">isInstalled</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.isInstalled"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>True if this game has been discovered as installed, False otherwise.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">listSaves</code><spanclass="sig-paren">(</span><emclass="sig-param">folder</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.listSaves"title="Permalink to this definition">¶</a></dt>
<dd><p>List saves in the given directory.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>folder</strong>– The folder to list saves from.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>The list of game saves in the given folder.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">loadOrderMechanism</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.loadOrderMechanism"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The load order mechanism used by this game.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">looksValid</code><spanclass="sig-paren">(</span><emclass="sig-param">directory</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.looksValid"title="Permalink to this definition">¶</a></dt>
<dd><p>Check if the given directory looks like a valid game installation.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>directory</strong>– Directory to check.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>True if the directory looks like a valid installation of this game, False otherwise.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">nexusGameID</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.nexusGameID"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve the Nexus game ID for this game.</p>
<p>Example: For Skyrim, the Nexus game ID is 110.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The Nexus game ID for this game.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">nexusModOrganizerID</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.nexusModOrganizerID"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve the Nexus mod ID of Mod Organizer for this game.</p>
<dlclass="simple">
<dt>Example: For Skyrim SE, the mod ID of MO2 is 6194. You can find the mod ID in the URL:</dt><dd><p><aclass="reference external"href="https://www.nexusmods.com/skyrimspecialedition/mods/6194">https://www.nexusmods.com/skyrimspecialedition/mods/6194</a></p>
</dd>
</dl>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The Nexus mod ID of Mod Organizer for this game.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">primaryPlugins</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.primaryPlugins"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The list of plugins that are part of the game and not considered optional.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">primarySources</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.primarySources"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve primary alternative ‘short’ names for this game.</p>
<p>This is used to determine if a Nexus (or other) download source should be considered
as a primary source for the game so that it is not flagged as an alternative one.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The list of primary alternative ‘short’ names for this game, or an empty list.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">savesDirectory</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.savesDirectory"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The directory where save games are stored.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">setGamePath</code><spanclass="sig-paren">(</span><emclass="sig-param">path</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.setGamePath"title="Permalink to this definition">¶</a></dt>
<dd><p>Set the path to the managed game.</p>
<p>This is called during instance creation if the game is not auto-detected and the user has
to specify the installation location. This is not called if the game has been auto-detected,
so <cite>isInstalled()</cite> should call this.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>path</strong>– Path to the game installation.</p>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="mobase.IPluginGame.setGameVariant">
<emclass="property">abstract </em><codeclass="sig-name descname">setGameVariant</code><spanclass="sig-paren">(</span><emclass="sig-param">variant</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.setGameVariant"title="Permalink to this definition">¶</a></dt>
<dd><p>Set the game variant.</p>
<p>If there are multiple variants of game (as returned by <cite>gameVariants()</cite>), this will be
called on start with the user-selected game variant.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>variant</strong>– The game variant selected by the user.</p>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="mobase.IPluginGame.sortMechanism">
<emclass="property">abstract </em><codeclass="sig-name descname">sortMechanism</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.sortMechanism"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The sort mechanism for this game.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">steamAPPId</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.steamAPPId"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve the Steam app ID for this game.</p>
<p>If the game is not available on Steam, this should return an empty string.</p>
<p>If a game is available in multiple versions, those might have different app ids. The plugin
should try to return the right one</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The Steam app ID for this game. Should be empty for games not available on steam.</p>
<emclass="property">abstract </em><codeclass="sig-name descname">validShortNames</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginGame.validShortNames"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve the valid ‘short’ names for this game.</p>
<p>This is used to determine if a Nexus download is valid for the current game since not all
game variants have their own nexus pages and others can handle downloads from other nexus
game pages and should be allowed to do so (e.g., you can install some Skyrim LE mod even
when using Skyrim SE).</p>
<p>The short name should be considered the primary handler for a directly supported game