Confidence

From the Fallout3 GECK Wiki
Jump to navigation Jump to search

Overview[edit | edit source]

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[edit | edit source]

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, he will flee/avoid.

Calculating Threat Ratio[edit | edit source]

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[edit | edit source]

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[edit | edit source]

Confidence will be set on an actor using a dropdown (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[edit | edit source]

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

Avoiding[edit | edit source]

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

Determining when to avoid[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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 him a threat.

Avoid Behavior[edit | edit source]

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

Fleeing[edit | edit source]

Fleeing is combat behavior -- what an actor does in combat when the threat ratio drops below his 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 fCombatThreatRatioUpdateTime( default: 5.0 ) seconds
  • 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.5 ) and fCombatConfidenceModifierMax( default: 0.5 ). 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[edit | edit source]

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, he will flee if the Group Threat Ratio is less than his Confidence.

Personal Survival Threat Ratio[edit | edit source]

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 his Confidence, he 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 he passes that check, the actor may flee because his own health is low and therefore his Personal Survival Threat Ratio is too low for his Confidence.

Flee Behavior[edit | edit source]

(See Combat Flee for details)

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

  • He is attacked by an enemy.
  • An enemy comes within (gamesetting) distance.
  • He heals himself.

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

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

Otherwise, the actor stays in his "flee spot" until he drops out of combat normally (due to losing detection on his enemies).

Alarms[edit | edit source]

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, he 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[edit | edit source]

Example 1[edit | edit source]

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 he sends an alarm. If he had outmatched his opponent by 2 (GTR = 2), he would not send an alarm.

Example 2[edit | edit source]

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.