Skip to Main Content

BTD_Mod_Helper​.Api​.Helpers​.CostHelper


BloonsTD6 Mod Helper

BTD_Mod_Helper.Api.Helpers

CostHelper Class

Helper for scaling costs to difficulties

public class CostHelper

Inheritance System.Object  CostHelper

Methods

CostHelper.CostForDifficulty(int, float) Method

Applies a multiplier to a cost and rounds it

public static int CostForDifficulty(int cost, float multiplier);

Parameters

cost System.Int32

multiplier System.Single

Returns

System.Int32

CostHelper.CostForDifficulty(int, GameModel) Method

Gets a modified cost for a given GameModel's difficulty

public static int CostForDifficulty(int cost, GameModel gameModel);

Parameters

cost System.Int32

The default cost

gameModel Il2CppAssets.Scripts.Models.GameModel

The current GameModel

Returns

System.Int32
The modified cost

CostHelper.CostForDifficulty(int, InGame) Method

Gets a modified cost for a given instance of InGame

public static int CostForDifficulty(int cost, InGame inGame);

Parameters

cost System.Int32

The default cost

inGame Il2CppAssets.Scripts.Unity.UI_New.InGame.InGame

Current instance of InGame

Returns

System.Int32
The modified cost

CostHelper.CostForDifficulty(int, List) Method

Gets a modified cost for a given set of ModModels that are used to setup a match
Somewhere deep within those mods is likely to be a Cost modifier, and this will find and apply that

public static int CostForDifficulty(int cost, List<ModModel> mods);

Parameters

cost System.Int32

The default cost

mods Il2CppSystem.Collections.Generic.List

The mods that the match is using

Returns

System.Int32
The modified cost

CostHelper.CostForDifficulty(int, string) Method

Scales a base (medium) cost to the given difficulty

public static int CostForDifficulty(int cost, string difficulty);

Parameters

cost System.Int32

difficulty System.String

Returns

System.Int32

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