d20 Attack Calculator

d20 Attack Calculator is a combat calculator and optimization tool for d20 rpg systems such as Pathfinder RPG or D&D 3.0/3.5.  The main uses of the program are:

  • Roll attacks and damages
  • Evaluate different attack routines or feats vs. different ACs and CRs
  • Calculate your DPR and appropriate CR level

See a short tutorial on how to determine when to use Power Attack.

In addition to standard attack dice rolling, d20 Attack Calculator can plot graphs for different attack routines and options. This is a useful tool to estimate future character builds, optimal feat choices, etc.

This app also provides players a measuring tool to estimate how well their characters fare against opponents of various CRs, measured by calculating their Damage-Per-Round (DPR). This DPR can be calculated against a given AC or as an average compared to typical encounters of a given CR. Use this information to compare your characters with friends and to get an estimation how optimized your character build is.

The Lite version of the program is free (also ad-free) and includes all the essential functions of the calculator. The full version enables the user to also plot hit chances for attacks, save, load, and export data.

Get it on Google Play

System requirements
Android 2.2 or newer, screen size 3.7 " - 4.5 " (larger screen sizes are supported but not optimized).



Compare different attack and feat options to measure your character.

Using d20 Attack Calculator

Contents:

  1. Quick Start
  2. Attacks
    1. Attack Bonuses
    2. Damage
    3. Conf. Bonus
    4. Precision Damage
    5. Crit. Range & Multipl.
    6. Target AC
    7. Modifiers to Attacks
    8. Statistics
  3. Plots
    1. Plotting Average Damages
    2. Plotting Hit Chances (full version only)
  4. DPR
    1. How Is DPR Calculated?
    2. Monster Data
  5. Saving and Loading (full version only)
  6. Exporting Data (full version only)
  7. Copyrights, Licenses, and Attributions

1. Quick Start

In the Attacks page, input your hit bonus and weapon damage to the respective fields. Press Attack with Selected to get your attack results.

To plot your average damage, press next Plot Selected. This will take you to the Plot Averages page. The graph shows the average damage-per-round for your attack.

For a short tutorial on how to determine when to use Power Attack, see here.

2. Attacks

To make an attack, fill in the fields for an attack and press Attack with Selected. You can add new attacks to the attack routine by pressing Add Attack, and checking the box next to the attack. In the lite version the max number of attacks is limited to 4. To omit an attack from attack calculations or plot, uncheck the box next to the attack, or click Remove Attack.

To see more options for the attack, click More. To see the complete dice roll data, click Show Roll Data. If you wish to not see a popup each time when making an attack, disable the feature from Settings, accessible from the Menu bar.

The Attack can be given a new name by clicking on the Attack label; these are saved along the attack, if the attack is saved (see "Saving and Loading").

2.1. Attack Bonuses

Attack bonuses can be positive, negative, or zero. You can add iterative attacks (of the same type) by typing the bonuses in the Attack Bonus field separated by slash ("/"). For example: "20/15/10/5", "+6/+1", or "5/5/-2".

2.2. Damage

Damage from the attack is input as a series of constants (e.g. "+2") and/or dice rolls (e.g. "+2d6"). In the final Attack Results-popup the terms of the Damage are summed together. You can also add elemental damage components to your Damage by putting square brackets around the series term (e.g. "+[1d6]"), to distinguish a part of the damage from the total sum. Note that this damage is multiplied on a successfull critical hit. For example: "2d6+6", "1d6+1d4-2", or "2d6+[1d6]+2".

2.3. Conf. Bonus

This is an optional bonus to critical threat confirmation rolls. Default: "+0".

2.4. Precision Damage

This is an optional additional damage that is added to the Damage field, but not multiplied on a critical hit. Also elemental damage can be used in this field. For example: "2d6" or "d6+[1d6]". Default: "+0".

2.5. Crit. Range & Multipl.

This is the critical range and multiplier of the critical hit. For example: "20" and "x2" or "17-20" and "x4". Default: "20" and "x2".

