Difference between revisions of "Category:Detection"

4,060 bytes added ,  06:20, 9 December 2014
m
imported>JRoush
m
imported>Saebel
 
(5 intermediate revisions by 3 users not shown)
Line 126: Line 126:


A final note: The target-is-in-combat bonus is fairly significant.  Combined with the much lower combat threshold, this can make it ''very'' difficult for an actor to return to hiding once a hostile actor has seen them.
A final note: The target-is-in-combat bonus is fairly significant.  Combined with the much lower combat threshold, this can make it ''very'' difficult for an actor to return to hiding once a hostile actor has seen them.
==Performance==
Every NPC/Creature that is high processing makes a round of detection calls every .3 seconds.  Those detection calls will be made against everyone within the detection range of the actor, not just against the player.  It also doesn't matter whether the target is sneaking or not.  Sneaking merely modifies the target's ability to be detected.
Therefore, as the number of active actors in an area increase, the number of detection calls made increases exponentially.
{|border="1" cellpadding="5" cellspacing="0"
|-
! style="background:#efefef;" | <center> # of actors in the area </center>
! style="background:#efefef;" | <center> # of detection calls </center>
! style="background:#efefef;" | <center> ~ # per second </center>
|-
| 1 actor + player
| 1
1 call vs player
| 3
|-
| 2 actors + player
| 4
2 calls vs player, 1 call per NPC vs other NPC
| 12
|-
| 3 actors + player
| 9
3 calls vs player, 2 calls per NPC vs other NPCs
| 27
|-
| 4 actors + player
| 16
4 calls vs player, 3 calls per NPC vs other NPCs
| 48
|-
| 10 actors + player
| 100
10 calls vs player, 9 calls per NPC vs other NPCs
| 300
|-
| 15 actors + player
| 225
15 calls vs player, 14 calls per NPC vs other NPCs
| 675
|-
| 20 actors + player
| 400
20 calls vs player, 19 calls per NPC vs other NPCs
| 1200
|-
| 30 actors + player
| 900
30 calls vs player, 29 calls per NPC vs other NPCs
| 2700
|}
In the above examples, this assumes that everyone is within the detection range of everyone else.
In exterior locations, actors are rarely so clumped together except in high traffic areas such as the Market District.  But then again, exteriors have default range of 2x the interior detection distance, which is roughly four times the area.
With default Oblivion, you will rarely run into large numbers of NPCs/creatures that are densely packed.  But in a heavily modded Oblivion, this can have a noticeable effect on performance when the player enters highly populated areas.  Detection is probably not the only Oblivion feature that behaves like this, but it's the one that we for sure know behaves this way consistently all the time.
Any mod that alters the detection formula (such as SDR) in combination with mods that increase the population density will therefore potentially impact performance as well, depending on how the mod is designed and implemented.
==Detection Functions==
[[IsActorDetected]] does not appear to call the detection formula, since it does not require both the target and detector to function.  It is the simplest method of determining whether an actor is being detected at any given time.
[[GetDetectionLevel]] does not appear to call the detection formula either, and may be the most efficient method of determining the detection result of a detector/target pair, especially when a mod that alters detection (like SDR) is in the load order.  Although it is unknown whether or not the result is based on Oblivion's native detection results or the detection altering mod's results.  The theory is that each detection result of target to detector is tracked internally, and is merely looked up by the GetDetectionLevel function.
[[GetDetected]], on the other hand, forces Oblivion to run the entire detection formula, and therefore any mod that alters or hooks that formula will have its sub-scripts called.  Depending on how often it is used, this could potentially cause performance issues.
==Notes==
* Dead actors seem to have their detection status "locked in" at whatever value it was when they died. This means an actor aware of the player when the player kills him, will ''always'' be considered aware of the player (though this does not matter since the actor is dead). It is therefore important in scripts which check detection levels to also make sure that the "detector" is, in fact, alive, in addition to checking other detection settings.
* The bug above also applies when [[SetUnconscious]] is used on an actor, until the effects of that command are reverted.


==See Also==
==See Also==
[[Sneak]]
[[Sneak]]
[[GetDetectionLevel]]
[[GetDetected]]
[[IsActorDetected]]




Anonymous user