Mod Calls

From Infernum Mod Wiki
Jump to navigation Jump to search

Mod calls are functions provided by TModloader that can be used to interact with the Infernum Mod in certain ways. You can read more here. This is a page of all Infernum mod calls, along with a brief description of each call, including parameters and return types.

General

Mod Call Parameters Return types Notes
GetInfernumActive N/A  • (bool) Returns true if Infernum Mode is enabled.
SetInfernumActive  • (bool) To set the state of Infernum Mode  • (void) This call will set Infernum Mode as enabled or disabled depending on the value passed.
RegisterBossBarPhaseInfo  • (int) The queried NPC type
 • (List<float>) The HP phase-thresholds of the queried NPC
 • (Texture2D) The icon of the queried NPC
 • (void) This call registers the queried NPC in the Infernum HP bar. If said NPC already has been registered, a warning will be logged instead.

Soul-Driven Headphones

Mod Call Parameters Return types Notes
BopHeadToMusic  • (Player) The player whose head rotation is being queried
 • (float) The player's current head rotation time
 • (float) The player's head rotation time in accordance with the BPM of the song as well as an upward rotation if there is a high or intense part of the song being played. This call is now disused due to the tracked music functionality having been removed.
CanPlayMusicForNPC  • (int) The ID of the NPC being queried  • (bool) Returns a boolean depending on the ID of the NPC. If ID is that of a vanilla Terraria boss, a Biome Mimic, a Sand Elemental, the Primordial Wyrm, the Exo Mechs, or Supreme Witch, Calamitas, 'true' is returned.
CanPlaySoulHeadphonesMusic  • (string) The boss being queried as having being downed  • (bool) The state of whether the Exo Mechs or Bereft Vassal have been defeated, for those cases. False otherwise. The Exo Mechs check is under 'ExoMechs', and the one for the Bereft Vassal is under 'BereftVassal'.
RegisterAsSoulHeadphones  • (Item) The item being registered  • (void) The item passed is set to the value 0, given the relevant custom rarity, the developer item text, and the tooltip of the Soul-Driven Headphones.

Intro Screen Mod Calls

Mod Call Parameters Return types Notes
InitializeIntroScreen  • (Localized Text) The text to be displayed
 • (int) Animation time
 • (bool) Whether text should be centered
 • (Func<bool>) Whether intro screen should be active
 • (Func<float, float, Color>)) The color of the text
 • (Func(Localized Text, int, bool, Func<bool>, Func<float, float, Color>)) Creates an intro screen with these parameters, belonging to wrapper class of ModCallIntroScreen
SetupCompletionEffects  • (ModCallIntroScreen) The screen object being referenced
 • (Action) The effect being initialized upon the intro screen being finished
 • (ModCallIntroScreen) The action returned for the screen, passed through SetupCompletionEffects(Action) can also be called with 'IntroScreenSetupCompletionEffects'
SetupLetterAdditionSound  • (ModCallIntroScreen) The screen object being referenced
 • (Func<SoundStyle>) The sound to play with each letter's addition
 • (ModCallIntroScreen) The sound being set up with the screen, passed through SetupCompletionEffects(Action) can also be called with 'IntroScreenSetupLetterAdditionSound'
SetupLetterDisplayCompletionRatio  • (ModCallIntroScreen) The screen object being referenced
 • (Func<int, float>) The ratio of completion of the display in accordance with the letters
 • (ModCallIntroScreen) The ratio being set up with the screen, passed through SetupCompletionEffects(Action) can also be called with 'IntroScreenSetupLetterDisplayCompletionRatio'
SetupLetterShader  • (ModCallIntroScreen) The screen object being referenced
 • (Effect) The effect applied on the letters displayed
 • (Action<Effect>) The action for the effect applied
 • (ModCallIntroScreen) The ratio being set up with the screen, passed through SetupLetterShader(Effect, Action<Effect>) can also be called with 'IntroScreenSetupLetterShader'
SetupMainSound  • (ModCallIntroScreen) The screen object being referenced
 • (Func<int, int, float, float, bool>) The canPlaySound method calling AnimationTimer, AnimationTime, TextDisplayInterpolant, and LetterDisplayCompletionRatio.
 • (Func<SoundStyle>) The sound being passed
 • (ModCallIntroScreen) The main sound to be played upon completion being set up with the screen, passed through SetupMainSound(Func<int, int, float, float, bool>, Func<SoundStyle>) can also be called with 'IntroScreenSetupMainSound'
SetupScreenCovering  • (ModCallIntroScreen) The screen object being referenced
 • (Color) The color which covers the screen when the title card is made
 • (ModCallIntroScreen) The background color set up with the screen, passed through SetupScreenCovering(Color) can also be called with 'IntroScreenSetupScreenCovering'
SetupTextScale  • (ModCallIntroScreen) The screen object being referenced
 • (float) The size of the text, scaled with a ratio
 • (ModCallIntroScreen) The size of the letters in the title card being set up with the screen, passed through SetupTextScale(float) can also be called with 'IntroScreenSetupTextScale'
RegisterIntroScreen  • (ModCallIntroScreen) The screen object being referenced  • (ModCallIntroScreen) The intro screen having been registered



Resources
Mechanics and Support Calamity and Terraria changes Acquisition of Abyss items  •  Rage and Adrenaline tweaks  •  Altered world-generation  •  Boss Rush  •  Rebalanced items
Infernum mechanics Death Wishes  •  Dev Wishes  •  Infinite flight  •  Boss health bar
Player resources Mod Calls  •  Credits  •  Manually enabling Master and FTW compatibility  •  Music
FAQs for mod conflicts, errors, and bugs Terminus absence from the Abyss  •  Faulty world generation  •  Profaned Bosses-related issues