2.6. Target AC

You can set the target AC for the attacks here. If target AC is set, attack popup (and full roll results) will show results of the attacks vs. the targeted AC.

2.7. Modifiers to Attacks

You can set modifiers To Hit and Damage that apply to all attacks. Note that the buffs/debuffs to damage are multiplied on critical hits. The name of the modifiers can be changed by clicking on the name; these are saved along the attack, if the attack is saved (see "Saving and Loading"). In Lite version, the number of modifiers is limited to one.

2.8. Statistics

The app collects statistics of your d20 attack rolls, which you can find from the Data and Settings page. "Session Data" can be reseted to see how your dice rolls are going during this gaming session, while "All-Time Data" shows your all-time statistics.

The statistical analysis shown here is the chi-squared goodness of the fit test, which tests the data for how random it is. The null hypothesis is that each of the die results are as likely (i.e. 1/20 chance for each result in case of d20 die). If the p-value is below 0.05, the null hypothesis is rejected, and the dice rolls have not been average: some of the results have been more likely than others.

The full version of the app includes more statistics of the d20 rolls than the Lite version.

3. Plots

The Plot page can plot the average damage (expected value of damage-per round, DPR) and the hit chances (full version only) from the attack routines used in the Attacks page. In the Attacks page, select the attacks you want to include in the attack routine and press Plot Selected. This will add a curve(s) to the Plot page showing the sum of the expected damages and the respective hit chances from the attacks selected.

To change between Average Damage plot and Hit Chance plot, select the respective plot from the drop down menu.

See here how the DPR is calculated.

3.1 Plotting Average Damages

Use this plot to estimate your average damage-per-round (DPR) for your attacks as a function of enemy AC. You can compare different attacks with different damages by adding new curves from the Attacks page, using the + button.

For example, to estimate whether to use Power Attack against a spesific enemy with a known AC, add a curve with and without Power Attack bonuses to damage and hit, and then compare the curves in the Average Damages graph. Choose the attack option (with or without Power Attack) that has the highest expected damage. See a tutorial here.

Similarly, when choosing a new feat, plot your attack routine with and without a prospective feat, and estimate how much the new feat would improve your average damage in general and compared to other feats.

3.2 Plotting Hit Chances (full version only)

The Hit Chances plot shows the chance of hitting with the attack (input in the Attack page) as a function of enemy AC. If the attack routine includes more than one attack, the plot shows the chances of 1) hitting with one or more attacks AND 2) hitting with all attacks, using two different curves.

Use this data to estimate how likely you are to hit an opponent on a given round. Also it is worth noticing that although different types of attacks may have the same Average Damage output, they may differ drastically on chances to hit on any given round (e.g., using Two-Weapon Fighting increases your hit chances, but decreases your average damages per each individual attack).

4. DPR

The Damage-Per Round (DPR) is a measure of how effective your attacks are. DPR tells you how much damage you do, on average, in one round. Naturally, it depends on what you are attacking, i.e., the AC of the opponent. 

d20 Attack Calculator offers two modes for DPR calculation. 1) Calculate the average DPR vs. a given CR and 2) Calculate DPR vs. a given AC.  See below for details how these are calculated.

To calculate your DPR-scores, input your attack(s) in the Attacks page and return to the DPR-Score page. Input a desired CR, and click Recalculate button.

The page also shows the best suited CR for the attack routine. This is determined by calculating the DPR scores for all CRs between 1 and 20, and looking which one is the best match to solo an opponent in 4 rounds. Soloing an opponent in 4 rounds means that a party of 4 characters can finish off the enemy (using full attacks) in one round. This is an encounter level of a typical challenge that does not tax the party too much.

In versions 1.0 and 1.1 of the d20 Attack Calculator, the number "Rounds to solo an average monster" was dubbed "DPR-Score". 

4.1 How Is DPR Calculated?

The general formula to calculate DPR is:

DPR= P1(d1 + d1prc) + C1P1ct1d1 + P2(d2 + d2prc) + C2P2ct2d2 + ...,

