tModLoader v2024.09
A mod to make and play Terraria mods
|
Classes | |
class | BuffMountData |
Stores data for mount buffs. More... | |
Static Public Attributes | |
static BuffMountData[] | BasicMountData |
If not null for a given BuffID, then that buff is linked to a Mount and will forcibly mount the player if active. All entries in this set should have Main.buffNoTimeDisplay and Main.buffNoSave set to true . Defaults to null . | |
static bool[] | CanBeRemovedByNetMessage = Factory.CreateBoolSet(313) |
If true for a given BuffID, then that buff can be removed from an NPC using NPC.RequestBuffRemoval(int). Useful for "flag" buffs that should go away on hit, like the Firecracker'sFlameWhipEnemyDebuff. Defaults to false . | |
static SetFactory | Factory = new SetFactory(BuffLoader.BuffCount) |
static List< int >[] | GrantImmunityWith |
An NPC will automatically become immune (NPC.buffImmune) to the indexed buff type if it is already immune to any buff in the corresponding List. For NPCs with NPCID.Sets.ImmuneToAllBuffs or NPCID.Sets.ImmuneToRegularBuffs set to true, the reverse of that logic is used to automatically set the NPC as vulnerable: The NPC will automatically become vulnerable to the indexed buff type if it is specifically vulnerable to all of the buffs in the corresponding List. This set helps standardize several buff immunity inheritance rules that are effectively present in Terraria while providing modders the ability to do the same. For example, all NPC with immunity to OnFire are also immune to OnFire3 (aka, "On Fire!" and "Hellfire"). Modders can use this set to create buffs that act as variants of existing buffs, and should inherit the immunity value of those existing buffs. NPC from Terraria and other mods will automatically have these immunity rules applied, regardless of mod load order. More... | |
static bool[] | IsAFlaskBuff = Factory.CreateBoolSet(71, 72, 73, 74, 75, 76, 77, 78, 79) |
If true for a given BuffID, then that buff corresponds to a flask item. Flask items are categorized into the ContentSamples.CreativeHelper.ItemGroup.Flask group in Journey Mode. Defaults to false . More... | |
static bool[] | IsATagBuff = Factory.CreateBoolSet(307, 313, 319, 316, 310, 309, 315, 326, 340) |
If true for a given BuffID, then that buff is not considered a typical debuff, but is a buff used to "tag" entities for other purposes.Whip debuffs are the primary example of tag buffs, they facilitate a combat mechanic rather than affect the NPC directly. Buffs in this set can be applied to all NPCs unless that NPC sets NPCID.Sets.ImmuneToAllBuffs to prevent it. Defaults to false . | |
static bool[] | IsFedState = Factory.CreateBoolSet(26, 206, 207, 332, 333, 334) |
If true for a given BuffID, then that buff is related to player hunger. Buffs in this set cannot be active at the same time. Defaults to false . | |
static bool[] | IsWellFed = Factory.CreateBoolSet(26, 206, 207) |
If true for a given BuffID, then that buff is some variation of WellFed. Defaults to false . | |
static bool[] | LongerExpertDebuff = Factory.CreateBoolSet(20, 22, 23, 24, 30, 31, 32, 33, 35, 36, 39, 44, 46, 47, 69, 70, 80) |
If true for a given BuffID, then that buff will have a longer duration in Main.expertMode. More... | |
static bool[] | NurseCannotRemoveDebuff = Factory.CreateBoolSet(28, 34, 87, 89, 21, 86, 199, 332, 333, 334, 165, 146, 48, 158, 157, 350, 215, 147) |
If true for a given BuffID, then that debuff cannot be removed by the Nurse. Defaults to false . | |
static bool[] | TimeLeftDoesNotDecrease = Factory.CreateBoolSet(28, 334, 29, 159, 150, 93, 348) |
If true for a given BuffID, then that buff will never run out. Useful for buffs that are conditionally removed. Defaults to false . | |
|
static |
An NPC will automatically become immune (NPC.buffImmune) to the indexed buff type if it is already immune to any buff in the corresponding List.
For NPCs with NPCID.Sets.ImmuneToAllBuffs or NPCID.Sets.ImmuneToRegularBuffs set to true, the reverse of that logic is used to automatically set the NPC as vulnerable: The NPC will automatically become vulnerable to the indexed buff type if it is specifically vulnerable to all of the buffs in the corresponding List.
This set helps standardize several buff immunity inheritance rules that are effectively present in Terraria while providing modders the ability to do the same. For example, all NPC with immunity to OnFire are also immune to OnFire3 (aka, "On Fire!" and "Hellfire").
Modders can use this set to create buffs that act as variants of existing buffs, and should inherit the immunity value of those existing buffs. NPC from Terraria and other mods will automatically have these immunity rules applied, regardless of mod load order.
|
static |
If true
for a given BuffID, then that buff corresponds to a flask item.
Flask items are categorized into the ContentSamples.CreativeHelper.ItemGroup.Flask group in Journey Mode.
Defaults to false
.
This set does not handle any logic for flasks.
|
static |
If true
for a given BuffID, then that buff will have a longer duration in Main.expertMode.
The scale factor used is the debuff multiplier (DataStructures.GameModeData.DebuffTimeMultiplier) of Main.GameModeInfo.
Despite the name, this set applies to all buffs, not just debuffs.