Aggro

From Terraria Wiki
Jump to navigation Jump to search

Aggro, short for aggression or aggravation, is an invisible statistic that determines the distance at which enemies will begin to attack the player. Terraria features various items that can alter this statistic when equipped.

All enemies target the player based on criteria set in their AI. Most will constantly try to find a target, while others may only target if the player is in water, for example.

Armor and other items that "increase/decrease enemy targeting" cause enemies to consider a player to be closer or farther away than they actually are.

If the Eternia Crystal is present, the Old One's Army will target it by default, only targeting the player if they get "in the way".

Gear

Decrease

The following items reduce the player's aggro statistic, meaning that enemies will have to get closer to target the player.

Item Aggro change
Invisibility PotionInvisibility Potion −750 (while not using an item)
−250 (while using an item)
Putrid ScentPutrid Scent -400
Arcane FlowerArcane Flower -400
Recon ScopeRecon Scope -400
Stalker's QuiverStalker's Quiver -400
Psycho KnifePsycho Knife In stealth mode, aggro is decreased based on visibility to a cap of −750
Shroomite armorShroomite armor(full set) In stealth mode, aggro is decreased based on visibility to a cap of −750
Vortex armorVortex armor(full set) In stealth mode, aggro is decreased based on visibility to a cap of −1200
  • Aggro reductions of −750 (or more) nearly guarantee the player will not be targeted.
  • Vortex armor provides the largest aggro reduction available in the game.

Increase

These items increase the player's aggro statistic, meaning that enemies can be farther from the player and still target them.

Item Aggro change
Turtle HelmetTurtle Helmet +250
Turtle Scale MailTurtle Scale Mail +250
Turtle LeggingsTurtle Leggings +250
Beetle HelmetBeetle Helmet +250
Beetle ShellBeetle Shell +400
Beetle LeggingsBeetle Leggings +250
Solar Flare HelmetSolar Flare Helmet +300
Solar Flare BreastplateSolar Flare Breastplate +300
Solar Flare LeggingsSolar Flare Leggings +300
Flesh KnucklesFlesh Knuckles +400
Berserker's GloveBerserker's Glove +400
Hero ShieldHero Shield +400

Formula

Most enemies will only attack the target they are closest to. They will determine the player's distance first, then the distance to the Eternia Crystal (if applicable). The distance for the player formula is[1]

abs(targetPlayer.center.x − enemy.center.x) + abs(targetPlayer.center.y − enemy.center.y) − targetPlayer.aggro

Old One's Army formula

Enemies in the Old One's Army follow a separate formula due to having to attack the player, as well as the crystal. An enemy will first determine the distance between the Eternia Crystal and it with a simple distance formula. Then, barring the chance the enemy is currently "ghosted", the enemy determines the "distance" to the player with the following formula.

distance(enemy.position, targetPlayer.position) − targetPlayer.aggro

Even though this formula does account for aggro, a player will be ignored if they are not within 200 pixels of the specified enemy.[2]

Notes

History

  • Desktop 1.4.0.1: The Stardust Guardian now targets the closest enemy; it no longer diverts aggro, and its actions can no longer be influenced by the player.
  • Desktop 1.3.0.1:
    • Slimes no longer target the player if the player has Royal Gel equipped.
    • Introduced the Stardust Guardian, which can divert aggro away from the player.
  • Console 1.0.750.0: (PlayStation 4)
    • Slimes no longer target the player if the player has Royal Gel equipped.
    • Introduced the Stardust Guardian, which can divert aggro away from the player.

Footnotes

  1. Information taken from the Desktop version Desktop 1.4.3.6 source code, method TryTrackingTarget() in Terraria.NPC.cs. There may be inaccuracies, as the current Desktop version Desktop version is 1.4.4.9.
  2. Betsy, with a slightly different targeting system, will not target the player based on distance, and will instead target the player so long as the player is closer to it than the Eternia Crystal.