where:
Px         is the (percentile) chance to hit with attack x
dx         is the base damage of attack x
dxprc     is the precision (and other not-multiplied-on-critical -type) damage of attack x
Cx        is the chance to score a critical threat with attack x (note that this is not always the full threat range)
Pxc       is the chance to confirm a critical hit of attack x
tx          is the critical multiplier -1 with attack x.

In the calculator, when DPR is calculated for a given AC, the above formula is used. However, when the DPR is calculated for a given CR, the average DPR is calculated considering what are the statistics of typical monsters of that CR.

The average DPR vs. CR is calculated comparing the average damages of the attack routine versus the ACs of the monsters, at the given CR. Comparing these, a preliminary  score is obtained for each AC. This score is then weighed by the quotient of how common the AC is for the given CR. Thus, more weight is given on those results that correspond typical enemies of that CR. Using the weighted scores, an average of the preliminary scores is then calculated to obtain the final DPR vs. the given CR.

The average "Rounds to solo a monster" is calculated similarly as the average DPR vs. CR above. However, here, the average damages of the attack routine are compared vs. the average hps of monsters as a function of AC, at the given CR. Monsters of low AC typically have more hps than those of high AC, so the average damage of the attack is compared to the average hps at each AC separately. Now again, comparing these, a preliminary (damage/hp) score is obtained for each AC. This score is then weighed by the quotient of how common the AC is for the given CR. Using the weighted scores, an average of the preliminary scores is then calculated to obtain the final "Rounds to solo a monster".

The data used in the DPR-score calculations was obtained from www.d20pfsrd.com, by analyzing a total of 2025 monsters of CRs between 1 and 20.

4.2 Monster Data

The Monster Data button in the DPR page shows the average hp, AC and bonuses-to-hit for monsters of CR 1 to 20. Note that the DPR vs. CR is not calculated directly from these averages, but rather by comparing the monster CR-AC-appropriate average hps to the AC-appropriate average damage output.

The data was obtained from www.d20pfsrd.com, by calculating the averages from a total of 2025 monsters of CRs between 1 and 20.

5. Saving and Loading

d20 Attack Calculator can save your attack routines and plotted figures for future use. Saving and loading attacks is done while in the Attacks page, and graphs while in the Plot page, respectively. Note that you need to save attacks and plots separately. Lite version has 1 save slot for attacks and graphs to test the feature functionality. Full version has unlimited save slots.

6. Exporting Data (full version only)

You can export your graph data as a .csv file from the Settings page. First save your plotted graph (see above) in the Plot page and then select the saved graph to Export in the Settings page. The data are exported in a comma-separated values format (.csv) that can be further analyzed with programs such as Excel or OpenOffice.

Once you open the .csv file in Excel, select the first column and use Data -> Text to columns to separate the values to columns. 

7. Copyrights, Licenses, and Attributions

d20 Attack Calculator © 2013-2015 Pekka Miettinen.

The graph plotting in d20Attack Calculator is done using AndroidPlot under Apache License ver. 2.0, available at http://www.apache.org/licenses/.

The attack bonus to hit field supports basic arithmetic operations. Such as "2+2", (which results in 4). This is implemented using Javaluator under LGPL ver. 3, available at http://www.gnu.org/copyleft/lesser.html.

"Plot" icon made by Icomoon from www.flaticon.com is licensed by CC BY 3.0

"Attacks" and "Analysis" icons made by Freepik from www.flaticon.com is licensed by Flaticon free license (with attribution)

Screen captures:


Starting page: Attacks; use this to roll your attacks and input data for your plotting and DPR-analysis.




Plot page: Average Damages; use this to see your damage output versus opponents of various ACs and compare different attack options.




Plot page: Hit Chances of attacks (full version only). Use this to evaluate your chances to hit with some or all of your attacks.



DPR calculations for your attack: measure how well you fare against opponents of different CRs or AC.



Export data to other programs (full version only).



Average Monster Data for easy reference of typical monsters you will encounter