Calamity Mod Wiki
Advertisement

Mod Calls are special functions that can be used with tModLoader's .Call() function to get or set different values from other mods. This page lists the Mod Calls that are provided by the Calamity Mod along with what they are used for.

Mod Calls Table

Function Returns Parameters
GetBossDowned (bool) Whether the boss or event has been defeated. (string) The boss or event to check for. Many different aliases are accepted.
GetInZone (bool) Whether the specified player is in a given Calamity biome or area. (Player) The player whose locale is being questioned.
(string) The zone or area name to check. Many aliases are accepted.
GetDifficultyActive (bool) Whether the Calamity difficulty modifier is currently active. (string) The difficulty modifier to check for. Many aliases are accepted.
SetDifficultyActive (bool) If it has succeeded or not. (string) The difficulty modifier to toggle on or off. Many aliases are accepted.
GetRogueDamage (float) The specified player's rogue damage modifier. 1f = no bonus, 2f = +100%. (Player) The player whose rogue damage is being queried.
AddRogueDamage (float) The specified player's new rogue damage modifier. (Player) The player whose rogue damage is being modified.
(float) The amount of rogue damage to add or subtract (if negative).
GetRogueCrit (int) The specified player's rogue critical strike chance. 0 = no chance, 100 = 100% chance. (Player) The player whose rogue crit is being queried.
AddRogueCrit (int) The specified player's new rogue critical strike chance. (Player) The player whose rogue crit is being modified.
(int) The amount of rogue crit to add or subtract (if negative).
GetRogueVelocity (float) The specified player's rogue projectile speed modifier. 1f = no bonus, 2f = +100%. (Player) The player whose rogue velocity is being queried.
AddRogueVelocity (float) The specified player's new rogue projectile speed modifier. (Player) The player whose rogue damage is being modified.
(float) The amount of rogue velocity to add or subtract (if negative).
GetCurrentStealth (float) The specified player's current stealth. 0.1f = 10, 0.5f = 50. (Player) The player whose stealth is being queried.
GetMaxStealth (float) The specified player's maximum stealth. 0.1f = 10, 0.5f = 50. (Player) The player whose maximum stealth is being queried.
AddMaxStealth (float) The specified player's new maximum stealth. (Player) The player whose max stealth is being modified.
(float) The amount of stealth to add or subtract (if negative).
IsRogue (bool) Whether the specified projectile is classified as rogue. (Projectile) The projectile being queried.
SetRogue (bool) Whether the projectile is now rogue. (Projectile) The projectile to set the value to.
(bool) Whether the projectile should be classified as rogue or not.
GetSetBonus (bool) Whether the specified player has the set bonus given. (Player) The player whose set bonuses are being queried.
(string) The set bonus to check for. Many aliases are accepted.
SetSetBonus (bool) Whether any set bonus was adjusted. (Player) The player whose set bonuses are being modified.
(string) The set bonus to modify. Many aliases are accepted.
(bool) Whether the set bonus should be enabled or disabled.
GetLightStrength (int) The specified player's light strength. (Player) The player whose light strength is being queried.
AddAbyssLightStrength (void) (Player) The player whose light strength is being modified.
(int) The light strength to add to the Abyss.
MakeColdImmune (bool) Whether the player is now cold immune. (Player) The player to make cold immune.
MakeHeatImmune (bool) Whether the player is now heat immune. (Player) The player to make heat immune.
SetDamageReduction (float) The NPC's old damage reduction. 0.1f = 10%, 0.5f = 50%. (int) The ID of the NPC whose dr is being modified
(float) The new dr for the NPC.
BossHealthBarVisible (bool) Whether Calamity's Boss Health Bar is visible. None.
SetBossHealthBarVisible (bool) Whether the visibility was changed. (bool) Whether the Boss Health Bar should be visible or invisible.
GetCalamityRarity (int) The rarity of the given item. (Item) The item whose rarity is being queried.
SetCalamityRarity (int) The new rarity of the given item. (Item) The item whose rarity is being modified.
(int) The new rarity of the item.

Aliases

Some of the functions above mention accepting different aliases for the string parameters. One alias for each flag will be listed below in tables for each function, however alternatives that use different cases or spacing will still be accepted.

GetBossDowned

Queriable Strings
acidrain
acidraineoc
desertscourge
giantclam
crabulon
hivemind
perforator
slimegod
cryogen
acidrainscourge
aquaticscourge
brimstoneelemental
calamitas
greatsandshark
anahitaleviathan
astrumaureus
plaguebringergoliath
ravager
astrumdeus
guardians
dragonfolly
providence
polterghast
oldduke
ceaselessvoid
stormweaver
signus
anysentinel
allsentinel
devourerofgods
buffedeclipse
yharon
supremecalamitas

GetInZone

Queriable Strings
crags
astral
sunkensea
sulphursea
abyss
layer1
layer2
layer3
layer4

DifficultyActive

Queriable Strings
revengeance
death
bossrush
defiled
armageddon
ironheart

SetBonus

Some strings given here can be appended with _classname to get a specific class's version of that set bonus where appropriate. For example statigel_summon or reaver_melee.

Queriable Strings
desertprowler
snowruffian
victide
aerospec
mollusk
forbidden_circlet
daedalus
reaver
fathomswarmer
brimflame
umbraphile
hydrothermic
plaguereaper
plaguebringer
astral
xeroc
tarragon
prismatic
bloodflare
omegablue
godslayer
fearmonger
silva
auric
demonshade
Advertisement