Confidence

From GECK
Jump to: navigation, search

Overview

Confidence controls two aspects of actor behavior:

  • When an actor decides to avoid a potential threat, outside of combat. (This is also related to aggression and faction relations -- Friends and Allies are never potential threats.)
  • When an actor decides to flee in combat.

Confidence Rating

An actor's confidence rating is used to determine when to flee, and when to avoid a potential threat. The confidence rating is essentially a threshold of "what level of threat am I willing to face?".

Confidence is compared to the current threat ratio -- if the threat ratio is less than the actor's confidence level, they will flee/avoid.

Calculating Threat Ratio

Threat Ratio is the ratio of (My Survival Time)/(Enemy Survival Time).

My Survival Time = My Health / Enemy DPS
Enemy Survival Time = Enemy Health / My DPS

This is the same as:

My Combat Strength = My Health * My DPS
Enemy Combat Strength = Enemy Health * Enemy DPS
Threat ratio = ( My Combat Strength ) / ( Enemy Combat Strength )

Thus:

Threat Ratio > 1 
I am likely to win (I will live longer than you)
Threat Ratio = 1 
Even match
Threat Ratio < 1 
I am likely to lose (you will live longer than me)

NOTE: In combat, this will be calculated for the opposing groups as a whole (see Group Threat Ratio below).

NOTE: Frenzied enemies will not flee

Health Calculation

For the Threat Ratio calculations, "health" should include armor, so:

 My Health = ( Current Health ) / ( 1.0 - ( Armor Rating / 100.0 ) )

For example, if I have armor with rating 10 and condition 50%. Based on the armor rating formula, the armor would have an armor rating of 6.75:

 My Health = ( Current Health ) / ( 1.0 - ( 6.75 / 100.0 ) ) = Current Health * 1.072

Confidence Ratings

Confidence will be set on an actor using a drop down (replacing the old Confidence number). These are gamesettings:

  • 0: Cowardly = (fConfidenceCowardly=1000.0000) : I will always flee from combat.
  • 1: Cautious = (fConfidenceCautious=0.3750) : I will avoid/flee from threats unless I am at least twice as strong as them
  • 2: Average = (fConfidenceAverage=0.1875) : I will avoid/flee from threats that are stronger than me
  • 3: Brave = (fConfidenceBrave=0.0375) : I will avoid/flee from threats that outmatch me more than 2-1
  • 4: Foolhardy (fConfidenceFoolhardy=0.0) : I will never flee or avoid anyone (it is impossible for the threat ratio to be less than my confidence rating of 0)

Survival Checkbox

Actors can be marked to "Flee based on Personal Survival". This means that in combat, they value their individual Threat Ratio over that of their combat group as a whole (see Flee section below for details).

Avoiding

Avoid is similar to the "non-combat flee" behavior in Oblivion -- deer running away as soon as they detected you. In Fallout 3 and New Vegas, this is separated from Flee behavior to avoid having to initiate combat in order to flee.

Determining when to avoid

When I detect another actor, I have 3 choices:

  • Attack -- this is determined by Aggression and whether the actor is Enemy or Neutral.
  • Avoid -- this is determined both by my Aggression level (who might I avoid?) and my Confidence level (is the actor strong enough for me to consider it a threat?)
  • Ignore -- if I'm not going to attack or avoid

Aggression and Avoiding

Aggression settings determine what actors I might avoid:

  • Unaggressive -- all Enemies, and Neutrals who would attack me
  • Aggressive -- never avoid
  • Very Aggressive -- never avoid

Note that the only actors that might avoid the player will be Unaggressive actors who are Enemies of the player.

Confidence and Avoiding

Once I've determined the actor is someone I might avoid, do I consider it enough of a threat to actually avoid?

If the calculated Threat Ratio is below my Confidence, I will avoid the threat.

Example
I am Cowardly (Confidence Rating of 3) and Unaggressive. I encounter an Enemy actor (say the player) whose Threat Ratio is 2.3 (meaning I am 2.3 times stronger than the player); because I am Cowardly, I avoid the player. If I was more confident (Cautious or better), I would ignore the player because I don't consider them a threat.

Avoid Behavior

When someone chooses to avoid, they will run away from the threat. (Exactly the same as normal flee behavior.)

