doombubbles / ultimate-crosspathing

A BTD6 mod that allows for more cross-pathing combinations.
137 stars 179 forks source link

Crosspathing Patch Template #1

Closed doombubbles closed 2 years ago

doombubbles commented 3 years ago

This is an example for how someone could post a Crosspathing Patch that they made to improve the behavior of a specific crosspath.

For figuring out how to fix a tower, enable the "DebugSaveTowerJSON" mod options that's all the way at the bottom of the settings. This will make it save json files to "C:\Users(your user name)\AppData\LocalLow\Ninja Kiwi\BloonsTD6\MergedTowers\" of all the towers that get created.

For a real patch, you'd post the .dll file of the mod in your issue, but attached to this issue is a zip containing a template mod that you can download and edit to make your own patch. If you already know how to create mod projects, then the crux of it is just having your main Mod file look something like this:

using Assets.Scripts.Models.Towers;
using MelonLoader;
using UltimateCrosspathing;

[assembly: MelonInfo(typeof(CrosspathingPatchTemplate.CrosspathingPatchTemplate),
    "Crosspathing Patch Template", "1.0.0", "doombubbles")]
[assembly: MelonGame("Ninja Kiwi", "BloonsTD6")]

namespace CrosspathingPatchTemplate
{
    public class CrosspathingPatchTemplate : CrosspathingPatchMod
    {
        public override void Postmerge(TowerModel towerModel, string baseId, int topPath, int middlePath,
            int bottomPath)
        {
            if (baseId == TowerType.DartMonkey && topPath >= 3 && middlePath >= 3)
            {
                towerModel.baseId = TowerType.DartMonkey;
                MelonLogger.Msg("I'm doing my part!");
            }
        }
    }
}

Download:

CrosspathingPatchTemplate.zip

BCMinecraft21 commented 2 years ago

why is the money for another path 343 undecillion dollars