Skip to Main Content
Table of Contents

BTD_Mod_Helper​.Extensions​.ModModelExt


BloonsTD6 Mod Helper

BTD_Mod_Helper.Extensions

ModModelExt Class

Extensions for the ModModel (GameMode) class

public static class ModModelExt

Inheritance System.Object  ModModelExt

Methods

ModModelExt.AddMutator(this ModModel, MutatorModModel) Method

Add a Mutator to this ModModel

public static void AddMutator(this ModModel model, MutatorModModel mutator);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

mutator Il2CppAssets.Scripts.Models.MutatorModModel

ModModelExt.GetMutator(this ModModel, int) Method

Return the index'th Mutator of type T, or null

public static T GetMutator<T>(this ModModel model, int index)
    where T : MutatorModModel;

Type parameters

T

The Mutator you want

Parameters

model Il2CppAssets.Scripts.Models.ModModel

index System.Int32

Returns

T

ModModelExt.GetMutator(this ModModel, string) Method

Return the first Mutator of type T whose name contains the given string, or null

public static T GetMutator<T>(this ModModel model, string nameContains)
    where T : MutatorModModel;

Type parameters

T

The Mutator you want

Parameters

model Il2CppAssets.Scripts.Models.ModModel

nameContains System.String

Returns

T

ModModelExt.GetMutator(this ModModel) Method

Return the first Mutator of type T, or null if there isn't one

public static T GetMutator<T>(this ModModel model)
    where T : MutatorModModel;

Type parameters

T

The Mutator you want

Parameters

model Il2CppAssets.Scripts.Models.ModModel

Returns

T

ModModelExt.GetMutators(this ModModel) Method

Return all Mutators of type T

public static System.Collections.Generic.IEnumerable<T> GetMutators<T>(this ModModel model)
    where T : MutatorModModel;

Type parameters

T

The Mutator you want

Parameters

model Il2CppAssets.Scripts.Models.ModModel

Returns

System.Collections.Generic.IEnumerable<T>

ModModelExt.HasMutator(this ModModel, T) Method

Check if this has a specific Mutator and return it

public static bool HasMutator<T>(this ModModel model, out T mutator)
    where T : MutatorModModel;

Type parameters

T

The Mutator you're checking for

Parameters

model Il2CppAssets.Scripts.Models.ModModel

mutator T

Returns

System.Boolean

ModModelExt.HasMutator(this ModModel) Method

Check if this has a specific Mutator

public static bool HasMutator<T>(this ModModel model)
    where T : MutatorModModel;

Type parameters

T

The Mutator you're checking for

Parameters

model Il2CppAssets.Scripts.Models.ModModel

Returns

System.Boolean

ModModelExt.LockTowerSet(this ModModel, TowerSet, bool) Method

Prevents a particular TowerSet from being used in this mode

public static void LockTowerSet(this ModModel model, TowerSet towerSet, bool locked=true);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

towerSet Il2CppAssets.Scripts.Models.TowerSets.TowerSet

The tower set to lock

locked System.Boolean

Whether to lock or unlock the tower set

ModModelExt.RemoveMutator(this ModModel, MutatorModModel) Method

Removes a specific mutator from a tower

public static void RemoveMutator(this ModModel model, MutatorModModel mutator);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

mutator Il2CppAssets.Scripts.Models.MutatorModModel

ModModelExt.RemoveMutator(this ModModel, int) Method

Remove the index'th Mutator of Type T

public static void RemoveMutator<T>(this ModModel model, int index)
    where T : MutatorModModel;

Type parameters

T

The Mutator you want to remove

Parameters

model Il2CppAssets.Scripts.Models.ModModel

index System.Int32

ModModelExt.RemoveMutator(this ModModel, string) Method

Remove the first Mutator of Type T whose name contains a certain string

public static void RemoveMutator<T>(this ModModel model, string nameContains)
    where T : MutatorModModel;

Type parameters

T

The Mutator you want to remove

Parameters

model Il2CppAssets.Scripts.Models.ModModel

nameContains System.String

ModModelExt.RemoveMutator(this ModModel) Method

Remove the first Mutator of Type T

public static void RemoveMutator<T>(this ModModel model)
    where T : MutatorModModel;

Type parameters

T

The Mutator you want to remove

Parameters

model Il2CppAssets.Scripts.Models.ModModel

ModModelExt.RemoveMutators(this ModModel, Func<MutatorModModel,bool>) Method

Removes all mutators that match a given condition

public static void RemoveMutators(this ModModel model, System.Func<MutatorModModel,bool> predicate);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

predicate System.Func<Il2CppAssets.Scripts.Models.MutatorModModel,System.Boolean>

ModModelExt.RemoveMutators(this ModModel) Method

