Table of Contents
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.Object ModContent NamedModContent ModTower ModHero
The total number of abilities that this hero has as max level
OBSOLETE: No longer required to manually specify
public virtual int Abilities { get; }
The other hero that has the same background color in the Heroes menu as you want to use
public virtual string BackgroundStyle { get; }
The default hero (or tower) to base your hero off of
public override string BaseTower { get; }
No other upgrade paths used
public sealed override int BottomPathUpgrades { get; }
The png name of the Button icon for this hero in the UI, by default Name-Button
public virtual string Button { get; }
The exact sprite reference used for the button
public virtual SpriteReference ButtonReference { get; }
Il2CppNinjaKiwi.Common.ResourceUtils.SpriteReference
Heroes aren't in the default shop
public sealed override bool DontAddToShop { get; }
The other hero that has the same glow color in the Heroes menu as you want to use
public virtual string GlowStyle { get; }
Not a thing anyway
public sealed override bool IncludeInMonkeyTeams { get; }
The description to use for the first level of your hero
public abstract string Level1Description { get; }
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; }
No other upgrade paths used
public sealed override int MiddlePathUpgrades { get; }
The other hero that has the same colored name in the Heroes menu as you want to use
public virtual string NameStyle { get; }
No paragon heroes
public sealed override BTD_Mod_Helper.Api.Towers.ParagonMode ParagonMode { get; }
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; }
System.Collections.Generic.Dictionary<System.Int32,Il2CppNinjaKiwi.Common.ResourceUtils.SpriteReference>
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; }
The name of the png to try to find for the new hero select screen button
public virtual string Square { get; }
The SpriteReference for this hero's Square icon in the new revamped HeroScreen
public virtual SpriteReference SquareReference { get; }
Il2CppNinjaKiwi.Common.ResourceUtils.SpriteReference
The short description that appears under the name of the hero
public abstract string Title { get; }
Putting all the hero level upgrades in the top path
public sealed override int TopPathUpgrades { get; }
Heroes can only be in the Hero tower set
public sealed override TowerSet TowerSet { get; }
Il2CppAssets.Scripts.Models.TowerSets.TowerSet
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; }
Creates the SkinData for the default tower
public virtual SkinData CreateDefaultSkin(System.Collections.Generic.Dictionary<string,SkinData> skinsByName);
skinsByName
System.Collections.Generic.Dictionary<System.String,Il2CppAssets.Scripts.Data.Skins.SkinData>
Existing hero skins by their skin/tower name
Il2CppAssets.Scripts.Data.Skins.SkinData
Gets the Background Banner for the default SkinData
public virtual PrefabReference GetBackgroundBanner(System.Collections.Generic.Dictionary<string,SkinData> skinsByName);
skinsByName
System.Collections.Generic.Dictionary<System.String,Il2CppAssets.Scripts.Data.Skins.SkinData>
Existing hero skins by their skin/tower name
Il2CppNinjaKiwi.Common.ResourceUtils.PrefabReference
Gets the background color for the default SkinData
public virtual Color GetBackgroundColor(System.Collections.Generic.Dictionary<string,SkinData> skinsByName);
skinsByName
System.Collections.Generic.Dictionary<System.String,Il2CppAssets.Scripts.Data.Skins.SkinData>
Existing hero skins by their skin/tower name
Gets the font material for the default SkinData
public virtual string GetFontMaterial(System.Collections.Generic.Dictionary<string,SkinData> skinsByName);
skinsByName
System.Collections.Generic.Dictionary<System.String,Il2CppAssets.Scripts.Data.Skins.SkinData>
Existing hero skins by their skin/tower name
The index to add this hero at in relation to other heroes
public virtual int GetHeroIndex(System.Collections.Generic.List<HeroDetailsModel> heroSet);
heroSet
System.Collections.Generic.List<Il2CppAssets.Scripts.Models.TowerSets.HeroDetailsModel>
Heroes tower tiers are always Level-0-0
public sealed override System.Collections.Generic.IEnumerable<int[]> TowerTiers();