Template:Damage calculator/doc

This is a damage calculator based on the reverse-engineered Fallout engine damage calculation and research

Explanation

 * ND = net damage value
 * RD = random damage value produced from weapons hit damage range
 * RB = ranged bonus (RB=0 unless the player has Bonus Ranged Damage perk)
 * X = ammo damage multiplier
 * Y = ammo damage divisor
 * CM = critical hit damage multiplier (if no critical hit then CM=2, otherwise assigned value from critical hit table)
 * CD = combat difficulty multiplier (Easy=75, Normal=100, Hard=125)
 * AI = 1 if critical hit which ignores armor, otherwise 0
 * ADT = armor damage threshold value
 * ADR = armor damage resistance value
 * RM = ammo resistance modifier (only value allowed to be negative or positive in the equation)

Original:

ND = ((RD+RB) &times; (X/Y) &times; (CM/2) &times; (CD/100) - ADT/max(5*AI,1)) &times; (100 - max((ADR/max(5*AI,1) + RM),0) / 100

ND then rounded to nearest whole number

A hastily written calculator in C: #include   int main (int argc, char **argv) {     float RD = 0, RB = 0, X = 0, Y = 0, CM = 0, CD = 0, ADT = 0, ADR = 0, RM = 0; printf("Enter parameter in format: >RD RB X Y CM CD ADT ADR RM\n"); scanf("%f %f %f %f %f %f %f %f %f", &RD, &RB, &X, &Y, &CM, &CD, &ADT, &ADR, &RM); printf("Rolled: %f = (50 * %f * (%f/%f) * ((%f + %f)/%f)-%f)*(1-((%f+%f)/100))\n", (((50.0f * CM * (X/Y) * ((RD + RB))/(CD)))-ADT)*(1.0f-((ADR+RM)/100.0f)), CM, X, Y, RD, RB, CD, ADT, ADR, RM); return 0; }

Examples with some common armor and weapons (assuming no range bonus and no critical hit): Armors: None         N Leather       LA Metal         MA Combat        CA Power         PA Adv Power     APA 10mm Pistol with 10mm JHP Ammunition Ammo    X/Y     2/1 Ammo    RM      25 Original Formula N    LA     MA     CA     PA     APA ADT    0     2      4      5      12     15 ADR    0     25     30     40     40     55 -- 5      8     4      3      2      0      0 6       9     5      4      2      0      0 7       11    6      5      3      1      0 8       12    7      5      4      1      0 9       14    8      6      5      2      1 10      15    9      7      5      3      1 11      17    10     8      6      4      1 12      18    11     9      7      4      2 -- 10mm Pistol with 10mm AP Ammunition Ammo    X/Y     1/2 Ammo    RM      -25 Original Formula N    LA     MA     CA     PA     APA ADT    0     2      4      5      12     15 ADR    0     25     30     40     40     55 -- 5      3     1      0      0      0      0 6       4     1      0      0      0      0 7       4     2      0      0      0      0 8       5     2      0      0      0      0 9       6     3      0      0      0      0 10      6     3      1      0      0      0 11      7     4      1      0      0      0 12      8     4      2      1      0      0 -- Both melee and hand-to-hand uses the same damage calculation procedure. If you're using a HtH attack, the bonus from the Bonus HtH Damage perk is added to the Melee Damage statistic, while any damage bonuses from the Special Unarmed Attacks (such as Hammer Punch) is added to the initially rolled damage figure (RD in the above formula).