Dragon Age Wiki
Dragon Age Wiki
Tag: Visual edit
 
(54 intermediate revisions by 22 users not shown)
Line 1: Line 1:
  +
'''Threat''' is a mechanism in ''[[Dragon Age: Origins]]'' whereby enemies decide which characters in your party to attack. The threat of a character is an indication of how aggressive enemies are towards that character. Enemies usually ignore characters with low threat levels and attack characters with high threat levels. Threat is an essential part of combat strategy, especially in higher levels of difficulty.
{{See| Also [[Tanking: An Alternative Approach]]}}
 
   
 
==Initial threat==
'''Threat''' is a mechanism in Dragon Age: Origins whereby enemies decide which characters in your party to attack.
 
  +
Initial threat is the threat each party member has when they're first seen by an enemy. It has a base value of 10 that can be increased by a bonus that depends on the weapons and armor the character has equipped and the difficulty level. In difficulty levels lower than Nightmare the threat bonus is 5 for light armor; 10 for medium, heavy and massive armor; and 5 for melee weapons. In the Nightmare difficulty level there are no bonuses.
   
 
==Distance-based threat==
== Threat Level ==
 
'''Threat Level''' is the means by which a character's threat is deduced, and is often referred to as relating to "enemy hostility". Essentially, the higher threat level a character has, the more "hostile" or aggressive enemies will be towards that character, which will result in drawing more enemies to attack that character. The lower a threat level a character has, the less "hostile" enemies will be and the more likely an enemy will seek out a different target to attack.
 
 
== Threat Mechanics in Combat ==
 
The strategic use of a party's varying threat levels is widely considered to be a key element of successfully overcoming the opposition, especially at higher levels of difficulty.
 
 
===Initial Threat===
 
The initial threat value for each party member upon being sighted is 10 (this value is relevant since Mages can reset all threat - except for the distance component - with [[Mind Blast]]).
 
 
On difficulties lower than Nightmare, armor increases the initial threat. The bonus is 5 for light armor, 10 for medium / heavy / massive armor.
 
 
On difficulties lower than Nightmare, melee weapons increase the initial threat by 5.
 
 
Party members are added to an enemy's threat table in the order they are perceived (this is based on the distance). There is a small delay for distant party members.
 
 
===Distance-based Threat===
 
 
After a party member has been added to the threat table, a distance-based threat component is initialized (distance between enemy and party member). This threat component scales approximately like this (distance in m):
 
After a party member has been added to the threat table, a distance-based threat component is initialized (distance between enemy and party member). This threat component scales approximately like this (distance in m):
   
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse;"
+
{| class="sortable daotable" border="1" cellpadding="5" style="border-collapse:collapse;"
! scope="col"|''Distance in m''
+
! scope="col" |Distance in m
  +
| 1.8 || 4.5 || 7 || 14 || 18 || 28 || 43
! scope="col"|''Threat''
 
|-
 
|1.8
 
|97
 
|-
 
|4.5
 
|92.5
 
|-
 
|7
 
|88
 
|-
 
|14
 
|74
 
|-
 
|18
 
|66
 
 
|-
 
|-
 
! scope="col" |Threat
|28
 
  +
| 97 || 92.5 || 88 || 74 || 66 || 51 || 23
|51
 
 
|-
 
|-
 
| colspan="8" style="text-align:right;" |<small>1.8m - 2m is the common melee-combat distance</small>
|43
 
|23
 
 
|}
 
|}
   
 
The distance-based threat component cannot be reset with Abilities / Spells like [[Disengage]], [[Distraction]], [[Mind Blast (Origins)|Mind Blast]] and is not affected by threat decay.
1.8m - 2m is the common melee-combat distance.
 
   
 
==Drawing threat==
The distance-based threat component cannot be reset with Abilities / Spells like [[Disengage]], [[Distraction]], [[Mind Blast]] and is not affected by threat decay.
 
  +
===Dealing damage===
   
  +
Dealing damage to an enemy draws threat from that enemy. The amount of threat drawn is the ''percentage'' of the enemy's ''maximum health'' inflicted as damage:
===Drawing Threat===
 
