Talk:GetThreatRatio

From the CreationKit Wiki
Revision as of 16:28, 12 July 2022 by DavidJCobb (talk | contribs) (typo)
Jump to navigation Jump to search

The "threat ratio" between two actors is one actor's "threat level" divided by the other actor's threat level. In Skyrim Classic, the threat level is calculated by float Actor::GetThreatLevel(float Arg1), at 0x006E0DE0. The calculation works as follows:

  • If Arg1 is less than or equal to zero, then it is set to the result of calling float Actor::Subroutine006A93D0().
  • Let a = GMST::fArmorScalingFactor * the actor's current Damage Resist actor value / 100.
  • Let b equal the result of calling float Actor::Unk_E6() on the actor.
  • b += a
  • If b is less than 0.99, set it to 0.99.
  • Let c equal the actor's current Health actor value divided by (1.0 - b).
  • The threat level is Arg1 * c.

Values are explained to the extent that I understand any of them. DavidJCobb (talk) 2018-07-23T14:05:46 (EDT)