Skip to content

IsModLoaded

Nightinggale edited this page Jun 5, 2018 · 1 revision

What it does

It tells if a mod of a specific name is loaded.


Why you want to use this

Make your mod able to work with other mods without the use of standalone patch mods. You can make patches, which only applies if a specific mod is loaded, or not loaded by setting Success to Invert.

It also allows displaying error messages to the user if a mandatory mod is missing or an incompatible mod is loaded.


Tags

Tag Mandatory Type Description
patchName no string Name of patch for log/profiling
modName no* string Name of the mod to check for
altModNames no* list of strings List of names to check for
Log writing no

Note: requires either modName or at least one name in altModNames.


Pass condition

It pass if modName or a member of altModNames is in the loaded mod list.


Example

<li Class="ModCheck.IsModLoaded">
    <patchName>Verify that core is present</patchName>
    <modName>Core</modName>
</li>
<li Class="ModCheck.IsModLoaded">
    <patchName>Verify that core is present</patchName>
    <altModNames>
        <li>Core</li>
    </altModNames>
</li>

Clone this wiki locally