Table of Contents
Extensions for the ModModel (GameMode) class
public static class ModModelExt
Inheritance System.Object ModModelExt
Add a Mutator to this ModModel
public static void AddMutator(this ModModel model, MutatorModModel mutator);
model
Il2CppAssets.Scripts.Models.ModModel
mutator
Il2CppAssets.Scripts.Models.MutatorModModel
Return the index'th Mutator of type T, or null
public static T GetMutator<T>(this ModModel model, int index)
where T : MutatorModModel;
T
The Mutator you want
model
Il2CppAssets.Scripts.Models.ModModel
index
System.Int32
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;
T
The Mutator you want
model
Il2CppAssets.Scripts.Models.ModModel
nameContains
System.String
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;
T
The Mutator you want
model
Il2CppAssets.Scripts.Models.ModModel
Return all Mutators of type T
public static System.Collections.Generic.IEnumerable<T> GetMutators<T>(this ModModel model)
where T : MutatorModModel;
T
The Mutator you want
model
Il2CppAssets.Scripts.Models.ModModel
System.Collections.Generic.IEnumerable<T>
Check if this has a specific Mutator and return it
public static bool HasMutator<T>(this ModModel model, out T mutator)
where T : MutatorModModel;
T
The Mutator you're checking for
model
Il2CppAssets.Scripts.Models.ModModel
mutator
T
Check if this has a specific Mutator
public static bool HasMutator<T>(this ModModel model)
where T : MutatorModModel;
T
The Mutator you're checking for
model
Il2CppAssets.Scripts.Models.ModModel
Prevents a particular TowerSet from being used in this mode
public static void LockTowerSet(this ModModel model, TowerSet towerSet, bool locked=true);
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
Removes a specific mutator from a tower
public static void RemoveMutator(this ModModel model, MutatorModModel mutator);
model
Il2CppAssets.Scripts.Models.ModModel
mutator
Il2CppAssets.Scripts.Models.MutatorModModel
Remove the index'th Mutator of Type T
public static void RemoveMutator<T>(this ModModel model, int index)
where T : MutatorModModel;
T
The Mutator you want to remove
model
Il2CppAssets.Scripts.Models.ModModel
index
System.Int32
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;
T
The Mutator you want to remove
model
Il2CppAssets.Scripts.Models.ModModel
nameContains
System.String
Remove the first Mutator of Type T
public static void RemoveMutator<T>(this ModModel model)
where T : MutatorModModel;
T
The Mutator you want to remove
model
Il2CppAssets.Scripts.Models.ModModel
Removes all mutators that match a given condition
public static void RemoveMutators(this ModModel model, System.Func<MutatorModModel,bool> predicate);
model
Il2CppAssets.Scripts.Models.ModModel
predicate
System.Func<Il2CppAssets.Scripts.Models.MutatorModModel,System.Boolean>
Remove all Mutators of type T
public static void RemoveMutators<T>(this ModModel model)
where T : MutatorModModel;
T
model
Il2CppAssets.Scripts.Models.ModModel
Applies a multiplier to all cash gains in the mode (but not starting cash)
public static void SetAllCashMultiplier(this ModModel model, float mult);
model
Il2CppAssets.Scripts.Models.ModModel
mult
System.Single
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);
model
Il2CppAssets.Scripts.Models.ModModel
mult
System.Single
The multiplier to apply to Bloons' health
tag
System.String
The Bloon tag to apply to
Sets whether Continues are enabled for a game mode
public static void SetContinuesEnabled(this ModModel model, bool enabled);
model
Il2CppAssets.Scripts.Models.ModModel
enabled
System.Boolean
Sets the round this mode ends at using a Il2CppAssets.Scripts.Models.Gameplay.Mods.EndRoundModModel
public static void SetEndingRound(this ModModel model, int endingRound);
model
Il2CppAssets.Scripts.Models.ModModel
endingRound
System.Int32
Sets the max health and shield amount to 1
public static void SetImpoppable(this ModModel model, bool impoppable=true);
model
Il2CppAssets.Scripts.Models.ModModel
impoppable
System.Boolean
Sets whether extra income is enabled for a game mode
public static void SetIncomeEnabled(this ModModel model, bool enabled);
model
Il2CppAssets.Scripts.Models.ModModel
enabled
System.Boolean
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);
model
Il2CppAssets.Scripts.Models.ModModel
health
System.Int32
Sets whether Monkey Knowledge is enabled for a gamemode
public static void SetMkEnabled(this ModModel model, bool enabled);
model
Il2CppAssets.Scripts.Models.ModModel
enabled
System.Boolean
Sets whether Powers are enabled for a game mode
public static void SetPowersEnabled(this ModModel model, bool enabled);
model
Il2CppAssets.Scripts.Models.ModModel
enabled
System.Boolean
Sets whether the Bloons go in reverse
public static void SetReversed(this ModModel model, bool reversed=true);
model
Il2CppAssets.Scripts.Models.ModModel
reversed
System.Boolean
Sets whether selling towers is enabled for a game mode
public static void SetSellingEnabled(this ModModel model, bool enabled);
model
Il2CppAssets.Scripts.Models.ModModel
enabled
System.Boolean
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);
model
Il2CppAssets.Scripts.Models.ModModel
mult
System.Single
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);
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
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);
model
Il2CppAssets.Scripts.Models.ModModel
health
System.Int32
Sets the round this mode starts at using a Il2CppAssets.Scripts.Models.Gameplay.Mods.StartingRoundModModel
public static void SetStartingRound(this ModModel model, int startingRound);
model
Il2CppAssets.Scripts.Models.ModModel
startingRound
System.Int32
Makes this GameMode use the given RoundSet
public static void UseRoundSet(this ModModel model, string roundSetName);
model
Il2CppAssets.Scripts.Models.ModModel
roundSetName
System.String
Makes this GameMode use the given RoundSet
public static void UseRoundSet<T>(this ModModel model)
where T : BTD_Mod_Helper.Api.Bloons.ModRoundSet;
T