combat-damage

Main Page

Damage is calculated in several steps. It is not essential to understand how these numbers arise, but it is beneficial for players who want to make the most informed decisions.

Basic damage calculation

Step 1: Stats
Surprisingly (for people who have played other RPGs), your stats are actually the most important factor in determining your damage. Which stats are used depends on the weapon, and in some cases, on your talents.

For example, a longsword says 100% Str which means it uses your Strength and nothing else. A dagger says 45% Str, 45% Dex which means it uses your Strength (times 0.45) plus your Dexterity (times 0.45). However, if you have the Lethality talent, this overrides the 45% Str part and forces the calculation to use your Cunning (times 0.45) instead. So a Fighter's damage with a longsword is Str*1.0, while a Rogue's damage with a dagger is Cun*0.45+Dex*0.45.

Mindslayers have some additional modifications during this step, for telekinetically wielded weapons: the stats used for such weapons are swapped around, and multiplied by the telekinetic grasp talent level, and then multiplied by 0.6. We won't be showing examples of this because it's already confusing enough just using the standard stuff.

The result of this step is stored in a variable called totstat (for "total stats").

As an example, let's take a Rogue with 41 Dexterity and 35 Cunning, who has the Lethality talent. His totstat (using a dagger) is 41*0.45 + 35*0.45, or 34.2. His Strength doesn't matter, because Lethality overrides it.

Step 2: Base damage and physical power
The second most important factor in determining your damage is your weapon's base power. This is augmented by any equipment or talents that give a physical power bonus.

Arcane Destruction and Blood Frenzy talents also adjust this number; but we will not show this here. Brawlers using unarmed combat derive a "base weapon power" number differently; we won't show that either.

In the absence of those special cases, the number we get from this step is simply the sum of the weapon's base damage (the lower number in the range) and all physical power bonuses. For example, if we're using an iron dagger (damage 5-6.5), and have boots with +3 physical power, and are using Willful Combat which is giving a bonus of 20 damage (this means physical power), then we get 5 + 3 + 20 = 28.

The result of this step is stored in a variable named power.

Step 3: Adjust power
ToME 4 is all about diminishing returns (except when it isn't), and so we convert the power we calculated above into a multiplying factor. We use this formula:

 power2 = (sqrt(power / 10) - 1) * 0.8 + 1

The variable power is actually reused but I am going to call it power2 here to reduce the confusion. If power is 28, then power2 comes out to approximately 1.539.

Step 4: Talent modifier
Each type of weapon has a talent that boosts its damage output. For most weapons, this is Weapon Mastery. For daggers, it is Knife Mastery. Bows and slings use Bow Mastery and Sling Mastery respectively.

We use this formula:

 talented_mod = sqrt(eff_talent_level / 10) + 1

With a raw Knife Mastery talent level of 5, and a mastery of 1.30 in Combat training, this gives an effective talent level of 6.5. Therefore the talented_mod variable is about 1.806.

Step 5: Total damage before rescaling
Now we multiply all of our numbers together. We use this formula:

 dam = totstat / 1.5 * power2 * talented_mod

The dam variable does not actually exist in the code either. It is only used here for clarity.

Continuing our example, our Rogue has a pre-rescaling damage of 34.2 / 1.5 * 1.539 * 1.806, or about 63.37.

Step 6: Rescale damage
This is the final step in determining the base damage shown on the character sheet. The damage figure calculated in the previous step is run through this formula:

 damage = dam * (1 - log10(dam * 2) / 7)

If we don't have log10 in our calculator, but we have any other logarithm function, we can calculate log10(x) = log(x)/log(10) using whatever other logarithm base is available. A table showing some of rescaled values can be found at the bottom of this page.

So, the final output in our Rogue example is 63.37 * (1 - (log(63.37*2)/log(10)) / 7), or 44.3.

This will be shown as 44 on the character sheet.

Applying the damage

Step 1: Weapon damage
The base damage of a weapon attack is shown in the attack tab of your character sheet, using the calculations shown above.

Here we are going to use the example of Cornac Fighter smacking a Shalore Mindslayer with a sword. We'll assume the basic damage calculated in the previous section comes out to 50.

Accuracy (main Hand) 45
Damage (main Hand) 50
APR (main Hand) 8
Crit (main Hand) 8%
Speed (main Hand) 1.00

Result so far: 50

Step 2: Armour and Armour Hardiness
Armour reduces damage at this point, making it very effective. Armour is capped by armour hardiness, and reduced by armour piercing (APR). Enemy armour is shown in their tooltip, below.

Armour/Defense: 12 / 8

Armour Hardiness can not be found on enemies, but is listed under the defence tab for your character. It specifies the maximum amount that can be reduced by armour. Squishy's hardiness is 30%, which means that it can reduce a maximum of 15 base damage (30% of 50). Squishy's armour is 12, which is modified by APR before subtracting from base damage. The attacker's APR is 8, leading to an effective armour of 4. 4 is less than the maximum allowable by Hardiness (15), so it is used. This is subtracted from Smasher's base damage, which reduces it to 46.

Result so far: 46

Step 3: Damage Range
Damage range can only be found by dividing the second number in the power of your weapon by the first number. This is then used to increase the damage to between the base damage and the base damage multiplied by the range, randomly. Smasher is using a Dwarven-Steel Longsword, that shows up like:

Base Power: 20 - 28

By dividing (28/20), you can get the damage range of 1.4. A random number is then chosen between 46 (the damage after armour) and 64.4 (46 * 1.4). In this example, it is 57. (whole numbers only)

Result so far: 57

Step 4: Talents
Smasher attacked with Dirty Fighting (lvl 2) for 52% damage, which is a fairly straight forward multiplication. A formula for calculating the percentage (which is found in the talent description) can be found here. 57 * 52% = 29.64

Result so far: 29.64

Step 5: Critical Hits
Critical hits are a chance to do extra damage. The chance is found in the attack tab, near the damage and APR found previously, and is 8% in this example. The amount of damage that a critical hit does is multiplied by the "Critical mult.", found under the Damage Mods column. The default is 150%, and it can be raised by various means. Smasher got lucky, and got a critical hit. 29.64 * 150% = 44.46

Result so far: 44.46

Step 6: Resistances, shields, +damage%, etc...
This is in common with talent damage, and will be found in a forthcoming page.