Combat Style

From the Oblivion ConstructionSet Wiki
Revision as of 13:57, 14 March 2006 by imported>Kkuhlmann (→‎Script Interface)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

Combat Styles are used to govern the choices made in the MELEE and MANEUVER decisions. In the TESCS Object Window under MISC, you’ll find the Combat Styles entry. Click on that, and a list of Combat Styles is displayed in the Object Window. You can create, modify, and delete Combat Styles using this view.


The Combat Style dialog is divided into four sections:

  • Melee Decision: This is where you define values used in the Melee Decision
  • Maneuver Decision: This is where you define values used in the Maneuver Decision
  • Ranged Combat: This is where you define values used to determine when the actor will switch between Ranged and Melee combat
  • Flags: This section contains checkboxes controlling various combat flags.
  • Advanced: This section contains values used in the Maneuver and Melee Decisions. Most often, the default values shown are fine. But they can be altered to provide dramatic differences in combat behavior. See the Advanced Settings section below for more information.


The Combat Style Dialogue

Melee Decision

The Melee Decision section is where you define how the Melee Decision is made, including how Power Attacks are handled & selected.


  • Block % Chance: This is the base percentage chance that the actor will BLOCK with a Melee Decision is made. This is modified by the actor's Block skill and whether or not the opponent is currently attacking. See the Advanced Settings section for more info on these modifiers.
  • Attack % Chance: This is the base percentage chance that the actor will ATTACK when a Melee Decision is made. There are three modifiers that are added to this percentage chance as described below. In addition to those modifiers, the percentage chance is modified based on the actor's relevant Attack skill and whether or not the opponent is currently attacking.
  • Recoil/Stagger Bonus to Attack: This number is added to the Attack % Chance only if the opponent is recoiling or staggering. An actor is recoiling when their strike is blocked by the opponent's shield. An actor staggers when the opponent hits them for a certain amount of damage, based also on the actor's agility. Increasing this number will cause an actor to be more likely to an attack in the event their opponent is recoiling or staggering.
  • Unconscious Bonus to Attack: This number is added to the Attack % Chance only if the opponent is unconscious. Increasing this number makes an actor more likely to attack when their opponent is down. Alternatively, a low negative number would make an actor LESS likely to attack when their opponent is down.
  • Hand-To-Hand Bonus to Attack: This number is added to the Attack % Chance only if the actor (NOT the opponent) is using hand-to-hand. Increasing this number makes an actor more likely to attack when using hand-to-hand. The idea here is to make an actor attack more often when using hand-to-hand than when they're using a weapon.
  • Power Attacks: If an actor decides to do an attack, the Melee Decision will also decide whether to do a Power Attack or a "normal" left or right attack.
    • Power Attack % Chance: This is the base percentage chance that an actor, having decided to attack, will do a Power Attack. If you want to have an actor that ONLY does power attacks, set this number to 100.
    • Recoil/Stagger Bonus to Power Attack: This number is added to the Power Attack % Chance only if the opponent is recoiling or staggering. Increasing this number makes an actor more likely to do a Power Attack when the opponent is momentarily defenseless in a recoil or stagger. This is an excellent strategy!
    • Unconscious Bonus to Power Attack: This number is added to the Power Attack % Chance only if the opponent is unconscious. Increasing this number makes an actor more likely to do a Power Attack when the opponent is unconscious.
    • Choose Attack Using Movement: If you click on this check box, the actor will decide which Power Attack to perform based on their current movement direction at the time the Melee Decision is made. If the actor's moving forward, a forward power attack is performed. If the actor is moving left or right, a left or right power attack is performed, respectively. If the actor is moving forward or backward, a forward or backward power attack is performed, and if the actor is standing still, a "normal" power attack is performed. If this check box is selected, it is crucial that the actor have animations for moving in all directions, including "strafing" left and right. If the "Movement" check box is selected and the actor doesn't have a left or right movement animation, left and right power attacks will not be performed.
    • Choose Attack Using % Chance: If this check box is clicked, the actor will choose which power attack to perform based on percentage chance values specified for each power attack type. To decide which power attack is performed a random number from 1-100 is chosen. Then the following is done in this order:
      1. If the random number is between 1 and the "Normal" percentage chance value, a normal power attack is chosen.
      2. If the random number is between 1 and the sum of the "Normal" and "Forward" percentage chance values, a "Forward" power attack is chosen.
      3. If the random number is between 1 and the sum of the "Normal", "Forward" and "Backward" percentage chance values, a "Backward" power attack is chosen.
      4. If the random number is between 1 and the sum of the "Normal", "Forward", "Backward" and "Left" percentage chance values, a "Left" power attack is chosen.
      5. Otherwise, a "Right" power attack is chosen.
