Help - Search - Members - Calendar
Full Version: attack rolls and armor class
The Black Wyrm's Lair - Forums > Released mods - Baldur's Gate II > Improved Anvil
critto
Every once in a while I return to the game and struggle to remember how AC, THAC0 and attack rolls work. So I decided to create this explanation in order to avoid such a problem in the future. This might be useful for all players who want to understand what exactly happens during an attack and why stacking AC is an important meta strategy.

Disclaimer - a lot of technical information is taken from this thread: https://forums.beamdog.com/discussion/comme...Comment_1020831

Math

So, when a fight happens, the combat log is full of messages like that:
CODE
Char: Attacks Enemy
Char: Attack Roll 7 + 7 = 14 : Hit (or Miss)


The basic formula for what we see is the following:
CODE
(1d20 roll) + (luck + modifiers) = (result)

Luck is a cumulative sum of values from spells like Luck and Chant and effects of Fatigue or Intoxication. Modifiers is a sum of anything explicit or hidden that might affect the Char's to-hit value and the Enemy's AC bonuses vs. specific weapons (there are some other factors such as Invisibility, but they are less important). Please refer to the linked thread for a complete list of luck factors and modifiers.

Once this value is calculated, and the 1d20 roll was not a critical hit (always hits) or miss (always misses), the engine does the following check:
CODE
(result) >= (Base THAC0 - Target AC)

Here, Base THAC0 is a sum of everything that affects the base THAC0 of the Char directly. Similarly, Target AC is everything that modifies the base AC of the Enemy (including armor class set by an equipped armor or a spell, Dexterity and some other stuff). Complete lists are provided in the same linked thread.

To demonstrate better how all of it works, let's look at a specific example. Let's say we have a character who reached her base AC cap of -24 and has no extra bonuses to AC against specific damage types. She is being attacked by a Golem-type enemy with a base THAC0 of -6, Strength value of 25 (which gives a 7 bonus to hit) and a -5 to-hit bonus on its blunt weapon. There aren't any luck factors involved. For those curious, these are the stats of a Greater Elemental Golem.

The formula would look like that:
CODE
1d20 + 0 (no luck factors) + 7 (modifier from high strength)

