Skip to Main Content

BTD_Mod_Helper​.BloonsMod


BloonsTD6 Mod Helper

BTD_Mod_Helper

BloonsMod Class

Expanded version of MelonMod to suit the needs of BTD Mod Helper

public abstract class BloonsMod :
BTD_Mod_Helper.Api.Data.IModSettings,
BTD_Mod_Helper.Api.IModContent

Inheritance MelonLoader.MelonMod  BloonsMod

Derived
BloonsTD6Mod

Implements IModSettings, IModContent

Properties

BloonsMod.AudioClips Property

Audio clips for the embedded sounds in this mod

public System.Collections.Generic.Dictionary<string,AudioClip> AudioClips { get; set; }

Property Value

System.Collections.Generic.Dictionary<System.String,UnityEngine.AudioClip>

BloonsMod.CheatMod Property

Setting this to true will prevent your BloonsTD6Mod hooks from executing if the player could get flagged for using mods
at that time.


For example, using mods in public co-op

public virtual bool CheatMod { get; }

Property Value

System.Boolean

BloonsMod.Content Property

All ModContent in ths mod

public System.Collections.Generic.IReadOnlyList<BTD_Mod_Helper.Api.ModContent> Content { get; set; }

Property Value

System.Collections.Generic.IReadOnlyList<ModContent>

BloonsMod.IDPrefix Property

The prefix used for the IDs of towers, upgrades, etc for this mod to prevent conflicts with other mods

public virtual string IDPrefix { get; }

Property Value

System.String

BloonsMod.ModSettings Property

The settings in this mod organized by name

public System.Collections.Generic.Dictionary<string,BTD_Mod_Helper.Api.ModOptions.ModSetting> ModSettings { get; }

Property Value

System.Collections.Generic.Dictionary<System.String,ModSetting>

BloonsMod.ModSourcesPath Property

The path that this mod would most likely be at in the Mod Sources folder

public string ModSourcesPath { get; }

Property Value

System.String

BloonsMod.OptionalPatches Property

Signifies that the game shouldn't crash / the mod shouldn't stop loading if one of its patches fails

public virtual bool OptionalPatches { get; }

Property Value

System.Boolean

BloonsMod.Resources Property

The embedded resources (textures) of this mod

public System.Collections.Generic.Dictionary<string,byte[]> Resources { get; set; }

Property Value

System.Collections.Generic.Dictionary<System.String,System.Byte[]>

Methods

BloonsMod.AddContent(ModContent) Method

Manually adds new ModContent to the mod. Does not directly call BTD_Mod_Helper.Api.ModContent.Load or
BTD_Mod_Helper.Api.ModContent.Register, but the latter will still end up being called if this is added before the
Registration phase.

public void AddContent(BTD_Mod_Helper.Api.ModContent modContent);

Parameters

modContent ModContent

BloonsMod.AddContent(IEnumerable) Method

Manually adds multiple new ModContent to the mod. Does not directly call BTD_Mod_Helper.Api.ModContent.Load or
BTD_Mod_Helper.Api.ModContent.Register, but the latter will still end up being called if this is added before the
Registration phase.

public void AddContent(System.Collections.Generic.IEnumerable<BTD_Mod_Helper.Api.ModContent> modContents);

Parameters

modContents System.Collections.Generic.IEnumerable<ModContent>

BloonsMod.ApplyHarmonyPatches(Type) Method

Tries to apply all Harmony Patches defined within a type. Logs a warning and adds a load error if any fail.

public void ApplyHarmonyPatches(System.Type type);

Parameters

type System.Type

BloonsMod.Call(string, object[]) Method

Allows you to define ways for other mods to interact with this mod. Other mods could do:

ModHelper.GetMod("YourModName")?.Call("YourOperationName", ...);  

to execute functionality here.

public virtual object Call(string operation, params object[] parameters);

Parameters

operation System.String

A string for the name of the operation that another mods wants to call

parameters System.Object[]

The parameters that another mod has provided

Returns

System.Object
A possible result of this call

BloonsMod.OnLoadSettings(JObject) Method

Called when the settings for your mod are loaded

public virtual void OnLoadSettings(JObject settings);

Parameters

settings Newtonsoft.Json.Linq.JObject

The json representation of the settings that were just loaded

BloonsMod.OnModOptionsOpened() Method

Called whenever the Mod Options Menu gets opened, after it finishes initializing

public virtual void OnModOptionsOpened();

BloonsMod.OnSaveSettings(JObject) Method

Called when the settings for your mod are saved.

public virtual void OnSaveSettings(JObject settings);

Parameters

settings Newtonsoft.Json.Linq.JObject

The json representation of the settings about to be saved

BloonsMod.SaveModSettings() Method

Saves the current mod settings for this mod

public void SaveModSettings();
To learn how to download BTD Mod Helper and install mods, click here