tModLoader v2022.09
A mod to make and play Terraria mods
Terraria.ModLoader.VanillaDamageClass Class Reference

Inherits Terraria.ModLoader.DamageClass.

Inherited by Terraria.ModLoader.DefaultDamageClass, Terraria.ModLoader.GenericDamageClass, Terraria.ModLoader.MagicDamageClass, Terraria.ModLoader.MagicSummonHybridDamageClass, Terraria.ModLoader.MeleeDamageClass, Terraria.ModLoader.MeleeNoSpeedDamageClass, Terraria.ModLoader.RangedDamageClass, Terraria.ModLoader.SummonDamageClass, Terraria.ModLoader.SummonMeleeSpeedDamageClass, and Terraria.ModLoader.ThrowingDamageClass.

Properties

override string DisplayNameInternal [get]
 
abstract string LangKey [get]
 
- Properties inherited from Terraria.ModLoader.DamageClass
ModTranslation ClassName [get, set]
 This is the translation that is used behind DisplayName. The translation will show up when an item tooltip displays 'X [ClassName]'. This should include the 'damage' part.
 
static DamageClass Default = new DefaultDamageClass() [get]
 Default damage class for non-classed weapons and items, does not benefit from Generic bonuses
 
string DisplayName [get]
 This is the name that will show up when an item tooltip displays 'X [ClassName]'. This should include the 'damage' part.
 
virtual string DisplayNameInternal [get]
 
static DamageClass Generic = new GenericDamageClass() [get]
 Base damage class for all weapons. All vanilla damage classes inherit bonuses applied to this class. Accessories which benefit all classes provide bonuses via the Generic class
 
static DamageClass Magic = new MagicDamageClass() [get]
 
static DamageClass MagicSummonHybrid = new MagicSummonHybridDamageClass() [get]
 This is a damage class used solely by vanilla forbidden storm. It scales with both magic and summon damage modifiers.
 
static DamageClass Melee = new MeleeDamageClass() [get]
 
static DamageClass MeleeNoSpeed = new MeleeNoSpeedDamageClass() [get]
 This is a damage class used by various projectile-only vanilla melee weapons. Attack speed has no effect on items with this damage class.
 
static DamageClass Ranged = new RangedDamageClass() [get]
 
static DamageClass Summon = new SummonDamageClass() [get]
 
static DamageClass SummonMeleeSpeed = new SummonMeleeSpeedDamageClass() [get]
 This is a damage class used solely by vanilla whips. It benefits from melee attackSpeed bonuses.
 
static DamageClass Throwing = new ThrowingDamageClass() [get]
 Class provided for modders who want to coordinate throwing accessories and items. Not used by any vanilla items.
 
int Type [get, set]
 This is the internal ID of this DamageClass.
 
virtual bool UseStandardCritCalcs [get]
 This lets you decide whether or not your damage class will use standard crit chance calculations. Setting this to false will also hide the critical strike chance line in the tooltip of any item that uses this DamageClass.
 
- Properties inherited from Terraria.ModLoader.ModType< TEntity, TModType >
virtual bool CloneNewInstances [get]
 Whether to create new instances of this mod type via Clone(TEntity) or via the default constructor Defaults to false (default constructor).
 
TEntity Entity [get, set]
 
string FullName [get]
 The internal name of this, including the mod it is from. More...
 
virtual bool IsCloneable [get]
 Whether or not this type is cloneable. Cloning is supported if
all reference typed fields in each sub-class which doesn't override Clone are marked with [CloneByReference]
 
Mod Mod [get, set]
 The mod this belongs to. More...
 
virtual string Name [get]
 The internal name of this. More...
 
- Properties inherited from Terraria.ModLoader.IModType
string FullName [get]
 => $"{Mod.Name}/{Name}" More...
 
Mod Mod [get]
 The mod this belongs to. More...
 
string Name [get]
 The internal name of this instance. More...
 
- Properties inherited from Terraria.ModLoader.ModType< TEntity >
virtual bool CloneNewInstances [get]
 Whether to create new instances of this mod type via Clone(TEntity) or via the default constructor Defaults to false (default constructor).
 
TEntity Entity [get, set]
 
string FullName [get]
 The internal name of this, including the mod it is from. More...
 
virtual bool IsCloneable [get]
 Whether or not this type is cloneable. Cloning is supported if
all reference typed fields in each sub-class which doesn't override Clone are marked with [CloneByReference]
 
Mod Mod [get, set]
 The mod this belongs to. More...
 
virtual string Name [get]
 The internal name of this. More...
 

Additional Inherited Members

- Public Member Functions inherited from Terraria.ModLoader.DamageClass
bool CountsAsClass (DamageClass damageClass)
 
bool CountsAsClass< T > ()
 
