Research:NPC AI Behaviour

NPC Awareness Check
This check runs every 5 seconds for each NPC. It occurs whether you are sneaking or not, but isn't the same as the combat distance check.

Comments
Appears straightforward and bug-free. NPCs can take up to five seconds to notice you even if you are not sneaking. This function precedes the combat distance check. I have not identified if there is a line of sight check occuring before or after.

Fight
Affected by calm and frenzy spells.

Flee
Affected by rally and demoralize spells.