Show / Hide Table of Contents

Class Mods

Provides an API for querying the status of other installed mods.

This can for example be used to do additional things based on the presence of other mods, like adding some kind of interaction.

For the purposes of this class, mods are always identified by their GUIDs.

Inheritance
Object
Mods
Namespace: Modding
Assembly: Assembly-CSharp.dll
Syntax
public static class Mods

Methods

GetVersion(Guid)

Returns the version of the mod specified by the given id. If there is no corresponding mod loaded, returns null.

Declaration
public static Version GetVersion(Guid id)
Parameters
Type Name Description
Guid id
Returns
Type Description
Version

IsModLoaded(Guid)

Returns whether a mod with the given id is currently loaded. Note that depending on the LoadOrder setup, if this returns false that doesn't necessarily mean that the mod won't still be loaded after the mod calling this method.

Declaration
public static bool IsModLoaded(Guid id)
Parameters
Type Name Description
Guid id
Returns
Type Description
Boolean

Events

OnModLoaded

Called every time a new mod is loaded.

When registering a new handler for this, it is immediately called once for each currently loaded mod.

Declaration
public static event Action<Guid> OnModLoaded
Event Type
Type Description
Action<Guid>
Back to top Generated by DocFX