virtual bool GetEffectInheritance (DamageClass damageClass)
 This lets you define the classes that this DamageClass will count as (other than itself) for the purpose of armor and accessory effects, such as Spectre armor's bolts on magic attacks, or Magma Stone's Hellfire debuff on melee attacks. Returns false in all cases by default, which does not let any other classes' effects trigger on this DamageClass. For a more in-depth explanation and demonstration, refer to ExampleMod/Content/DamageClasses/ExampleDamageClass. More...
 
virtual StatInheritanceData GetModifierInheritance (DamageClass damageClass)
 This lets you define the classes that this DamageClass will benefit from (other than itself) for the purposes of stat bonuses, such as damage and crit chance. This returns a struct called StatInheritanceData. This is used to allow extensive specifications for what your damage class can and can't benefit from in terms of other classes' stat bonuses. By default, this will return StatInheritanceData.Full for DamageClass.Generic, and StatInheritanceData.None for any other. Any given DamageClass will also never call this method for itself. For a more in-depth explanation and demonstration, refer to ExampleMod/Content/DamageClasses/ExampleDamageClass. More...
 
virtual void SetDefaultStats (Player player)
 This lets you define default stat modifiers for all items of this class (e.g. base crit chance). More...
 
sealed override void SetupContent ()
 If you make a new ModType, seal this override, and call SetStaticDefaults in it. More...
 
virtual bool ShowStatTooltipLine (Player player, string lineName)
 This lets you enable or disable standard statistical tooltip lines displaying on items associated with this DamageClass. The lines usable are "Damage", "CritChance", "Speed", and "Knockback". More...
 
virtual TModType Clone (TEntity newEntity)
 Create a copy of this instanced global. Called when an entity is cloned. More...
 
virtual bool IsLoadingEnabled (Mod mod)
 Allows you to stop Mod.AddContent from actually adding this content. Useful for items that can be disabled by a config. More...
 
virtual void Load ()
 Allows you to perform one-time loading tasks. Beware that mod content has not finished loading here, things like ModContent lookup tables or ID Sets are not fully populated. More...
 
virtual TModType NewInstance (TEntity entity)
 Create a new instance of this ModType for a specific entity More...
 
virtual void SetStaticDefaults ()
 Allows you to modify the properties after initial loading has completed. More...
 
virtual void SetupContent ()
 If you make a new ModType, seal this override, and call SetStaticDefaults in it. More...
 
virtual void Unload ()
 Allows you to safely unload things you added in Load. More...
 
virtual bool IsLoadingEnabled (Mod mod)
 Whether or not this type should be loaded when it's told to. Returning false disables Mod.AddContent from actually loading this type. More...
 
abstract void Load (Mod mod)
 Called when loading the type. More...
 
abstract void Unload ()
 Called during unloading when needed. More...
 
virtual TModType Clone (TEntity newEntity)
 Create a copy of this instanced global. Called when an entity is cloned. More...
 
virtual bool IsLoadingEnabled (Mod mod)
 Allows you to stop Mod.AddContent from actually adding this content. Useful for items that can be disabled by a config. More...
 
virtual void Load ()
 Allows you to perform one-time loading tasks. Beware that mod content has not finished loading here, things like ModContent lookup tables or ID Sets are not fully populated. More...
 
virtual TModType NewInstance (TEntity entity)
 Create a new instance of this ModType for a specific entity More...
 
virtual void SetStaticDefaults ()
 Allows you to modify the properties after initial loading has completed. More...
 
virtual void SetupContent ()
 If you make a new ModType, seal this override, and call SetStaticDefaults in it. More...
 
virtual void Unload ()
 Allows you to safely unload things you added in Load. More...
 
- Protected Member Functions inherited from Terraria.ModLoader.DamageClass
sealed override void Register ()
 If you make a new ModType, seal this override. More...
 
- Protected Member Functions inherited from Terraria.ModLoader.ModType< TEntity, TModType >
abstract TEntity CreateTemplateEntity ()
 
virtual void InitTemplateInstance ()
 Create dummy objects for instanced mod-types More...
 
override void InitTemplateInstance ()
 Create dummy objects for instanced mod-types More...
 
abstract void Register ()
 If you make a new ModType, seal this override. More...
 
virtual void ValidateType ()
 Check for the correct overrides of different hook methods and fields and properties More...
 
- Protected Member Functions inherited from Terraria.ModLoader.ModType< TEntity >
abstract TEntity CreateTemplateEntity ()
 
virtual void InitTemplateInstance ()
 Create dummy objects for instanced mod-types More...
 
override void InitTemplateInstance ()
 Create dummy objects for instanced mod-types
 
abstract void Register ()
 If you make a new ModType, seal this override. More...
 
virtual void ValidateType ()
 Check for the correct overrides of different hook methods and fields and properties More...