====Damage Dealt====
 
 
The amount of threat generated is:
 
 
ThreatIncrease = 100 * DamageDealt / MaximumHealth of Enemy
 
ThreatIncrease = 100 * DamageDealt / MaximumHealth of Enemy
   
For an enemy with 200 hit points:
+
For example, inflicting 40 points of damage to an enemy with 200 hit points (i.e., 20% of its maximum health) draws 20 threat.
*Taking the enemy from 200 to 160 health (40 damage) draws 20 threat.
 
*Taking the enemy from 60 to 20 health (40 damage) draws 20 threat as well.
 
   
Rogues will only draw 80% of the threat noted above.
+
Rogues are an exception: they only draw 80% of this amount.
   
{{Note| The main corollary of this formula is damage-based threat is much less effective against Boss/Elite Boss-rank enemies that tend to have thousands of health points. On the other hand, abilities having high built-in threat values - first and foremost, [[Taunt]] - become incredibly efficient against such enemies.}}
+
This means that using damage to draw threat from boss and elite boss enemies is very inefficient (because they usually have thousands of health points). Against these enemies it is much more efficient to use abilities with high fixed threat values, like [[Taunt (Origins)|Taunt]].
   
====Warrior====
+
===Warriors===
Warriors have special abilities that can increase the amount of threat drawn.
+
Some warrior abilities increase threat:
*[[Taunt]] provides a one-time AoE threat increase of 300 (400 with [[Frightening Appearance]]).
+
*[[Taunt (Origins)|Taunt]] provides an AoE threat increase of 300 (400 with [[Frightening Appearance]]).
*[[Threaten]] doubles the threat amount due to damage dealt.
+
*[[Threaten]] doubles the amount of threat drawn when dealing damage.
*Most '''''Activated Talents''''' should draw additional threat from affected enemies. However, this is only working for very few talents:
+
*Most '''''Activated Talents''''' should draw additional threat from affected enemies. However, this only works for the talents [[Arrow of Slaying]], [[Pinning Shot (Origins)|Pinning Shot]] and [[Scattershot]] (primary target only). The mod [http://www.nexusmods.com/dragonage/mods/4384/? Dain's fixes] fixes this problem
**[[Arrow of Slaying]]
 
**[[Pinning Shot]]
 
**[[Scattershot]], primary target only.
 
*'''''Armor''''' does not increase threat beyond the small bonus upon being sighted.
 
   
====Mage====
+
===Mages===
  +
Some offensive spells draw extra threat on top of that drawn by the damage they deal. In many cases this doesn't work as described in the spell descriptions (the mod [http://www.nexusmods.com/dragonage/mods/4384/? Dain's fixes] fixes this problem). However, it does work for the following spells:
Some spells that affect enemies in a negative way draw additional threat, in addition to damage dealt. This is not working properly for many spells and noted in the spell descriptions.
 
  +
*Area of Effect spells:
  +
**[[Earthquake]] draws 50 threat on Casual/Normal and 70 on Hard/Nightmare
  +
**[[Miasma]] draws 20 threat on Hard/Nightmare.
  +
**[[Death Cloud (Origins)|Death Cloud]] draws 80 threat.
  +
*Single-Target spells:
  +
**[[Walking Bomb (Origins)|Walking Bomb]] draws 50 threat on Casual/Normal and 100 on Hard/Nightmare.
  +
**[[Virulent Walking Bomb (Origins)|Virulent Walking Bomb]] draws 70 threat.
  +
**[[Crushing Prison (Origins)|Crushing Prison]] draws 100 threat.
  +
**[[Petrify (Origins)|Petrify]] draws 100 threat.
  +
**[[Death Hex (Origins)|Death Hex]] draws 100 threat.
  +
**[[Misdirection Hex (Origins)|Misdirection Hex]] draws 60 threat.
  +
**[[Horror (Origins)|Horror]] draws 60 threat.
  +
**[[Paralyze]] draws 50 threat.
  +
**[[Affliction Hex]] draws 30 threat from the primary target. No threat is drawn from surrounding enemies.
  +