You can enter 0 in any of the 5 percentage chance fields and that power attack type will never be performed. Note also that if the sums total up to greater than 100, some of the later power attack types (based on the order Normal, Forward, Backward, Left and Right) may not ever be chosen. You should try to make the numbers add up to 100.
  • Hold Timer:

If the Melee Decision results in a decision to HOLD, that is, neither attack nor block, the actor will keep holding for a random amount of time between the minimum and maximum values entered here. The time is in real-world seconds.

Maneuver Decision

The Maneuver Decision section of the Combat Style dialog box allows you to specify values that govern the Maneuver Decision – either DODGING or IDLING.


  • Dodge % Chance: This is the base percentage chance that the actor will dodge in any direction. This will be modified based on the actor's speed, fatigue, and whether or not the opponent is attacking. See the Advanced Settings section for more information.
  • Left/Right % Chance: If the decision is made to dodge left or right, a second decision is made whether to dodge left or right or to just stand still for the time being. The reason for this is to reduce the frequency of an actor circling around their opponent without reducing their frequency of movement overall. Here's how it works. If the decision is made to dodge either left or right, as opposed to forward or backward, a random number from 1 to 100 is chosen. If that number is less than or equal to the Left/Right % Chance entered here, the actor will either dodge left or right. If the random number is greater than the Left/Right % Chance, the actor will not dodge based on this Maneuver Decision. Set the number to 100 if you don't care if your actors dodge left or right as often as they dodge forward or backward.
  • Idle Timer: If the Maneuver Decision indicates the actor should remain IDLE, the actor will remain in the IDLE state for a random period of time between the given minimum and maximum values. The time is in real-world seconds.
  • Dodge L/R Timer: If the Maneuver Decision indicates the actor should dodge either left or right, the actor will do so for a random period of time between the given minimum and maximum values. The time is in real-world seconds. Increase the values if your actor has long animation cycles or if you want them to move a lot.
  • Dodge Forward Timer: If the Maneuver Decision indicates the actor should dodge forward, the actor will do so for a random period of time between the given minimum and maximum values. The time is in real-world seconds.
  • Dodge Back Timer: If the Maneuver Decision indicates the actor should dodge backward, the actor will do so for a random period of time between the given minimum and maximum values. The time is in real-world seconds.


Ranged Combat

The Ranged Combat section determines when the actor decides to switch between Ranged and Melee combat. Ranged combat includes both ranged magic and bows.

  • Range Mult: multipliers on the standard optimal and max range that actors using ranged combat will attempt to maintain. Making the multiplier less than 1 will make the actor stay closer to the target during ranged combat; making it greater than 1 will cause the actor to stay at a greater range from the target.
  • Switch Dist: Melee is the distance where the actor will switch from ranged to melee combat (if the target closes to less than that range). Ranged is the distance where the actor will switch from melee to ranged (if the target opens the range to greater than that distance).
  • Ranged Standoff Distance: Distance the actor will attempt to maintain during ranged combat.


Advanced Settings

If you want to use the default values for the “Advanced” settings do NOT click on the “Advanced” checkbox. Leave it unchecked, so the fields are grayed-out.


The Advanced settings are used in the Melee and Maneuver decision formulas. They are kept separate in order to simplify the Combat Style dialog as much as possible. Most of the time, you can leave these settings alone. However, they can give you even more control over NPC and creature combat AI.


Melee Settings

The left column in the Advanced Setting area has modifier and multipliers used in the Melee Decision.


Block Skill Modifier – fAIDefaultBlockSkillBase, fAIDefaultBlockSkillMult

The blocking actor’s Block skill, as modified by the actor’s luck, is used in a formula the result of which is added to the actor’s base percent chance to block. The formula is:

Modifier = Base + Mult * ( Skill / 100 )

Altering the base will give you a minimum bonus value that is always added to the blocking chance. For example, the default value for Base is 0 and for Mult is 10. This means the Block Skill modifier ranges from 0 to 10.


