Skip to Main Content

BTD_Mod_Helper​.ModHelper


BloonsTD6 Mod Helper

BTD_Mod_Helper

ModHelper Class

Catch-all class for non-extension static methods

public static class ModHelper

Inheritance System.Object  ModHelper

Properties

ModHelper.DisabledModsDirectory Property

Directory for where disabled mods are stored

public static string DisabledModsDirectory { get; }

Property Value

System.String

ModHelper.IsEpic Property

Gets whether the game is running as the Epic Store version

public static bool IsEpic { get; }

Property Value

System.Boolean

ModHelper.IsNet6 Property

Gets whether this is running on net6 MelonLoader

public static bool IsNet6 { get; }

Property Value

System.Boolean

ModHelper.Melons Property

All active mods, whether they're Mod Helper or not

public static System.Collections.Generic.IEnumerable<MelonMod> Melons { get; }

Property Value

System.Collections.Generic.IEnumerable<MelonLoader.MelonMod>

ModHelper.ModHelperDirectory Property

Directory where the Mod Helper stores most of its extra info

public static string ModHelperDirectory { get; }

Property Value

System.String

ModHelper.Mods Property

Active mods that use ModHelper functionality

public static System.Collections.Generic.IEnumerable<BTD_Mod_Helper.BloonsMod> Mods { get; }

Property Value

System.Collections.Generic.IEnumerable<BloonsMod>

ModHelper.ModSourcesDirectory Property

The directory path on the user's system that's set as their Mod Sources folder

public static string ModSourcesDirectory { get; }

Property Value

System.String

Methods

ModHelper.Error(object) Method

Logs an error from the specified Mod's LoggerInstance

public static void Error<T>(object obj)
    where T : BTD_Mod_Helper.BloonsMod;

Type parameters

T

Parameters

obj System.Object

ModHelper.GetMod(string) Method

Gets a BloonsTD6Mod by its name, or returns null if none are loaded with that name


In this case a mod's name is its Assembly Name, which is almost always the same as the file name, but for the
Mod Helper due to compatibility reasons it is "BloonsTD6 Mod Helper" rather than "Btd6ModHelper"

public static BTD_Mod_Helper.BloonsMod GetMod(string name);

Parameters

name System.String

Returns

BloonsMod

ModHelper.GetMod() Method

Gets the instance of a specific BloonsTD6Mod by its type

public static T GetMod<T>()
    where T : BTD_Mod_Helper.BloonsMod;

Type parameters

T

Returns

T

ModHelper.HasMod(string, BloonsMod) Method

Returns whether a mod with the given name is installed, and pass it to the out param if it is

public static bool HasMod(string name, out BTD_Mod_Helper.BloonsMod bloonsMod);

Parameters

name System.String

bloonsMod BloonsMod

Returns

System.Boolean

ModHelper.HasMod(string) Method

Returns whether a mod with the given name is installed

public static bool HasMod(string name);

Parameters

name System.String

Returns

System.Boolean

ModHelper.Log(object) Method

Logs a message from the specified Mod's LoggerInstance

public static void Log<T>(object obj)
    where T : BTD_Mod_Helper.BloonsMod;

Type parameters

T

Parameters

obj System.Object

ModHelper.Msg(object) Method

Logs a message from the specified Mod's LoggerInstance

public static void Msg<T>(object obj)
    where T : BTD_Mod_Helper.BloonsMod;

Type parameters

T

Parameters

obj System.Object

ModHelper.Warning(object) Method

Logs a warning from the specified Mod's LoggerInstance

public static void Warning<T>(object obj)
    where T : BTD_Mod_Helper.BloonsMod;

Type parameters

T

Parameters

obj System.Object

To learn how to download BTD Mod Helper and install mods, click here