Table of Contents
Custom UI (ModHelperComponents)
You'll want to make a new project of the type "Class Library (.NET Framework)"
btd6.targets
file in it.I'd recommend checking the "Place Solution and project in the same directory" box on the next page, but that's up to you.
The new, easy way of doing dependencies is to utilize the btd6.targets
file. With your project opened up, double click your project in the solution explorer to edit your .csproj file. You'll want to add the line <Import Project="..\btd6.targets" />
near the bottom, which will look something like this
You will want to add the following files as dependencies for your mod:
Required
Reccomended
The most common location for your BloonsTD6 folder is "C:\Program Files (x86)\Steam\steamapps\common\BloonsTD6" but you can also find it by going to steam and do Manage -> Browse Local Files
In order to access all of the Mod Helper's features, you need a Main mod file that extends from BloonsTD6Mod
instead of MelonMod
.
using BTD_Mod_Helper;
using MelonLoader;
[assembly: MelonInfo(typeof(TemplateMod.Main), "Your Mod Name", "1.0.0", "Your Name")]
[assembly: MelonGame("Ninja Kiwi", "BloonsTD6")]
namespace TemplateMod
{
public class Main : BloonsTD6Mod
{
}
}
This will be important for many Mod Helper features, like Towers, In Game Mod Settings, Auto Updating, and Hooks.
To actually compile your mod, you're going to want to enable the "Build Toolbar" in Visual Studio.
Then, when you hit the Build Button, it will compile your mod and create your .dll file in the "...\YourModName\bin\Debug" folder by default.
If you don't want to have to move the .dll file from there to your mods folder every time, then you can add a Post-Build Event to copy it.
The text is copy "$(TargetDir)$(TargetFileName)" "C:\Program Files (x86)\Steam\steamapps\common\BloonsTD6\Mods" /y
You might need to change that path if your Bloons TD 6 is installed in a different location.