Skyrim Special Edition
0 of 0

File information

Last updated

Original upload

Created by

Nonameron

Uploaded by

nonameron

Virus scan

Safe to use

Tags for this mod

About this mod

Adds conditions related to detection of actors to OAR.

Requirements
Permissions and credits
Changelogs
Adds two conditions to the Open Animation Replacer that can be used to trigger animations.
They are:
DETECTED_BY
DETECTS


in addition, there are three subconditions that can be used with (and only with) these conditions.
DetectionDistance
DetectionRelationship
DetectionAngle

To get a taste of what you can do with these, check the example use case section.




How the conditions work

DETECTED_BY

This triggers whenever an actor that matches the subconditions detects the player. (I use the word player, but this works for npcs just as well)

Example:

The following condition will trigger whenever the player (or NPC, whoever this is evaluated for) is detected by a female guard.

DETECTED_BY
    IsFemale
    IsInFaction 00086EEE (GuardFaction)





DETECTS

This triggers whenever the player (or npc) sees an actor that matches the subconditions.

Example:

The following condition will trigger whenever an actor detects the player.

DETECTS
    IsPlayer





DetectionDistance

Restricts detection by distance.
This need to be placed directly below DETECTS or DETECTED_BY. Otherwise it does nothing.

Example

The following triggers whenever the player (or npc) sees a female within 5 meters of themselves.

DETECTS
    IsFemale
    DetectionDistance < 500


The following triggers whenever the player (or npc) is seen by a guard who is over 10 meters away.

DETECTED_BY
    IsInFaction 00086EEE (GuardFaction)
    DetectionDistance > 1000





DetectionRelationship

Restricts detection by relationship.
This need to be placed directly below DETECTS or DETECTED_BY. Otherwise it does nothing.

The relationship values are:
-4 Archnemesis
-3 Enemy
-2 Foe
-1 Rival
0 Acquaintance
1 Friend
2 Confidant
3 Ally
4 Lover

Example

The following triggers whenever the player (or npc) sees (one of) their lover(s).

DETECTS
    DetectionRelationship() = 4.0





DetectionAngle

Restricts detection by angle. The angle is the deviation from the direction the detector is looking at in the condition DETECTS, and from the one being detected in the condition DETECTED_BY.
You can use the flag "Swap actor" to change the angle to be from the other actor. (The actor detecting in the DETECTED_BY condition, or the actor being detected in the DETECTS condition.)
This need to be placed directly below DETECTS or DETECTED_BY. Otherwise it does nothing.

For example, if the detection angle is set to "< 45", and the player was looking at east, the condition would trigger whenever they see an actor that is between north-east and south-east directions from the player.

Example

The following triggers when the player (or npc) is seen by a guard who is within 30 degrees (to either direction) of where the player (or npc) is looking at.

DETECTED_BY
    IsInFaction 00086EEE (GuardFaction)
    DetectionAngle < 30






Example use cases

You can make the player flip their finger whenever they see a guard.
You can make the player move more sneakily whenever they see a creature.
You can make the player show disgust whenever they see Nazeem.
You can make npcs avert their gaze whenever they see the player.
You can make the player look into the distance when they see someone that is far away. Or close away if you character is shortsighted.
This would also work great for when you want the player to react to your custom NPC in an unique way. Move more coyly when around them or something.





Credits:
Powerof3 for the original detection function.
Ersh for the logic of the subconditions and the easy to use API. Also for the fixes that were made to the API specifically for this mod.


Source