Attack Skill Modifier – fAIDefaultAttackSkillBase, fAIDefaultAttackSkillMult

The attacking actor’s relevant Attack skill, as modified by the actor’s luck, is used in a formula to calculate a value that is added to the actor’s base percent chance to attack, after the Recoil/Stagger, Unconscious, and Hand-to-Hand bonuses are added. The formula is:

Modifier = Base + Mult * ( Skill / 100 )

Altering the base will give you a minimum bonus value that is always added to the attack chance. For example, the default value for Base is 0 and for Mult is 10. This means the Attack Skill modifier ranges from 0 to 10.


Power Attack Fatigue Modifier – fAIDefaultPowerAttackFatigueBase, fAIDefaultPowerAttackFatigueMult

The attacking actor’s fatigue percentage is used in a formula to calculate a value that is added to the actor’s base percent chance to perform a power attack. The formula is:

Modifier = Base + Mult * Fatigue Percent

Altering the base will give you a minimum bonus value that is always added to the power attack chance. For example, the default value for Base is 5 and for Mult is -10. This means the Power Attack Fatigue modifier ranges from -5 to 5, meaning that a fully fatigued actor (100% Fatigue Percent, which is 1.0) will have 5 subtracted from the actor’s percent chance of doing a power attack. An actor that is 0% fatigued will have 5 added to the percent chance of doing a power attack.


Attack While Under Attack Multiplier -- fAIDefaultAttackDuringAttackMult

The total chance to attack – that is the sum of the base percent chance to attack, plus the Recoil/Stagger, Unconscious, Hand-to-Hand, and Attack Skill modifiers – is multiplied by this number if the actor is being attacked when a Melee decision is made. The result is the FINAL Attack chance, and that number is compared to a random number from 1-100. Blocking is checked first if the actor has a shield. The Attack While Under Attack Multiplier defaults to 0.75, meaning the actor is less likely to start an attack while an opponent is in mid-attack.


Attack Not Under Attack Multiplier -- fAIDefaultAttackNoAttackMult

The total chance to attack – that is the sum of the base percent chance to attack, plus the Recoil/Stagger, Unconscious, Hand-to-Hand, and Attack Skill modifiers – is multiplied by this number if the actor is NOT being attacked when a Melee decision is made. The result is the FINAL Attack chance, and that number is compared to a random number from 1-100. Blocking is checked first if the actor has a shield. The Attack Not Under Attack Multiplier defaults to 1.0, meaning the actor is more likely to start an attack while an opponent is in mid-attack.


Block While Under Attack Multiplier -- fAIDefaultBlockDuringAttackMult

The total chance to block – that is the sum of the base percent chance to block plus the Block Skill modifier – is multiplied by this number if the actor is being attacked when a Melee decision is made. The result is the FINAL Block chance, and that number is compared to a random number from 1-100. Blocking is checked first if the actor has a shield. The Block While Under Attack Multiplier defaults to 5.0, meaning the actor is very likely to start blocking while an opponent is in mid-attack.


Block Not Under Attack Multiplier -- fAIDefaultBlockNoAttackMult

The total chance to block – that is the sum of the base percent chance to block plus the Block Skill modifier – is multiplied by this number if the actor is NOT being attacked when a Melee decision is made. The result is the FINAL Block chance, and that number is compared to a random number from 1-100. Blocking is checked first if the actor has a shield. The Block Not Under Attack Multiplier defaults to 1.0, meaning the actor is more likely to start an attack while an opponent is in mid-attack.


Maneuver Settings

The right column in the Advanced Settings area contains values used in the Maneuver Decision.


Dodge Fatigue Modifier – fAIDefaultDodgeFatigueBase, fAIDefaultDodgeFatigueMult

The attacking actor’s fatigue percentage is used in a formula to calculate a value that is added to the actor’s base percent chance to dodge. The formula is:

Modifier = Base + Mult * Fatigue Percent

Altering the base will give you a minimum bonus value that is always added to the dodge chance. For example, the default value for Base is 0 and for Mult is -20. This means the Dodge Fatigue modifier ranges from -20 to 0, meaning that a fully fatigued actor (100% Fatigue Percent, which is 1.0) will have 20 subtracted from the actor’s percent chance of dodging. An actor that is 0% fatigued will have 0 added to the percent chance of dodging. The net effect is that a highly fatigued actor is very unlikely to dodge at all.


