Range types - Skretzo/runelite-plugins GitHub Wiki
Name | Official | Default value | Origin | Info |
---|---|---|---|---|
Aggression range | ❌ No[1] | 7 + 1 | Spawn point |
max range + attack range . |
Attack range | ✔️ Yes[1] | 0[1] | Current NPC position[1] | Uses Manhattan distance for melee, otherwise Chebyshev distance. NPC size is accounted for. |
Hunt range | ✔️ Yes[2] | Not 5 | Current NPC position | Uses Chebyshev distance. NPC size is not accounted for. |
Interaction range | ❌ No | 1 | Current NPC position | Initiated through e.g. the Talk-to menu action.Confined to max range + 1 .Uses Chebyshev distance. NPC size is accounted for. |
Max range | ✔️ Yes[2] | 7 | Spawn point | Uses Chebyshev distance. NPC size is not accounted for. |
Retreat interaction range | ❌ No[1] | 7 + 11 | Spawn point |
max range + 11 .Involves both 1) the area in which you can initiate the retreat/fleeing mode and 2) the area the NPC will keep interaction/focus on the player while in retreat mode unless canceled by being attacked from within the max range. |
Wander range | ✔️ Yes[2] | 5 | Spawn point | Confined to the area in which the NPC can increase its Chebyshev distance to the spawn point via pathfinding freely. Uses Chebyshev distance. NPC size is not accounted for. |
aggression range
attack range
hunt range
interaction range
max range
retreat interaction range
spawn point
wander range
Illustration of radius markers for a barbarian ranger in Barbarian Village.
The aggression range (also known as aggro range) is the combination of the max range and the attack range of an NPC. It defines the outer limit of where the player can stand and still be attacked by the NPC. However, the NPC can (if forced by the player using e.g. a dragon spear special attack) attack the player from outside the aggression range as long as the player is standing inside. The shape of the aggression range depends on the attack type of the NPC and thus the attack range. The origin of the aggression range is the same as that of the max range; the static spawn point of the NPC. The aggression range is accounting for the size of the NPC in the same way as the attack range.
The attack range of an NPC defines the extent of combat attacks performed by the NPC. The tile underneath the NPC itself is not part of the attack range. The shape of the attack range depends on the attack type the NPC is using. If the NPC is attacking with standard melee the attack range has a radius of 1 that excludes diagonals/corner tiles (+
-shape). If the NPC is attacking with halberd melee or magic/ranged projectiles the attack range ends up as a square shaped area where diagonals/corner tiles are included (□
-shape). The weapon the NPC is wielding is not necessarily a good indicator for the attack type of the NPC. Prifddinas guards have a halberd melee attack range of 1 instead of the standard attack range of 2 for players using a halberd. The Fortress Guard with a halberd by the Black Knights' Fortress oddly enough has a standard melee attack range and not a halberd melee attack range. The origin of the attack range is the current location of the NPC, which will dynamically change as the NPC is moving around. The attack range is accounting for the size of the NPC, meaning that the origin of the attack range consists of all the tiles the NPC is occupying and not just the south-west tile. See the aggression range illustration for an example of a standard melee attack range.
The hunt range is the area in which an aggressive NPC will search for nearby targets and initiate combat. The target is usually a player, but can also be another NPC like the Khazard troopers and Gnome troops attacking each other at the Khazard Battlefield. The hunt range is also in use when e.g. the player is attempting to steal from a thieving stall and ends up alerting a nearby NPC. The origin of the hunt range is the south-west tile of the NPC, which will dynamically change as the NPC is moving around. The size of the NPC is not accounted for in the hunt range, meaning that you will not be attacked by an NPC with a hunt range that is smaller than the NPC size when the player is standing next to the NPC on its northern or eastern side.
The interaction range (also known as talking range) is the area in which the NPC will remain focused on the player (interaction mode, constantly facing the player). Interaction mode is triggered by initiating dialogue between the player and the NPC, usually through the Talk-to
menu action. The interaction range is usually only 1, but NPCs in unreachable areas (such as Bankers or NPCs in prison) will have a bigger interaction range. The origin of the interaction range is the current location of the NPC, which will dynamically change as the NPC is moving around.
The max range (also known as retreat, fleeing or cowardly range) is the area in which the NPC is confined to when it is in retreat mode. Retreat mode is initiated by attacking an NPC from outside the aggression range. This behaviour can also be initiated for certain NPCs like Chickens and Seagulls by being in combat with them when they reach a critically low hitpoints value. The origin of the max range is the static spawn point of the NPC.
The retreat interaction range is the area in which the player can initiate retreat mode with an NPC. Consequently, it is also the area in which the player must constrain its movement to for the NPC to still remain in retreat mode. The retreat interaction range equates to the max range
+ 11 tiles
. The origin of the retreat interaction range is the static spawn point of the NPC.
The wander range (also known as roaming range) is the area in which the NPC can pathfind freely inside. The NPC is wandering inside this area by selecting one tile at a time inside the wander range and pathfinding to the selected tile. This process will also occur outside the wander range, and will only halt if the NPC is in combat (attack mode), in interaction mode (see the interaction range section) or in retreat mode (see the max range section). The wander range seems to always be smaller than the max range, but they are independent[3]. The origin of the wander range is the static spawn point of the NPC.