**[[Weakness]] draws 10 threat.
  +
**[[Vulnerability Hex]] draws 10 threat.
  +
[[Animate Dead]] is a special case: the summoned skeleton (not the caster) draws a lot of threat when initially summoned.
   
 
===Items===
[[Walking Bomb]] is a special case and draws 100 threat on Hard and Nightmare difficulties.
 
 
Items with the {{ColorPositiveStat|Increases Hostility and Intimidation}} property, such as [[Ageless]], do not have their effects implemented properly and do not adjust threat in any way. [[Cadash Stompers]], which has the {{ColorPositiveStat|Increases Hostility}} property, is an exception (it draws 5 threat per hit). The mod [http://www.nexusmods.com/dragonage/mods/4384/? Dain's fixes] fixes this problem.
   
 
==Reducing threat==
On Hard and Nightmare difficulties, an additional 20 threat (in addition to the threat above) is drawn for non-damaging hostile AoE spells (when an enemy enters the AoE): [[Affliction Hex]], [[Earthquake]], [[Miasma]].
 
  +
Threat decreases automatically at a rate of 0.5 per second. This means that a character that resets their threat (by one of the methods described below) might still have higher threat than their companions.
   
 
[[Mind Blast (Origins)|Mind Blast]] clears all threat drawn by the mage except for the distance-based component.
====Items====
 
Items with the "Increases Hostility and Intimidation" properly such as [[Ageless]] do not have their effects implemented properly and do not adjust threat in any way. [[Cadash Stompers]], which have the "Increases Hostility" property are an exception and simply add +5 threat per hit, though this behavior is specific to this particular item and not all items with the "Increases Hostility" property. A [http://www.dragonagenexus.com/downloads/file.php?id=1601 mod] is available that addresses many of these issues.
 
   
  +
When a rogue enters [[Stealth (Origins)|Stealth]] mode his threat values are reset unless Stealth is broken within 1-2 seconds. [[Feign Death]] works in a similar way. [[Distraction]] clears all the threat of the target except for the distance-based component.
===Reducing Threat===
 
====Mage====
 
*Non-hostile spells and all buffs do not draw threat.
 
*[[Mind Blast]] clears all Threat drawn by the Mage, except for the distance-based component.
 
   
====Rogue====
 
*[[Stealth]] causes the Rogue to disappear from perception by all enemies. After an event processing delay, the stealthed rogue will be dropped from all threat tables. However, if Stealth is broken quickly (within 1-2s, e.g. due to an automatic attack because the base AI forces the Rogue to defend himself or an attack was already queued), threat is not dropped. If the Rogue was dropped from the Stealth tables, his threat numbers will start from scratch with the ''Initial Threat'' and distance-based threat numbers.
 
*[[Feign Death]] works similarly to Stealth. The same caveat applies, if Feign Death is given up too quickly, the drop from the Stealth tables (and subsequent drop of Threat) may not occur.
 
 
''Note that the threat number for the Rogue may be higher than for other party members after being rediscovered, since the other party members will have lost some or all of the '''Initial Threat''' due to threat decay of 0.5 per second.''
 
 
*[[Distraction]] clears all Threat, except for the distance-based component.
 
 
====Warrior====
 
 
[[Disengage]] lowers threat by 100.
 
[[Disengage]] lowers threat by 100.
   
 
The property {{ColorPositiveStat|Reduces Hostility}}, found in items like [[Bard's Dancing Shoes]], [[Dalish Promise Ring]], [[Amulet of Accord]], [[Magister's Cinch]] and [[Adaia's Boots]], is not implemented properly and does not reduce threat in any way. The mod [http://www.nexusmods.com/dragonage/mods/4384/? Dain's fixes] fixes this problem.
====Items====
 
The the "Reduces Hostility" property found on items such as [[Bard's Dancing Shoes]], [[Dalish Promise Ring]], [[Amulet of Accord]], [[Magister's Cinch]], [[Adaia's Boots]] is not implemented properly and does not reduce threat in any way. A [http://www.dragonagenexus.com/downloads/file.php?id=1601 mod] is available to address this issue.
 
   
  +
When a character moves more than 60 meters away from enemies their threat is reset.
====Running Away====
 
Once a distance of 60m is reached, enemies will lose perception of the party member. The party member will be dropped from the Threat table. Once perceived again, threat starts from scratch (''Initial Threat'' + distance-based threat).
 
   
  +
==Common threat strategies==
If a party member runs faster than the enemy, running away and causing a chasing enemy to pass close by another party member can trigger a target switch to the other party member (if his threat due to distance is higher). This can be a useful tactic, if a Mage is attacked by several enemies at the beginning of combat (at Nightmare difficulty, the only threat difference between party members is due to distance at the beginning of combat).
 
 
'''Tank & Range''': This is a common strategy that consists in increasing the threat of a warrior (sometimes two) equipped with a weapon and a shield. The high threat draws most enemy attacks to this warrior. The warrior acts as a "tank" whose job it is to soak up damage while the other party members either heal and buff, backstab, attack with two-handed weapons, deal magic damage or use other ranged attacks.
   
 
When an enemy chasing a fleeing party member passes close by another party member the reduced distance to this second party member can make the enemy switch targets to this second party member. This is a useful tactic when a mage is attacked by several enemies at the beginning of combat, specially in Nightmare difficulty, because in this difficulty level the only difference in initial threat between party members is that due to distance.
===Common Threat Strategies===
 
'''Tank & Range''': Perhaps the most common use of threat in combat is to elevate the threat level of one (or perhaps two) specific Warriors in your party, often who are equipped with a weapon & shield. The high threat levels draw most of the enemies attacks to the Warrior with a high threat level. They act as a "tank" whose job it is to soak up massive amounts of damage while the other 3 party members either heal & buff, do back stabbing damage, do massive two-handed damage, deal high magic damage, or use other ranged attacks.
 
   
===Enemy Target Switching===
+
==Enemy target switching==
 
Enemies will always try to attack the target they hate most (has the highest threat amount to this particular enemy).
 
Enemies will always try to attack the target they hate most (has the highest threat amount to this particular enemy).
   
Line 119: Line 85:
 
If the target has 20% health left, enemies will not switch to a higher threat target with a probability of 50%. If the target has 10% health left, enemies will not switch to a higher threat target with a probability of 90%.
 
If the target has 20% health left, enemies will not switch to a higher threat target with a probability of 50%. If the target has 10% health left, enemies will not switch to a higher threat target with a probability of 90%.
   
===Special Attacks===
+
==Special attacks==
 
An exception to targeting the most-hated enemy, are ranged AoE attacks some creatures can perform. Those are controlled by a Tactics system similar to the party AI. These tactics may contain ability / spell triggers based on clustered enemies and target range.
 
An exception to targeting the most-hated enemy, are ranged AoE attacks some creatures can perform. Those are controlled by a Tactics system similar to the party AI. These tactics may contain ability / spell triggers based on clustered enemies and target range.
 
Examples would be the [[The Harvester|Harvester]]'s Vile Disembowelment and [[Varterral]]'s Scream.
 
Examples would be the [[The Harvester|Harvester]]'s Vile Disembowelment and [[Varterral]]'s Scream.
   
 
==Verification and testing notes==
===Threat Decay===
 
Threat decays at a rate of 0.5 per second (the distance-based threat component does not decay).
 
 
==Verification and Testing Notes==
 
 
===Hooking into the engine===
 
===Hooking into the engine===
 
Most of the threat management/updating is done in ''ai_threat_h.nss''. This is a header file, so it cannot be directly recompiled. Root scripts with a main() function using this header must be recompiled, e.g. ''rules_core.nss'', ''player_core.nss'', ''spell_aoe_instant.nss'', ''spell_aoe_duration.nss'', ''talent_model.nss'', ''talent_singletarget.nss''.
 
Most of the threat management/updating is done in ''ai_threat_h.nss''. This is a header file, so it cannot be directly recompiled. Root scripts with a main() function using this header must be recompiled, e.g. ''rules_core.nss'', ''player_core.nss'', ''spell_aoe_instant.nss'', ''spell_aoe_duration.nss'', ''talent_model.nss'', ''talent_singletarget.nss''.
Line 138: Line 101:
 
*[http://social.bioware.com/wiki/datoolset/index.php/Logging Logging]
 
*[http://social.bioware.com/wiki/datoolset/index.php/Logging Logging]
   
===Verified Functionality===
+
===Verified functionality===
 
Testing was performed with Patch 1.02; Toolset 1.01.
 
Testing was performed with Patch 1.02; Toolset 1.01.
 
*Base threat upon sighting (including weapon / armor bonus at lower difficulties).
 
*Base threat upon sighting (including weapon / armor bonus at lower difficulties).
*Threat based on damage (including [[Threaten]] functionality, [[Frightening Appearance]] does not give Threaten bonus).
+
*Threat based on damage (including [[Threaten]] functionality, [[Frightening Appearance]] does not give Threaten bonus - this can be fixed with [https://www.nexusmods.com/dragonage/mods/4384/ Dain's Fixes]).
*Spells draw additional threat, taken from ''ABI_base.xls'', threat_impact column. The threat_impact value is multiplied by 10. [[Walking Bomb]] special case verified. This is triggered by the ''EVENT_TYPE_CAST_AT'' event in ''rules_core.nss''. This is working for about half the spells. Spell descriptions have been updated.
+
*Spells draw additional threat, taken from ''ABI_base.xls'', threat_impact column. The threat_impact value is multiplied by 10. [[Walking Bomb (Origins)|Walking Bomb]] special case verified. This is triggered by the ''EVENT_TYPE_CAST_AT'' event in ''rules_core.nss''. This is working for about half the spells. Spell descriptions have been updated.
*Most Talents do not draw additional threat, there are threat_impact values in ''ABI_base.xls'' as well. All activated Talents have been checked. Only Archery talents [[Arrow of Slaying]], [[Pinning Shot]] and [[Scattershot]], [[Shale]] talents [[Stone Roar]], [[Regenerating Burst]], [[Rock Barrage]] and [[Stone Aura]], and [[Dog]] talent [[Overwhelm]] draw additional Threat. The ''EVENT_TYPE_CAST_AT'' event is used as here as well to trigger the Threat update.
+
*Most Talents do not draw additional threat, there are threat_impact values in ''ABI_base.xls'' as well. All activated Talents have been checked. Only Archery talents [[Arrow of Slaying]], [[Pinning Shot (Origins)|Pinning Shot]] and [[Scattershot]], [[Shale]] talents [[Stone Roar]], [[Regenerating Burst]], [[Rock Barrage]] and [[Stone Aura]], and [[Dog]] talent [[Overwhelm]] draw additional threat. The ''EVENT_TYPE_CAST_AT'' event is used as here as well to trigger the threat update. The problem can be fixed for all Talents with [https://www.nexusmods.com/dragonage/mods/4384/ Dain's Fixes].
*[[Taunt]].
+
*[[Taunt (Origins)|Taunt]].
*[[Feign Death]], [[Stealth]] reduce threat if the Rogue has disappeared from perception long enough.
+
*[[Feign Death]], [[Stealth (Origins)|Stealth]] reduce threat if the Rogue has disappeared from perception long enough.
 
*Reaching a distance of more than 60m drops threat.
 
*Reaching a distance of more than 60m drops threat.
 
*Target switch counters, limiting melee target switch rate.
 
*Target switch counters, limiting melee target switch rate.
*[[Mind Blast]].
+
*[[Mind Blast (Origins)|Mind Blast]].
*Items with ''Reduces Hostility'' and ''Increases Hostility and Intimidation'' properties do not work (tested items: [[Bard's Dancing Shoes]], [[Ageless]]). However, items like [[Cadash Stompers]] with ''Increases Hostility'' property do work (note the lack of "intimidation" in the property description). The latter items add 5 points of threat per hit.
+
*Items with ''Reduces Hostility'' and ''Increases Hostility and Intimidation'' properties do not work (tested items: [[Bard's Dancing Shoes]], [[Ageless]]) - a fix for this is included in [https://www.nexusmods.com/dragonage/mods/4384/ Dain's Fixes]. However, items like [[Cadash Stompers]] with ''Increases Hostility'' property do work by default (note the lack of "intimidation" in the property description). The latter items add 5 points of threat per hit.
 
*The distance-based threat generation is happening somewhere deep in the bowels of the engine and not performed using scripts. The values appear to be reproducible, but special cases that have not been discovered may exist.
 
*The distance-based threat generation is happening somewhere deep in the bowels of the engine and not performed using scripts. The values appear to be reproducible, but special cases that have not been discovered may exist.
[[Category:Game rules]]
 
 
[[Category:Game mechanics]]
 
[[Category:Game mechanics]]
  +
[[Category:Dragon Age: Origins gameplay]]

Latest revision as of 17:07, 14 June 2023

Threat is a mechanism in Dragon Age: Origins whereby enemies decide which characters in your party to attack. The threat of a character is an indication of how aggressive enemies are towards that character. Enemies usually ignore characters with low threat levels and attack characters with high threat levels. Threat is an essential part of combat strategy, especially in higher levels of difficulty.

Initial threat[]

Initial threat is the threat each party member has when they're first seen by an enemy. It has a base value of 10 that can be increased by a bonus that depends on the weapons and armor the character has equipped and the difficulty level. In difficulty levels lower than Nightmare the threat bonus is 5 for light armor; 10 for medium, heavy and massive armor; and 5 for melee weapons. In the Nightmare difficulty level there are no bonuses.

Distance-based threat[]

After a party member has been added to the threat table, a distance-based threat component is initialized (distance between enemy and party member). This threat component scales approximately like this (distance in m):

Distance in m 1.8 4.5 7 14 18 28 43
Threat 97 92.5 88 74 66 51 23
1.8m - 2m is the common melee-combat distance

The distance-based threat component cannot be reset with Abilities / Spells like Disengage, Distraction, Mind Blast and is not affected by threat decay.

Drawing threat[]

Dealing damage[]

Dealing damage to an enemy draws threat from that enemy. The amount of threat drawn is the percentage of the enemy's maximum health inflicted as damage:

ThreatIncrease = 100 * DamageDealt / MaximumHealth of Enemy

For example, inflicting 40 points of damage to an enemy with 200 hit points (i.e., 20% of its maximum health) draws 20 threat.

Rogues are an exception: they only draw 80% of this amount.

This means that using damage to draw threat from boss and elite boss enemies is very inefficient (because they usually have thousands of health points). Against these enemies it is much more efficient to use abilities with high fixed threat values, like Taunt.

Warriors[]

Some warrior abilities increase threat:

Mages[]

Some offensive spells draw extra threat on top of that drawn by the damage they deal. In many cases this doesn't work as described in the spell descriptions (the mod Dain's fixes fixes this problem). However, it does work for the following spells:

Animate Dead is a special case: the summoned skeleton (not the caster) draws a lot of threat when initially summoned.

Items[]

Items with the Increases Hostility and Intimidation property, such as Ageless, do not have their effects implemented properly and do not adjust threat in any way. Cadash Stompers, which has the Increases Hostility property, is an exception (it draws 5 threat per hit). The mod Dain's fixes fixes this problem.

Reducing threat[]

Threat decreases automatically at a rate of 0.5 per second. This means that a character that resets their threat (by one of the methods described below) might still have higher threat than their companions.

Mind Blast clears all threat drawn by the mage except for the distance-based component.

When a rogue enters Stealth mode his threat values are reset unless Stealth is broken within 1-2 seconds. Feign Death works in a similar way. Distraction clears all the threat of the target except for the distance-based component.

Disengage lowers threat by 100.

The property Reduces Hostility, found in items like Bard's Dancing Shoes, Dalish Promise Ring, Amulet of Accord, Magister's Cinch and Adaia's Boots, is not implemented properly and does not reduce threat in any way. The mod Dain's fixes fixes this problem.

When a character moves more than 60 meters away from enemies their threat is reset.

Common threat strategies[]

Tank & Range: This is a common strategy that consists in increasing the threat of a warrior (sometimes two) equipped with a weapon and a shield. The high threat draws most enemy attacks to this warrior. The warrior acts as a "tank" whose job it is to soak up damage while the other party members either heal and buff, backstab, attack with two-handed weapons, deal magic damage or use other ranged attacks.

When an enemy chasing a fleeing party member passes close by another party member the reduced distance to this second party member can make the enemy switch targets to this second party member. This is a useful tactic when a mage is attacked by several enemies at the beginning of combat, specially in Nightmare difficulty, because in this difficulty level the only difference in initial threat between party members is that due to distance.

Enemy target switching[]

Enemies will always try to attack the target they hate most (has the highest threat amount to this particular enemy).

Enemies with melee weapons have timers limiting how often they switch targets. The timer start value is initialized to 0 and increases by 5s (up to 25s), each time the target is switched. While the timer is counting down, targets will not be switched (unless the current target cannot be attacked).

If the target has 20% health left, enemies will not switch to a higher threat target with a probability of 50%. If the target has 10% health left, enemies will not switch to a higher threat target with a probability of 90%.

Special attacks[]

An exception to targeting the most-hated enemy, are ranged AoE attacks some creatures can perform. Those are controlled by a Tactics system similar to the party AI. These tactics may contain ability / spell triggers based on clustered enemies and target range. Examples would be the Harvester's Vile Disembowelment and Varterral's Scream.

Verification and testing notes[]

Hooking into the engine[]

Most of the threat management/updating is done in ai_threat_h.nss. This is a header file, so it cannot be directly recompiled. Root scripts with a main() function using this header must be recompiled, e.g. rules_core.nss, player_core.nss, spell_aoe_instant.nss, spell_aoe_duration.nss, talent_model.nss, talent_singletarget.nss.

Useful script functions:

  • float threat = GetThreatValueByObjectID(oCreature, oAttacker); Returns current threat value.
  • GetName(oAttacker) Name of party member.
  • GetName(oCreature) Name of enemy, as displayed in game.
  • GetTag(oCreature) Base name of the *.utc file of the actual creature spawned.
  • ObjectToString(oCreature) Unique Object ID of the creature.
  • Logging

Verified functionality[]

Testing was performed with Patch 1.02; Toolset 1.01.

  • Base threat upon sighting (including weapon / armor bonus at lower difficulties).
  • Threat based on damage (including Threaten functionality, Frightening Appearance does not give Threaten bonus - this can be fixed with Dain's Fixes).
  • Spells draw additional threat, taken from ABI_base.xls, threat_impact column. The threat_impact value is multiplied by 10. Walking Bomb special case verified. This is triggered by the EVENT_TYPE_CAST_AT event in rules_core.nss. This is working for about half the spells. Spell descriptions have been updated.
  • Most Talents do not draw additional threat, there are threat_impact values in ABI_base.xls as well. All activated Talents have been checked. Only Archery talents Arrow of Slaying, Pinning Shot and Scattershot, Shale talents Stone Roar, Regenerating Burst, Rock Barrage and Stone Aura, and Dog talent Overwhelm draw additional threat. The EVENT_TYPE_CAST_AT event is used as here as well to trigger the threat update. The problem can be fixed for all Talents with Dain's Fixes.
  • Taunt.
  • Feign Death, Stealth reduce threat if the Rogue has disappeared from perception long enough.
  • Reaching a distance of more than 60m drops threat.
  • Target switch counters, limiting melee target switch rate.
  • Mind Blast.
  • Items with Reduces Hostility and Increases Hostility and Intimidation properties do not work (tested items: Bard's Dancing Shoes, Ageless) - a fix for this is included in Dain's Fixes. However, items like Cadash Stompers with Increases Hostility property do work by default (note the lack of "intimidation" in the property description). The latter items add 5 points of threat per hit.
  • The distance-based threat generation is happening somewhere deep in the bowels of the engine and not performed using scripts. The values appear to be reproducible, but special cases that have not been discovered may exist.