Skip to Main Content

BTD_Mod_Helper​.Api​.Towers​.ModHero


BloonsTD6 Mod Helper

BTD_Mod_Helper.Api.Towers

ModHero Class

Class for adding a custom Hero to the game. Use alongside ModHeroLevel to give multiple levels.

public abstract class ModHero : BTD_Mod_Helper.Api.Towers.ModTower

Inheritance System.ObjectModContentNamedModContentModTower  ModHero

Properties

ModHero.Abilities Property

The total number of abilities that this hero has as max level


OBSOLETE: No longer required to manually specify

public virtual int Abilities { get; }

Property Value

System.Int32

ModHero.BackgroundStyle Property

The other hero that has the same background color in the Heroes menu as you want to use

public virtual string BackgroundStyle { get; }

Property Value

System.String

ModHero.BaseTower Property

The default hero (or tower) to base your hero off of

public override string BaseTower { get; }

Property Value

System.String

ModHero.BottomPathUpgrades Property

No other upgrade paths used

public sealed override int BottomPathUpgrades { get; }

Property Value

System.Int32

ModHero.Button Property

The png name of the Button icon for this hero in the UI, by default Name-Button

public virtual string Button { get; }

Property Value

System.String

ModHero.ButtonReference Property

The exact sprite reference used for the button

public virtual SpriteReference ButtonReference { get; }

Property Value

Il2CppNinjaKiwi.Common.ResourceUtils.SpriteReference

ModHero.DontAddToShop Property

Heroes aren't in the default shop

public sealed override bool DontAddToShop { get; }

Property Value

System.Boolean

ModHero.GlowStyle Property

The other hero that has the same glow color in the Heroes menu as you want to use

public virtual string GlowStyle { get; }

Property Value

System.String

ModHero.IncludeInMonkeyTeams Property

Not a thing anyway

public sealed override bool IncludeInMonkeyTeams { get; }

Property Value

System.Boolean

ModHero.Level1Description Property

The description to use for the first level of your hero

public abstract string Level1Description { get; }

Property Value

System.String

ModHero.MaxLevel Property

The total number of levels this hero has. Do not set this to anything other than number of ModHeroLevels
that you've actually created for your Hero.

public virtual int MaxLevel { get; }

Property Value

System.Int32

ModHero.MiddlePathUpgrades Property

No other upgrade paths used

public sealed override int MiddlePathUpgrades { get; }

Property Value

System.Int32

ModHero.NameStyle Property

The other hero that has the same colored name in the Heroes menu as you want to use

public virtual string NameStyle { get; }

Property Value

System.String

ModHero.ParagonMode Property

No paragon heroes

public sealed override BTD_Mod_Helper.Api.Towers.ParagonMode ParagonMode { get; }

Property Value

ParagonMode

ModHero.SelectScreenPortraits Property

If you want to manually override which portraits your hero uses in the select screen, mess with this


By default will find any PortraitReferences defined in your ModHeroLevels


The SpriteReference is the actual image that will be displayed

public virtual System.Collections.Generic.Dictionary<int,SpriteReference> SelectScreenPortraits { get; }

Property Value

System.Collections.Generic.Dictionary<System.Int32,Il2CppNinjaKiwi.Common.ResourceUtils.SpriteReference>

ModHero.SelectSound Property

Sound to play when you select this hero in the hero select screen, the sound must be registered in the game for it to
play

public virtual string SelectSound { get; }

Property Value

System.String

ModHero.Square Property

The name of the png to try to find for the new hero select screen button

public virtual string Square { get; }

Property Value

System.String

ModHero.SquareReference Property

The SpriteReference for this hero's Square icon in the new revamped HeroScreen

public virtual SpriteReference SquareReference { get; }

Property Value

Il2CppNinjaKiwi.Common.ResourceUtils.SpriteReference

ModHero.Title Property

The short description that appears under the name of the hero

public abstract string Title { get; }

Property Value

System.String

ModHero.TopPathUpgrades Property

Putting all the hero level upgrades in the top path

public sealed override int TopPathUpgrades { get; }

Property Value

System.Int32

ModHero.TowerSet Property

Heroes can only be in the Hero tower set

public sealed override TowerSet TowerSet { get; }

Property Value

Il2CppAssets.Scripts.Models.TowerSets.TowerSet

ModHero.XpRatio Property

XpRatio to use when determining the default xp costs of the levels.


All four base heroes (Quincy, Gwendolin, Striker Jones, Obyn Greenfoot) as well as Etienne have an XP ratio of 1x.


Ezili, Pat Fusty, Admiral Brickell, and Sauda have a 1.425x XP ratio.


Benjamin and Psi have an XP ratio of 1.5x.


Captain Churchill and Adora have a ratio of 1.71x.

public abstract float XpRatio { get; }

Property Value

System.Single

Methods

ModHero.CreateDefaultSkin(Dictionary<string,SkinData>) Method

Creates the SkinData for the default tower

public virtual SkinData CreateDefaultSkin(System.Collections.Generic.Dictionary<string,SkinData> skinsByName);

Parameters

skinsByName System.Collections.Generic.Dictionary<System.String,Il2CppAssets.Scripts.Data.Skins.SkinData>

Existing hero skins by their skin/tower name

Returns

Il2CppAssets.Scripts.Data.Skins.SkinData

ModHero.GetBackgroundBanner(Dictionary<string,SkinData>) Method

Gets the Background Banner for the default SkinData

public virtual PrefabReference GetBackgroundBanner(System.Collections.Generic.Dictionary<string,SkinData> skinsByName);

Parameters

skinsByName System.Collections.Generic.Dictionary<System.String,Il2CppAssets.Scripts.Data.Skins.SkinData>

Existing hero skins by their skin/tower name

Returns

Il2CppNinjaKiwi.Common.ResourceUtils.PrefabReference

ModHero.GetBackgroundColor(Dictionary<string,SkinData>) Method

Gets the background color for the default SkinData

public virtual Color GetBackgroundColor(System.Collections.Generic.Dictionary<string,SkinData> skinsByName);

Parameters

skinsByName System.Collections.Generic.Dictionary<System.String,Il2CppAssets.Scripts.Data.Skins.SkinData>

Existing hero skins by their skin/tower name

Returns

UnityEngine.Color

ModHero.GetFontMaterial(Dictionary<string,SkinData>) Method

Gets the font material for the default SkinData

public virtual string GetFontMaterial(System.Collections.Generic.Dictionary<string,SkinData> skinsByName);

Parameters

skinsByName System.Collections.Generic.Dictionary<System.String,Il2CppAssets.Scripts.Data.Skins.SkinData>

Existing hero skins by their skin/tower name

Returns

System.String

ModHero.GetHeroIndex(List) Method

The index to add this hero at in relation to other heroes

public virtual int GetHeroIndex(System.Collections.Generic.List<HeroDetailsModel> heroSet);

Parameters

heroSet System.Collections.Generic.List<Il2CppAssets.Scripts.Models.TowerSets.HeroDetailsModel>

Returns

System.Int32

ModHero.TowerTiers() Method

Heroes tower tiers are always Level-0-0

public sealed override System.Collections.Generic.IEnumerable<int[]> TowerTiers();

Returns

System.Collections.Generic.IEnumerable<System.Int32[]>

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