<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-l3"><aclass="reference internal"href="../setup-tools.html#configure-mypy-to-find-the-mobase-stubs">3. Configure <codeclass="docutils literal notranslate"><spanclass="pre">mypy</span></code> to find the <codeclass="docutils literal notranslate"><spanclass="pre">mobase</span></code> stubs</a></li>
</ul>
</li>
<liclass="toctree-l2"><aclass="reference internal"href="../setup-tools.html#testing-the-setup">Testing the setup</a></li>
</ul>
</li>
<liclass="toctree-l1"><aclass="reference internal"href="../plugin-types.html">Type of Plugins</a><ul>
<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>IModList<aclass="headerlink"href="#imodlist"title="Permalink to this headline">¶</a></h1>
<dlclass="class">
<dtid="mobase.IModList">
<emclass="property">class </em><codeclass="sig-prename descclassname">mobase.</code><codeclass="sig-name descname">IModList</code><aclass="headerlink"href="#mobase.IModList"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">allMods</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModList.allMods"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>A list containing the internal names of all installed mods.</p>
<codeclass="sig-name descname">displayName</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModList.displayName"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve the display name of a mod from its internal name.</p>
<p>If you received an internal name from the API (e.g. <cite>IPluginList.origin</cite>) then you should use
that name to identify the mod in all other api calls but use this function to retrieve the name
to show to the user.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>name</strong>– Internal name of the mod.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>The display name of the given mod.</p>
<codeclass="sig-name descname">onModMoved</code><spanclass="sig-paren">(</span><emclass="sig-param">callback</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModList.onModMoved"title="Permalink to this definition">¶</a></dt>
<dd><p>Install a handler to be called when a mod is moved.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>callback</strong>– The function to call when a mod is moved. The first argument is the internal name of the mod, the second argument the old priority and the third argument the new priority.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>True if the handler was installed properly (there are currently no reasons for this to fail).</p>
<codeclass="sig-name descname">onModStateChanged</code><spanclass="sig-paren">(</span><emclass="sig-param">callback</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModList.onModStateChanged"title="Permalink to this definition">¶</a></dt>
<dd><p>Install a handler to be called when a mod state changes (enabled/disabled, endorsed, …).</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>callback</strong>– The function to call when the state of a mod changes. The first argument is the internal mod name, and the second one the new state of the mod.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>True if the handler was installed properly (there are currently no reasons for this to fail).</p>
<codeclass="sig-name descname">priority</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModList.priority"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve the priority of a mod.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>name</strong>– Internal name of the mod.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>The priority of the given mod.</p>
<codeclass="sig-name descname">setActive</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em>, <emclass="sig-param">active</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModList.setActive"title="Permalink to this definition">¶</a></dt>
<dd><p>Enable or disable a mod.</p>
<p>Calling this will cause MO to re-evaluate its virtual file system so this is
a fairly expensive call.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>name</strong>– Internal name of the mod to enable or disable.</p></li>
<li><p><strong>active</strong>– True to enable the mod, False to disable it.</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>True on success, False otherwise.</p>
<codeclass="sig-name descname">setPriority</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em>, <emclass="sig-param">priority</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModList.setPriority"title="Permalink to this definition">¶</a></dt>
<dd><p>Change the priority of a mod.</p>
<p><cite>priority</cite> is the new priority after the move. Keep in mind that the mod disappears from its
old location and all mods with higher priority than the moved mod decrease in priority by one.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>name</strong>– Internal name of the mod.</p></li>
<li><p><strong>priority</strong>– The new priority of the mod.</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>True if the priority was changed, False otherwise (if the name or priority were invalid).</p>
<codeclass="sig-name descname">state</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModList.state"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve the state of a mod.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>name</strong>– Internal name of the mod.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>The state of the given mod.</p>