Fleeing

Fleeing is combat behavior -- what an actor does in combat when the threat ratio drops below their confidence rating. The actor performs a Flee Check as a normal part of combat strategy, with the following caveats:

  • Actors check to see if they should flee every number of seconds randomized between 0 and fCombatThreatRatioUpdateTime(default: 7.5).
  • Actors never decide to flee until they have taken some damage.
  • When combat starts, each actor gets a randomized "Confidence modifier", which is simply a +/- adjustment to their Confidence rating for the current combat only. The confidence modifier is a value between fCombatConfidenceModifierMin(default: -0.25) and fCombatConfidenceModifierMax(default: 1.0). A positive confidence modifier makes the actor more confident, a negative confidence modifier makes the actor less confident.
    • Note: The confidence modifier is only applied when the actor's confidence is not currently Foolhardy

Group Threat Ratio

When determining the threat ratio in combat, each group's values are considered as a whole, i.e.:

My Group Survival Time = (Sum of the Health of everyone in my group) / (Sum of the DPS of everyone in the enemy group)
Enemy Group Survival Time = (Sum of the Health of everyone in the enemy group) / (Sum of the DPS of everyone in my group)

So the Group Threat Ratio in combat would be:

(My Group Survival Time)/(Enemy Group Survival Time)

Mathematically, this is the same as

Threat Ratio = Sum( Ally Combat Strength ) / Sum( Enemy Combat Strength )

When an actor does a Flee check, they will flee if the Group Threat Ratio is less than their own Confidence.

Personal Survival Threat Ratio

Actors marked as "Flee based on Personal Survival" in their Combat Style perform an additional "flee check" if they pass the Group check. This check is based on the threat ratio of:

My Personal Survival Time = (My Health)/(Average DPS of enemy group)
Enemy Average Survival Time = (Average Health of enemy group)/(Average DPS of my group)

So the Group Threat Ratio in combat would be:

(My Personal Survival Time)/(Enemy Average Survival Time)

If the actor's Personal Survival Threat Ratio is less than their own Confidence, they will flee.

Note that in the case where the group is outclassed, the actor will flee based on the Group Threat Ratio -- but even if they pass that check, the actor may flee because their own health is low and therefore their Personal Survival Threat Ratio is too low for their Confidence.

Flee Behavior

(See Combat Flee for details)

When an actor flees from combat, they try to leave the combat area and find cover a minimum distance from enemies. Once they reach a "flee spot", they will stay there (in combat) until one of the following happens:

  • They are attacked by an enemy.
  • An enemy comes within (gamesetting) distance.
  • They heal themselves.

In the first two cases, before making a new Flee Check, the actor's Confidence is boosted by one level (if they started Cowardly, they become Cautious -- during this combat) -- so an actor that has fled is more likely to stand and fight if you attack them again or "corner" them (approach them too closely).

In the third case, every time an actor is healed, they make a normal Flee Check -- if they are now back above their threshold, they can stop fleeing and reenter normal combat. In this case, Confidence is NOT modified.

Otherwise, the actor stays in their "flee spot" until they drop out of combat normally (due to losing detection of enemies).

Alarms

Actors will send out alarms, or not, based on a similar calculation used for Fleeing. If the actor determines the enemy to be a minimal threat, they will not send out an alarm to summon help.

Calculate "Alarm Confidence":

Alarm Confidence = ( Confidence + .5 ) * (Alarm Confidence Multiplier)

(Alarm Confidence Multiplier is a gamesetting -- say it is 3.)

An actor will send an alarm if Group Threat Ratio < Alarm Confidence.

Examples

Example 1

Foolhardy actor runs into an evenly matched opponent -- GTR = 1.0, Confidence = 0.

Alarm Confidence = ( 0 + .5 ) * 3 = 1.5

GTR of 1 is less than Alarm Confidence of 1.5, so they send an alarm. If they had outmatched their opponent by 2 (GTR = 2), they would not send an alarm.

Example 2

Brave actor runs into a weak opponent -- GTR = 4, Confidence = .5.

Alarm Confidence = ( .5 + .5 ) * 3 = 3, which is less than the GTR, so this actor does not send out an alarm about this combat.