Encumbered Speed Modifier – fAIDefaultDodgeSpeedBase, fAIDefaultDodgeSpeedMult

The attacking actor’s encumbered walking speed value is used in a formula to calculate a value that is added to the actor’s base percent chance to dodge. Encumbered Speed is usually somewhere around 110. You can find out an actor’s encumbered speed using the script command “getwalkspeed” in the console. The formula is:

Modifier = Base + Mult * Encumbered Speed

Altering the base will give you a minimum bonus value that is always added to the dodge chance. For example, the default value for Base is -110 and for Mult is 1. This means that for an actor with an encumbered speed of 110, the modifier will be 0. But an actor with a walk speed of 105 will have 5 points subtracted from the total chance to dodge, and an actor with a walk speed of 115 will have 5 points added to the total chance to dodge. Basically this means that faster, less encumbered actors will dodge more often than slower, more heavily encumbered actors.


Dodge While Under Attack Multiplier -- fAIDefaultDodgeDuringAttackMult

The sum of the base Dodge % Chance plus the Dodge Fatigue Modifier and Encumbered Speed Modifier is calculated and multiplied by this number if the actor is under attack when the Maneuver decision is being made. Basically, the higher this number is, the more likely an actor is to decide to dodge while under attack. The value defaults to 1.0.


Dodge Not Under Attack Multiplier -- fAIDefaultDodgeNoAttackMult

The sum of the base Dodge % Chance plus the Dodge Fatigue Modifier and Encumbered Speed Modifier is calculated and multiplied by this number if the actor is NOT under attack when the Maneuver decision is being made. Basically, the lower this number is, the less likely an actor is to decide to dodge while not under attack. The value defaults to 0.75, effectively reducing the final chance to dodge.


Dodge Back While Under Attack Multiplier -- fAIDefaultDodgeBackDuringAttackMult

The sum of the base Dodge % Chance plus the Dodge Fatigue Modifier and Encumbered Speed Modifier is calculated and multiplied by this number if the actor is under attack when the Maneuver decision is being made, and this number is used to help decide whether or not to dodge backwards. Basically, the higher this number is, the more likely an actor is to decide to dodge backwards while under attack. The value defaults to 1.0.


Dodge Back Not Under Attack Multiplier -- fAIDefaultDodgeBackNoAttackMult

The sum of the base Dodge % Chance plus the Dodge Fatigue Modifier and Encumbered Speed Modifier is calculated and multiplied by this number if the actor is NOT under attack when the Maneuver decision is being made, and this number is used to help decide whether or not to dodge backwards. Basically, the lower this number is, the less likely an actor is to decide to dodge backwards while not under attack. The value defaults to 0.75, effectively reducing the final chance to dodge backwards.


Dodge Forward While Attacking Multiplier -- fAIDefaultDodgeForwardWhileWattackingMult

The sum of the base Dodge % Chance plus the Dodge Fatigue Modifier and Encumbered Speed Modifier is calculated and multiplied by this number if the actor is currently performing an attack when the Maneuver decision is being made, and this number is used to help decide whether or not to dodge forwards. Basically, the higher this number is, the more likely an actor is to decide to dodge forwards while performing an attack. The value defaults to 1.0.


Dodge Forward Not Attacking Multiplier -- fAIDefaultDodgeForwardNotAttackingMult

The sum of the base Dodge % Chance plus the Dodge Fatigue Modifier and Encumbered Speed Modifier is calculated and multiplied by this number if the actor is NOT performing an attack when the Maneuver decision is being made, and this number is used to help decide whether or not to dodge forwards. Basically, the lower this number is, the less likely an actor is to decide to dodge forwards while performing an attack. The value defaults to 0.75, effectively reducing the final chance to dodge forwards.


Script Interface

You can swap combat styles in & out very easily using the script command SetCombatStyle.

The default Combat Style can be temporarily altered in game by modifying the game settings used for each field. To do this, use the setgs command in the console:

setgs {game setting} value

The game settings for all the values are listed with the description of all of the combat style values above. They all start with either “iAIDefault” for percent chance values or “fAIDefault” for other values. Remember that setting a game setting’s value in the game will not save out the new value, so be sure to write down what you do. You can use “getgs {game setting}” to see the value of a game setting in the console. This is a handy way to create new Combat Styles.