Remove all Mutators of type T

public static void RemoveMutators<T>(this ModModel model)
    where T : MutatorModModel;

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.ModModel

ModModelExt.SetAllCashMultiplier(this ModModel, float) Method

Applies a multiplier to all cash gains in the mode (but not starting cash)

public static void SetAllCashMultiplier(this ModModel model, float mult);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

mult System.Single

ModModelExt.SetBloonHealth(this ModModel, float, string) Method

Modifies the Health that Bloons with a given tag have, like BTD_Mod_Helper.Api.Enums.BloonTag.Moabs for all Moabs

public static void SetBloonHealth(this ModModel model, float mult, string tag);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

mult System.Single

The multiplier to apply to Bloons' health

tag System.String

The Bloon tag to apply to

ModModelExt.SetContinuesEnabled(this ModModel, bool) Method

Sets whether Continues are enabled for a game mode

public static void SetContinuesEnabled(this ModModel model, bool enabled);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

enabled System.Boolean

ModModelExt.SetEndingRound(this ModModel, int) Method

Sets the round this mode ends at using a Il2CppAssets.Scripts.Models.Gameplay.Mods.EndRoundModModel

public static void SetEndingRound(this ModModel model, int endingRound);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

endingRound System.Int32

ModModelExt.SetImpoppable(this ModModel, bool) Method

Sets the max health and shield amount to 1

public static void SetImpoppable(this ModModel model, bool impoppable=true);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

impoppable System.Boolean

ModModelExt.SetIncomeEnabled(this ModModel, bool) Method

Sets whether extra income is enabled for a game mode

public static void SetIncomeEnabled(this ModModel model, bool enabled);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

enabled System.Boolean

ModModelExt.SetMaxHealth(this ModModel, int) Method

Sets the maximum life total this mode starts you with using a Il2CppAssets.Scripts.Models.Gameplay.Mods.MaxHealthModModel

public static void SetMaxHealth(this ModModel model, int health);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

health System.Int32

ModModelExt.SetMkEnabled(this ModModel, bool) Method

Sets whether Monkey Knowledge is enabled for a gamemode

public static void SetMkEnabled(this ModModel model, bool enabled);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

enabled System.Boolean

ModModelExt.SetPowersEnabled(this ModModel, bool) Method

Sets whether Powers are enabled for a game mode

public static void SetPowersEnabled(this ModModel model, bool enabled);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

enabled System.Boolean

ModModelExt.SetReversed(this ModModel, bool) Method

Sets whether the Bloons go in reverse

public static void SetReversed(this ModModel model, bool reversed=true);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

reversed System.Boolean

ModModelExt.SetSellingEnabled(this ModModel, bool) Method

Sets whether selling towers is enabled for a game mode

public static void SetSellingEnabled(this ModModel model, bool enabled);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

enabled System.Boolean

ModModelExt.SetSellMultiplier(this ModModel, float) Method

Sets the portion of cash that should be gotten back when selling (0.7 by default)

public static void SetSellMultiplier(this ModModel model, float mult);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

mult System.Single

ModModelExt.SetStartingCash(this ModModel, int, int, float) Method

Sets the cash this mode starts you with using a Il2CppAssets.Scripts.Models.Gameplay.Mods.StartingCashModModel

public static void SetStartingCash(this ModModel model, int baseCash=0, int addCash=0, float multCash=0f);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

baseCash System.Int32

If not 0, the new base cash amount to set the starting amount to

addCash System.Int32

How much cash to add to the default base cash

multCash System.Single

If not 0, an overall multiplier to the amount of starting cash

ModModelExt.SetStartingHealth(this ModModel, int) Method

Sets the life total this mode starts you with using a Il2CppAssets.Scripts.Models.Gameplay.Mods.StartingCashModModel

public static void SetStartingHealth(this ModModel model, int health);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

health System.Int32

ModModelExt.SetStartingRound(this ModModel, int) Method

Sets the round this mode starts at using a Il2CppAssets.Scripts.Models.Gameplay.Mods.StartingRoundModModel

public static void SetStartingRound(this ModModel model, int startingRound);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

startingRound System.Int32

ModModelExt.UseRoundSet(this ModModel, string) Method

Makes this GameMode use the given RoundSet

public static void UseRoundSet(this ModModel model, string roundSetName);

Parameters

model Il2CppAssets.Scripts.Models.ModModel

roundSetName System.String

ModModelExt.UseRoundSet(this ModModel) Method

Makes this GameMode use the given RoundSet

public static void UseRoundSet<T>(this ModModel model)
    where T : BTD_Mod_Helper.Api.Bloons.ModRoundSet;

Type parameters

T

Parameters

model Il2CppAssets.Scripts.Models.ModModel

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