10

Average: 10 (1 vote)

Submitted by:

Submitted by palswim on 2018-04-02 21:03.

Last modified:

2019-06-13 14:28

Hopefully I haven’t been duplicating work of an easily-available preexisting calculator, but I have been working on a formula/algorithm to calculate the average damage for a particular weapon. Though I developed this initially for Neverwinter Nights, theoretically, this should work for any DND-like dice game (e.g. Knights of the Old Republic).

As I have found, this calculation depends on several factors, and doesn’t follow easy linear trajectories. Obviously, the average value of a 2D6 roll is 7, but that calculation does not consider things like criticals, damage reduction, or hit chance.

In summary, the algorithm follows these steps:

- Calculate the relative probabilities for each roll value. For example, the relative frequency of each result for 2D6:

To calculate this in a generic fashion, you must perform polynomial expansion to the degree of the number of dice to roll.Value 2 3 4 5 6 7 8 9 10 11 12 Probability 1 2 3 4 5 6 5 4 3 2 1 - For each possible value of the dice roll, you must then calculate the eventual damage of both a hit and a critical hit, ensuring that you include the damage bonuses in the critical hit calculation, but not the damage reduction, which should come after the critical hit multiplier. Currently, my algorithm does not handle dice rolls in the Massive Critical calculation since we’d probably have to perform another polynomial expansion. It only handles a static Massive Critical value. For overall values where the damage reduction causes the sum to total a value less than zero, treat the value as zero.
- Also calculate the hit chance for non-critical hits and the hit chance for critical hits, and then multiply those values against the damage values for the hit and critical hit, respectively.
- Under normal rules, a D20 attack roll of 1 always misses, and a roll of 20 always hits, though requires a successful critical threat roll to hit critically.

- Also calculate the hit chance for non-critical hits and the hit chance for critical hits, and then multiply those values against the damage values for the hit and critical hit, respectively.
- Add the expected damage results (non-critical hit chance * non-critical hit damage + critical hit chance * critical hit damage) for each value of the dice roll, then divide by the total number of outcomes for the dice roll (e.g. 2D6 has 36 possible outcomes).

So, in conclusion, the answer to which weapon produces the most damage is obviously “it depends”.

Files:

Attachment | Size |
---|---|

Version 1.2.0 (35) | 13.91 KB |

Version 1.1.0 (108) | 14.03 KB |

Version 1.0.1 (92) | 14.28 KB |

Version 1.0.0 (152) | 13.73 KB |

Permissions & licensing:

I purposefully didn’t include additional damage of other types (e.g. +1D6 Fire Damage), since those essentially require their own calculation with this algorithm, with different types of damage having potentially different resistance values for each enemy. So, you’d just add the algorithm’s value for normal damage to the algorithm’s value for these other types of damage.

Also, I didn’t include support yet for multiple attacks to calculate damage per round, but to calculate, just add the results of this algorithm for each attack according to the attack bonus for each attack.

With Version 1.1.0, the tool now attempts to account for Critical Threat properly. The tool now makes a Threat Roll instead of calculating an automatic Critical Hit for any roll in the Critical Threat range. Don't hesistate to tell me if you find a bug or miscalculation in the formula, regarding Critical Threat or any other component.

In Version 1.2.0, I have separated the Attribute Damage Bonus from the other Bonus Damage so that each weapon can apply its own Attibute Damage Bonus Modifier. In NWN, this only matters when wielding a weapon as a two-handed weapon, which grants a 50% bonus to the Strength modifier for damage (so 18 Strength results in a +4 modifier, but wielding a weapon with two hands results in 6 bonus damage, rather than 4).

In Star Wars Knights of the Old Republic 2 (KotOR2): The Sith Lords (see the Strength section), equipping a single melee (or lightsaber) weapon results in a 50% modifier bonus, whereas wielding a dual-bladed weapon grants the 50% bonus for the main hand strikes, and a 50% reduction for the off-hand strikes, and wielding two separate weapons yields the normal (100%, not 150%) modifier bonus for the main hand weapon, and a 50% reduction in the bonus for the off hand. To use this sheet with a Knights of the Old Republic Lightsaber, simply add or modify the line and use "2D8" for the Damage column.