Table of Contents
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
Audio clips for the embedded sounds in this mod
public System.Collections.Generic.Dictionary<string,AudioClip> AudioClips { get; set; }
System.Collections.Generic.Dictionary<System.String,UnityEngine.AudioClip>
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; }
All ModContent in ths mod
public System.Collections.Generic.IReadOnlyList<BTD_Mod_Helper.Api.ModContent> Content { get; set; }
System.Collections.Generic.IReadOnlyList<ModContent>
The prefix used for the IDs of towers, upgrades, etc for this mod to prevent conflicts with other mods
public virtual string IDPrefix { get; }
The settings in this mod organized by name
public System.Collections.Generic.Dictionary<string,BTD_Mod_Helper.Api.ModOptions.ModSetting> ModSettings { get; }
System.Collections.Generic.Dictionary<System.String,ModSetting>
The path that this mod would most likely be at in the Mod Sources folder
public string ModSourcesPath { get; }
Signifies that the game shouldn't crash / the mod shouldn't stop loading if one of its patches fails
public virtual bool OptionalPatches { get; }
The embedded resources (textures) of this mod
public System.Collections.Generic.Dictionary<string,byte[]> Resources { get; set; }
System.Collections.Generic.Dictionary<System.String,System.Byte[]>
The artifact models stored in the GameData don't have a proper setup of descendents like usual models in the GameModel.
Generating the descendents can add an extra second to start time, so it will only be done if at least one mod says
that it requires them.
public virtual bool UsesArtifactDependants { get; }
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);
modContent
ModContent
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);
modContents
System.Collections.Generic.IEnumerable<ModContent>
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);
type
System.Type
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);
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
System.Object
A possible result of this call
Called when the settings for your mod are loaded
public virtual void OnLoadSettings(JObject settings);
settings
Newtonsoft.Json.Linq.JObject
The json representation of the settings that were just loaded
Called whenever the Mod Options Menu gets opened, after it finishes initializing
public virtual void OnModOptionsOpened();
Called when the settings for your mod are saved.
public virtual void OnSaveSettings(JObject settings);
settings
Newtonsoft.Json.Linq.JObject
The json representation of the settings about to be saved
Saves the current mod settings for this mod
public void SaveModSettings();