Now the resulting value is inserted into the second formula:
CODE
1d20 + 7 >= (-6 [base THAC0] + (-5) [to-hit bonus of the weapon]) - (-24) [character's base AC]
1d20 + 7 >= 13

As you can see, despite the fact that our character has reached the base AC cap, the golem will hit on any roll greater than or equal 6.

There is a bit of confusion on which sign is to use for the various modifiers and luck factors involved in the first formula due to the general weirdness of D&D 2.5. Based on intuition and numerous tests, I think that all factors that benefit the attacker go with the "plus" sign and those benefitting the attacked go with the "minus" sign.

For the next example, let's imagine that we equip the maximum possible amount of AC vs. blunt damage (20 points) on our character. Let's look at the first formula again:
CODE
1d20 + 0 (no luck factors) + 7 (modifier from high strengh) - 20 (the newly added AC vs. blunt) = 1d20 - 13

And we insert it into the second formula again:
CODE
1d20 - 13 >= 13

Now, the only way the golem can hit our character is when it rolls a natural d20 (a critical hit). Quite a difference!

Takeaways

All this math is quite cumbersome and, obviously, we cannot be expected to work it out in our heads for every hit in every fight. So instead, let's list a few important notes on how AC stacking works in the game.

1. The total character's AC is a sum of two parts: base AC and AC vs. specific damage type. First, the game sums together all bonuses to the base AC until the value hits the cap for that particular character. Once the base AC is calculated, all AC modifiers vs. specific damage type are added on top.
2. Any bonus to AC that is not specifically mentioned to be against a certain damage type, is being added to the base AC value. This includes the majority of items and spells.
3. The AC value you see on the character's inventory screen is the base AC (the enhanced edition also provides a useful breakdown of how it is calculated).
4. The cap for the base AC depends on a character's dexterity. The lowest (i.e., best) possible value is -26 with the Dexterity score of 25. See detailed breakdown table here: https://baldursgate.fandom.com/wiki/Dexterity
5. The maximum possible value for AC bonus vs. specific damage type is 20. This cap cannot be modified.
6. AC bonuses against a specific damage type are not listed on the inventory screen. However, you can see the accumulated values on the character info screen (Information tab, scroll down until you see "Armor Class Modifiers"). Here, the negative values make total AC better, the positive ones - make it worse.
7. All items, spells and abilities that give an AC bonus vs. specific damage type, will say so explicitly in their description. Somewhat counter-intuitively, the descriptions might say something like "+4 against crushing". This will always mean a positive bonus (i.e., the engine will treat it as -4 for the purpose of calculation). For examples, see Girdle of Bluntness.
8. Some armors have additional positive or negative bonuses to AC vs. specific damage type. They are sometimes unlisted (which is a lapse on our part), but you can always see the cumulative value on the character screen.

For example, Pride of the Legion +4 explicitly says that it provides "Armor Class: -1 (-5 vs. slashing, -4 vs. piercing and missile)". This means that it gives extra -4 vs. slashing and -3 vs. piercing and missile on top of base AC of -1.

Another useful example is Chain Mail +1. Its description says "Armor Class: 4 (2 vs. slashing, 6 vs. crushing)". This means that it will give an extra -2 bonus vs. slashing on top of base value of 4, but against crushing it will actually offset the base value with a negative bonus of 2 (meaning that the enemies will have a better chance to hit your character with blunt weapons).

Conclusion

So, what does this all mean? If you want to have a character that tanks effectively well into late game, you should aim for AC values beyond -30. The theoretical maximum AC value vs. a specific damage type can reach -46 with 25 Dexterity. Although I am not sure if it's possible to hit this cap on practice, it's quite feasible to have a buffed character with AC somewhere between -30 and -40. That means maximising base AC, getting 25 Dexterity and stacking as much AC vs. specific type as possible on top, with the help of items, spells (including very specific buffs such as the Shaman's spell Entropy Shield) and employing things like Swashbuckler's on-hit melee ability Mirrored Blade (which is the reason why Swashbuckler is mentioned as a high tier class in late game by experienced players).

Hope that helps! Feel free to add comments, examples and corrections.
pekkae
This is great. I'm not sure how many players have actually had the curiosity to look into AC maxing as a strategy that much - at least judging by the journals DR maxing seems to very common but AC maxing isn't.

This is a shame, as AC maxing is superbly useful especially when it's combined with a skinned and protected character. As reaching -30 something while being skinned means that those skins last "forever" and in my games, the implication in pratice is that one doesn't need to worry (almost) at all about casting times etc. as your character is unhittable, to an extent. And AC maxing is especially useful against enemies, that do not have many APR's, but when hitting do enormous damage.

The one thing missing, which I found useful is try to evaluate how much your character does get hit. Say you max out a character (Sibel, Swashie, Swashbuckler/Fighter, 6.6. Cleric, C/M or a DD being the most logical choices) and are able to drop to -35. And you are facing an elemental golem, with a thac0 of -15.

So the elemental can hit you only with a roll of 20. And the elemental has 4 APR. That means the elemental can score a hit on average once in 5 rounds, or 2 hits per turn. If you can survive for 2 hits that should be enough, as getting 2 hits in a row is quite rare (1/400 tries), the chances of getting 3 hits in a row are nonexistant (1/8000 tries).

Then again, if you are not AC maxing, you'll probably get hit with every possible hit except a critical miss. Meaning you have to survive on average 200 pts + elemental damage, per round. The difference is enormous.

My view is that AC maxing is the easiest possible strategy to push through the challenges in the game, but it does require one to have an in-depth understanding of the game mechanics + all the gimmicks & abilities that affect AC.

The best fighter choice for AC maxing is the DD, as it can reach -32 (-36 with SoA and I guess -40 with SoA + entropy shield) + it reaches 40% non-dispellable DR. Also a pure swashbuckler should be able to reach quite high levels, especially Sibel (Hexxat is also a worthy choice here), alternatively a shielded fighter/mage has the tools to reach -34 or so with skins, meaning very, very secure tanking for extended periods. And lastly the C/M can combine both arcane + divine buffs to reach ridiculously low levels of AC.




DequNew
Nice, on my current playthrough I made simple calculator for Excel. There is only two values: Attacker Thac0 and Target effective AC, It gives me rolls where hit/miss happen, gives % chance to get hit. Very useful to find optimal AC for certain enemies, many of them do not even need max AC to make only critical hits connecting.
SparrowJacek
Just one addition from me: weapon style bonuses are also calculated separately, just like AC from dexterity, so you can have -20 from gear then additional -6 from dexterity and -2 from weapon style for a total of -28. In IA it doesn't really matter as the only weapon style that grants AC is Single Weapon Style and nobody uses it, but it's worth noting anyway.
critto
@Jacek:

thanks for the addendum. I though the weapon proficiency falls under the cap imposed by Dexterity. Will update the titular post later.

@Dequ:

QUOTE
Nice, on my current playthrough I made simple calculator for Excel. There is only two values: Attacker Thac0 and Target effective AC, It gives me rolls where hit/miss happen, gives % chance to get hit.

Sounds like a useful tool indeed. You gave me an idea write a tool that would look up in-game resources to calculate these things more precisely, for quick lookups without messing around in the resource editor.

@ pekkae:
Thanks for the input. I knew you'd have a lot to say on the subject. AC stacking has really become a meta only in the recent years. I don't remember people discussing it much before that.
SparrowJacek
QUOTE
thanks for the addendum. I though the weapon proficiency falls under the cap imposed by Dexterity. Will update the titular post later.

Tested it to be sure. AC from dexterity and from weapon styles is not capped at -20 (well, why should it, the bonuses are not that high after all). I set both of them to -70 and it works, Minsc with -65 thac0 couldn't hit my character with -149 AC.
critto
QUOTE
Tested it to be sure. AC from dexterity and from weapon styles is not capped at -20 (well, why should it, the bonuses are not that high after all)

That's not what exactly what I wrote. The maximum you can get from Dexterity 25 is -26 base AC smile.gif But it's interesting that Dex bonuses are actually not capped at 25, I didn't know that.
pekkae
Haha.

Orcahontas. Now I know how I'm naming my next half-orc character biggrin.gif ... But what's the ring? I don't recognize it - the other one is a ring +2 I assume?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2025 Invision Power Services, Inc.