Show / Hide Table of Contents

Class Mod

Inheritance
object
Loggable
Mod
WeaverMod
Implements
IMod
ILogger
Inherited Members
Loggable.LogFine(string)
Loggable.LogFine(object)
Loggable.LogDebug(string)
Loggable.LogDebug(object)
Loggable.Log(string)
Loggable.Log(object)
Loggable.LogWarn(string)
Loggable.LogWarn(object)
Loggable.LogError(string)
Loggable.LogError(object)
Namespace: Modding
Assembly: HollowKnight.dll
Syntax
public abstract class Mod : Loggable, IMod, ILogger

Constructors

| Edit this page View Source

Mod(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 Source

Name

The Mods Name

Declaration
public readonly string Name
Field Value
Type Description
string

Methods

| Edit this page View Source

GetName()

Get's the Mod's Name

Declaration
public string GetName()
Returns
Type Description
string
| Edit this page View Source

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

| Edit this page View Source

GetVersion()

Returns version of Mod

Declaration
public virtual string GetVersion()
Returns
Type Description
string

Mod Version

| Edit this page View Source

Initialize()

Called after preloading of all mods.

Declaration
public virtual void Initialize()
| Edit this page View Source

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

| Edit this page View Source

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.

| Edit this page View Source

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
| Edit this page View Source

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.

Implements

IMod
ILogger

Extension Methods

ReflectionUtilities.ReflectCallMethod(object, string, object[], BindingFlags)
ReflectionUtilities.ReflectGetField(object, string, BindingFlags)
ReflectionUtilities.ReflectGetMethod(object, string, BindingFlags)
ReflectionUtilities.ReflectGetProperty(object, string, BindingFlags)
ReflectionUtilities.ReflectSetField(object, string, object, BindingFlags)
ReflectionUtilities.ReflectSetProperty(object, string, object, BindingFlags)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