<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>IModInterface<aclass="headerlink"href="#imodinterface"title="Permalink to this headline">ΒΆ</a></h1>
<dlclass="class">
<dtid="mobase.IModInterface">
<emclass="property">class </em><codeclass="sig-prename descclassname">mobase.</code><codeclass="sig-name descname">IModInterface</code><aclass="headerlink"href="#mobase.IModInterface"title="Permalink to this definition">ΒΆ</a></dt>
<codeclass="sig-name descname">absolutePath</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModInterface.absolutePath"title="Permalink to this definition">ΒΆ</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>Absolute path to the mod to be used in file system operations.</p>
<codeclass="sig-name descname">addCategory</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModInterface.addCategory"title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Assign a category to the mod. If the named category does not exist it is created.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>name</strong>β Name of the new category to assign.</p>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="mobase.IModInterface.addNexusCategory">
<codeclass="sig-name descname">addNexusCategory</code><spanclass="sig-paren">(</span><emclass="sig-param">category_id</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModInterface.addNexusCategory"title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Set the category id from a nexus category id. Conversion to MO ID happens internally.</p>
<p>If a mapping is not possible, the category is set to the default value.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>category_id</strong>β The Nexus category ID.</p>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="mobase.IModInterface.categories">
<codeclass="sig-name descname">categories</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModInterface.categories"title="Permalink to this definition">ΒΆ</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The list of categories assigned to this mod.</p>
<codeclass="sig-name descname">name</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModInterface.name"title="Permalink to this definition">ΒΆ</a></dt>
<codeclass="sig-name descname">remove</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModInterface.remove"title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Delete the mod from the disc.</p>
<p>This does not update the global ModInfo structure or indices.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>True if the mod was deleted, False otherwise.</p>
<codeclass="sig-name descname">removeCategory</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModInterface.removeCategory"title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Unassign a category from this mod.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>name</strong>β Name of the category to remove.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>True if the category was removed, False otherwise (e.g. if no such category</p>
<codeclass="sig-name descname">setGameName</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModInterface.setGameName"title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Set the source game of this mod.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>name</strong>β The new source game short name of this mod.</p>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="mobase.IModInterface.setIsEndorsed">
<codeclass="sig-name descname">setIsEndorsed</code><spanclass="sig-paren">(</span><emclass="sig-param">endorsed</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModInterface.setIsEndorsed"title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Set endorsement state of the mod.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>endorsed</strong>β New endorsement state of this mod.</p>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="mobase.IModInterface.setName">
<codeclass="sig-name descname">setName</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModInterface.setName"title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Set the name of this mod.</p>
<p>This will also update the name of the directory that contains this mod</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>name</strong>β New name for this mod.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>True if the name was changed, False if an error occured (e.g. if the name is not a valid</p>
<codeclass="sig-name descname">setNewestVersion</code><spanclass="sig-paren">(</span><emclass="sig-param">version</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModInterface.setNewestVersion"title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Set the latest known version of this mod.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>version</strong>β The latest known version of this mod.</p>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="mobase.IModInterface.setNexusID">
<codeclass="sig-name descname">setNexusID</code><spanclass="sig-paren">(</span><emclass="sig-param">nexus_id</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModInterface.setNexusID"title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Set the Nexus ID of this mod.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>nexus_id</strong>β Thew new Nexus ID of this mod.</p>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="mobase.IModInterface.setVersion">
<codeclass="sig-name descname">setVersion</code><spanclass="sig-paren">(</span><emclass="sig-param">version</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IModInterface.setVersion"title="Permalink to this definition">ΒΆ</a></dt>
<dd><p>Set the version of this mod.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>version</strong>β The new version of this mod.</p>