Category:Combat

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

Combat and Combat AI are complicated processes. Most of what goes on in combat is not relevant to the editor. However, an understanding of combat AI is useful when creating encounters or combat styles. There are several stages an actor must go through to enter combat.

  • Detection: The actor must detect his opponent in order to be in combat.
  • Aggression: The actor compares his agression rating to his disposition toward the actor. If the disposition is less than the aggression, he enters combat.
  • Confidence: Once he is in combat, he uses the confidence rating to decide whether or not to flee. A high confidence rating means he will attack.

For example: Deer have an aggression of 100, and a confidence of zero. As soon as they detect an actor they go into combat. Once in combat, they always flee.


Melee Combat

Melee Combat is defined as close-range combat, with a weapon, hands, claws, teeth, etc. An actor in melee combat's first goal is to move within their weapon's reach of their opponent. An actor in range of their opponent is in a state called "ENGAGED" with their opponent. If an actor moves out of weapon range, the actor will move forward, either CLOSING in or ADVANCING. The difference between the two has to do with how far away the enemy is, and whether path finding is needed. ADVANCING uses path finding, CLOSING does not. In general, actors that are ADVANCING run, while actors that are CLOSING walk. But the primary goal is for the actor to move within range, and remain ENGAGED in combat with their opponent.

Once an actor is ENGAGED, there are two independent decisions that are made, which are mostly independent of one another: the MANEUVER decision and the MELEE decision.


The Maneuver Decision

The MANEUVER decision governs how the actor moves while ENGAGED. This movement is called DODGING. An actor can, if they have the animations for it, DODGE left, right, backward & forward. The decision to DODGE forward or backward is made primarily based on whether the actor is being attacked or not, although there is a random element to it as well. Once DODGING starts in a given direction, it continues for a random period of time, between specified minimum and maximum values.

The MANEUVER decision may also result in the actor deciding not to move. This state is called IDLE. An actor in an IDLE state will remain still (but may attack) for a random period of time between specified minimum and maximum values.

While an actor is either DODGING or IDLE, certain factors may interrupt the timers that keep them in that state. For example, if the actor is hit, or their target moves out of weapon range, the MANEUVER decision will be re-evaluated and the actor may decide to do something else.

Otherwise, once the DODGE or IDLE timer has expired, another MANEUVER decision is made.


The Melee Decision

The MELEE decision is used to decide if the actor will attack, block, or do neither. Doing neither is called HOLDING. An actor will HOLD for a random period of time between specified minimum and maximum values.

If an actor has a shield, it may decide to BLOCK. This decision is made based on a specified percent chance, and whether or not the opponent is currently attacking. An actor will block until the opportunity to stop blocking presents itself, or until the actor decides to attack or leaves combat.

An actor will decide to ATTACK based on a percent chance, and the current status of the opponent (for example, whether the opponent is recoiling, staggering, knocked down, etc.) If an actor is capable of doing left and right attacks blended with movement, the actor can perform a second attack after the switch animation note of the first attack is reached. In this way, actors can do things like quick left-right-left attack combinations.

If the actor decides to ATTACK, it will also decide whether or not to do a POWER ATTACK. Power attacks are full-body attacks that do not blend with other animations. The decision to do a power attack is based on a percent chance and the current status of the opponent.

There are 5 types of power attacks: normal, forward, backward, left, and right. There are two ways that actors can decide which power attack to do. The first is by MOVEMENT: a power attack is selected based on the actor's current movement. For example, if the actor is currently moving to the left, it will do a left power attack. Standing still, a normal power attack, and so on. The second power attack selection method is using PERCENT CHANCES for each power attack type. A percentage chance from 0-100 can be specified for each power attack type, and when an actor decides to do a power attack, a random number from 1-100 is chosen and the corresponding power attack is chosen based on each percent chance. For many creatures, there are no normal attacks -- all their attacks are full-body attacks, and the animations are tagged as power attacks. When a creature (such as a rat) has no "normal" attacks, the percentage chance for choosing to do a power attack should be set to 100, and power attacks should always be based on percentage chance. Note that if a creature doesn't have a particular power attack, the percent chance for choosing that attack should be set to zero.

The MELEE decision is made when one of the following is true:

  • The actor finishes attacking
  • The actor reaches the switch point in an attack animation
  • The actor's HOLD timer expires
  • The actor stops blocking
  • The actor is attacked while HOLDING


Rushing Attacks

Most power attacks can have forward motion. When an actor is advancing on an opponent, they can perform one of their forward-motion power attacks if they get within range, and that range can be beyond their normal attack reach. For example, a Daedroth has a jumping power attack that moves him forward a good distance -- and that distance is much further than his normal attack reach. When the Daedroth is running towards you, once he gets within range of his forward jumping attack, there's a random chance of the Daedroth choosing to perform the attack. This is called a Rushing Attack, and it's independent of the Melee Decision.

Pages in category "Combat"

The following 2 pages are in this category, out of 2 total.