Inherits Terraria.ModLoader.ModType.
|
virtual void | Apply (Item item) |
| Applies the custom data stats set in SetStats to the given item. More...
|
|
virtual void | AutoStaticDefaults () |
|
virtual bool | CanRoll (Item item) |
| Returns if your ModPrefix can roll on the given item By default returns RollChance(item) > 0 More...
|
|
virtual void | ModifyValue (ref float valueMult) |
| Allows you to modify the sell price of the item based on the prefix or changes in custom data stats. This also influences the item's rarity. More...
|
|
virtual float | RollChance (Item item) |
| The roll chance of your prefix relative to a vanilla prefix, 1f by default. More...
|
|
virtual void | SetStats (ref float damageMult, ref float knockbackMult, ref float useTimeMult, ref float scaleMult, ref float shootSpeedMult, ref float manaMult, ref int critBonus) |
| Sets the stat changes for this prefix. If data is not already pre-stored, it is best to store custom data changes to some static variables. More...
|
|
sealed override void | SetupContent () |
| If you make a new ModType, seal this override, and call SetStaticDefaults in it. More...
|
|
virtual void | ValidateItem (Item item, ref bool invalid) |
| Validates whether this prefix with the custom data stats set from SetStats is allowed on the given item. It is not allowed if one of the stat changes do not cause any change (eg. percentage being too small to make a difference). 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 void | SetStaticDefaults () |
| Allows you to modify the properties after initial loading has completed. More...
|
|
virtual void | Unload () |
| Allows you to safely unload things you added in Load. More...
|
|
◆ Apply()
virtual void Terraria.ModLoader.ModPrefix.Apply |
( |
Item |
item | ) |
|
|
virtual |
Applies the custom data stats set in SetStats to the given item.
◆ CanRoll()
virtual bool Terraria.ModLoader.ModPrefix.CanRoll |
( |
Item |
item | ) |
|
|
virtual |
Returns if your ModPrefix can roll on the given item By default returns RollChance(item) > 0
◆ ModifyValue()
virtual void Terraria.ModLoader.ModPrefix.ModifyValue |
( |
ref float |
valueMult | ) |
|
|
virtual |
Allows you to modify the sell price of the item based on the prefix or changes in custom data stats. This also influences the item's rarity.
◆ Register()
sealed override void Terraria.ModLoader.ModPrefix.Register |
( |
| ) |
|
|
protectedvirtual |
◆ RollChance()
virtual float Terraria.ModLoader.ModPrefix.RollChance |
( |
Item |
item | ) |
|
|
virtual |
The roll chance of your prefix relative to a vanilla prefix, 1f by default.
◆ SetStats()
virtual void Terraria.ModLoader.ModPrefix.SetStats |
( |
ref float |
damageMult, |
|
|
ref float |
knockbackMult, |
|
|
ref float |
useTimeMult, |
|
|
ref float |
scaleMult, |
|
|
ref float |
shootSpeedMult, |
|
|
ref float |
manaMult, |
|
|
ref int |
critBonus |
|
) |
| |
|
virtual |
Sets the stat changes for this prefix. If data is not already pre-stored, it is best to store custom data changes to some static variables.
◆ SetupContent()
sealed override void Terraria.ModLoader.ModPrefix.SetupContent |
( |
| ) |
|
|
virtual |
◆ ValidateItem()
virtual void Terraria.ModLoader.ModPrefix.ValidateItem |
( |
Item |
item, |
|
|
ref bool |
invalid |
|
) |
| |
|
virtual |
Validates whether this prefix with the custom data stats set from SetStats is allowed on the given item. It is not allowed if one of the stat changes do not cause any change (eg. percentage being too small to make a difference).
◆ Category