Class Mod
Inherited Members
Namespace: Modding
Assembly: HollowKnight.dll
Syntax
public abstract class Mod : Loggable, IMod, ILogger
Constructors
| Edit this page View SourceMod(string)
Constructs the mod, assigns the instance and sets the name.
Declaration
protected Mod(string name = null)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Fields
| Edit this page View SourceName
The Mods Name
Declaration
public readonly string Name
Field Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceGetName()
Get's the Mod's Name
Declaration
public string GetName()
Returns
Type | Description |
---|---|
string |
GetPreloadNames()
Returns the objects to preload in order for the mod to work.
Declaration
public virtual List<(string, string)> GetPreloadNames()
Returns
Type | Description |
---|---|
List<(string, string)> | A List of tuples containing scene name, object name |
GetVersion()
Returns version of Mod
Declaration
public virtual string GetVersion()
Returns
Type | Description |
---|---|
string | Mod Version |
Initialize()
Called after preloading of all mods.
Declaration
public virtual void Initialize()
Initialize(Dictionary<string, Dictionary<string, GameObject>>)
Called after preloading of all mods.
Declaration
public virtual void Initialize(Dictionary<string, Dictionary<string, GameObject>> preloadedObjects)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<string, Dictionary<string, GameObject>> | preloadedObjects | The preloaded objects relevant to this Mod |
IsCurrent()
Denotes if the running version is the current version. Set this with Modding.GithubVersionHelper
Declaration
public virtual bool IsCurrent()
Returns
Type | Description |
---|---|
bool | If the version is current or not. |
LoadPriority()
Controls when this mod should load compared to other mods. Defaults to ordered by name.
Declaration
public virtual int LoadPriority()
Returns
Type | Description |
---|---|
int |
PreloadSceneHooks()
A list of requested scenes to be preloaded and actions to execute on loading of those scenes
Declaration
public virtual (string, Func<IEnumerator>)[] PreloadSceneHooks()
Returns
Type | Description |
---|---|
(string, Func<IEnumerator>)[] | List of tuples containg scene names and the respective actions. |