Combat is the resolution of conflict by viciously depriving your opponents of breath or the equivalent thereof.
The most general combat mechanic in Pathfinder: Kingmaker is the following:
When an attack is made, the computer will generate a random number between 1 and 20 and add the attacker's attack bonuses. If this totaled number is at least equal to the defender's Armor Class then the attack hits.
Attack values and Armor Class both can have a large number of modifiers depending on the characters' attributes like Strength or Dexterity, their character levels and class, their feats, their equipment, and any present magical or physical effects (such as their condition).
It is important to note that physical equipment and temporary magical effects do not stack when providing the same type of stat bonus. For instance the spells "Mage Armor" or "Shield" do not work if already equipped with a better armor or shield, though they do have additional useful effects against ghostly creatures.
When a character attempts to damage an opponent with a weapon, perform a combat maneuver, or complete a hostile touch spell, the character must first succeed at an attack roll. Opponents must be within the range or the weapon or spell before an attack is performed.
Touch attacks completely disregard armor, including shields and natural armor - the aggressor needs only to touch a foe for such an attack to take full effect. In these cases, the attacker makes a touch attack roll (either ranged or melee). When you are the target of a touch attack, your AC doesn't include any armor bonus, shield bonus, or natural armor bonus. All other modifiers, such as your size modifier, Dexterity modifier, and deflection bonus (if any) apply normally.
Some creatures have the ability to make incorporeal touch attacks. These attacks bypass solid objects, such as armor and shields, by passing through them. Incorporeal touch attacks work similarly to normal touch attacks except that they also ignore cover bonuses. Incorporeal touch attacks do not ignore armor bonuses granted by force effects, such as Mage Armor and Bracers of Armor.
If the attack total meets or exceeds the opponent's armor class or combat maneuver defense, then the attack succeeds. Effects are applied, including damage, on a successful attack roll. An attack roll always succeeds when the die result is 20 (before modifiers) and always fails if it is 1 (before any modifiers), so there is always at least a 5% chance to hit or miss, regardless of anything else.
Attack Roll Bonuses
Attack rolls can be further modified by bonuses such as circumstance, competence, enhancement, insight, luck, moral, profane, size, and sacred.
Attacks receive a +2 flanking bonus when at least two creatures attack that same target in melee range.
While similar in idea, combat maneuvers have a different mechanisms. Consult their article for more details.
Attack of Opportunity
Base Attack Bonus
See Base Attack Bonus.
Melee weapon damage is based on the roll of the weapon's damage dice plus the character's strength modifier. When using a two-handed weapon, one and a half times the strength modifier is used instead. Secondary weapon attacks from secondary natural weapons and weapons held in the off-hand only apply half of the strength modifier.
See Damage Reduction.
There are a variety of combat defenses, depending on the nature and source of the attack.
Armor Class, also known as AC, represents how hard it is for opponents to land a damaging blow on the target. It's the minimum attack roll result that a character needs to hit. Armor class is split into three variations, based on the nature of the attack. The standard armor class is used against basic attacks and encompasses bonuses from all sources. Flat-footed AC is the defense value a target has when they are denied the ability to evade an attack, such as being unaware of the assault, sleeping, or entangled by a rope. Touch AC is used when the attack does not need to pierce the target's physical protections to damage or otherwise take effect.
Saving throws represent a character's ability to reduce or prevent the effects spells and special abilities. The subject rolls a d20 and adds their saving throw bonus. If the saving throw result is at least the DC of the effect, then the effect is reduced or negated as described by the effect.
Damage reduction, or DR, is the amount of damage the creature ignores from normal attacks. Usually, a certain type of weapon can overcome this reduction. This information is separated from the damage reduction number by a slash. For example, DR 5/magic means that a creature takes 5 less points of damage from all weapons that are not magic. If a dash follows the slash (such as 10/-), then it always effective. Damage resistance is ineffective against any sort of energy damage, even if it is delivered with a standard attack or by an magical weapon.
Energy resistance is similar to damage reduction, except for certain types of energy. Each resistance ability is defined by what energy type it resists and how many points of damage are resisted (e.g. Fire resistance 10 reduces fire damage taken by 10). It doesn't matter whether the damage has a mundane or magical source.
Spell resistance represents a method by which a target can completely ignore some spells or abilities. To overcome a target's spell resistance, a spellcaster must make a check of 1d20 + their caster level, and match or beat the target's spell resistance value.
More details on these subjects can be found in their individual articles.
See Saving throws.
When the attack d20 result, without any modifiers, is within the threat range of the weapon use, the attack then something called a critical threat is achieved. To determine the outcome, a second attack rolls is made using all the same bonuses as the first. If the second roll would hit the target, then the attack threat is said to be "confirmed" and you achieve what's known as a critical hit. Unfortunately, it should be noted that the critical hit will still fail if the first roll, despite being in the critical threat range, would have missed the target normally.
The threat range and critical multiplier are inherent to the type of weapon used, though it can be changed sometimes through the use of special feats, abilities, or spells. Unless otherwise noted, weapons and spells have a critical threat range of 20 and a critical multiplier of 2, shorted as "20/x2".
- Example: A standard scimitar has a threat range of 18-20 with a critical multiplier of x2. Say if the dice roll is an 18 and the attack bonus is +6. The 18 on the dice alone is enough to trigger a threat, unless the targets armor class is more than (18+6=24), which would be a miss with most other weapons. If there is a threat and a hit, then a second roll is made with the +6 bonus, and if that second roll is good enough to hit, then it's a critical hit. Note that this second roll does not have to be within the critical threat range of 18-20.
When a critical hit occurs, the weapon damage and other non-dice based bonuses are multiplied by the weapon's critical multiplier.
- Example: Our example weapon is the previously mentioned scimitar with a critical multiplier of x2, but this time it's a +1 weapon with the elemental trait of flaming which adds +1d6 fire damage. When a critical hit occurs, the standard damage of 1d6 would be calculated, and the attackers Strength bonus and +1 enhancement bonus would be added, and the result would be multiplied by the scimitar's x2 critical multiplier. Only then would any extra dice of damage, such as the +1d6 flaming damage or any sneak attack dice, be added, and it would not be multiplied.
Combat Maneuvers are special attacks and tricks that have additional effects beyond pure damage. See Combat Maneuvers for a detailed explanation.