D&D 5E New Interactive DPR Visualization Tool

Esker

Hero
I made a thing:


I was inspired by the discussion with @Elfcrusher and @Fenris-77 the other day about D&D data visualization, so I thought I'd use it as an opportunity to figure out how to make an interactive tool... and got a little carried away.

I just started working on this Tuesday night, so it's bound to be buggy, probably with some math errors, and not everything in the UI is necessarily implemented in the back-end, but so far it includes:

Updated Feature List as of 6/5/20:
  • Comparison of two builds side-by-side (to be expanded to add arbitrarily many), graphing DPR by enemy AC
  • Up to three classes per build
  • Selection of fighting styles, many popular damage feats and options (PAM, GWM, CBE, SS, Elven Accuracy, Martial Adept, Booming Blade)
  • Automatic calculation of attack modifiers, damage modifiers, number of attacks, availability of bonus action attacks, etc., based on character and class levels and options (e.g., archery or dueling style)
  • Slider governing how often you expect to have advantage, either on all your attacks or on the first attack each turn*
  • Automatic compatibility checks between weapon configuration and fighting styles, and automatic removal of extra attack when booming blade is selected
  • Automatic inclusion of once-per-turn abilities such as sneak attack, with the to-hit chance factored in (NEW: toggle to control whether to "crit-fish" with these abilities)
  • NEW: Automatic prompting to select a subclass when the class level allows it (currently only Champion or Battlemaster, but more to be added)
  • Auto-inclusion of limited use "apply on hit" abilities, such as divine smite and battlemaster superiority dice (currently assumes you hit often enough to use all your available uses)
  • Inclusion of damage bonuses per hit from features like improved divine smite. NEW: Add custom accuracy or damage bonuses per hit (to model things like Bless, Magic Weapons, etc.)
  • NEW: Graph damage broken down by "at will", "crits", "resource use"
  • NEW: Optionally show tables showing extensive individual elements of calculations
Planned future calculator features:
  • More class/subclass options
  • Proper accounting for bonus action economy and spell slot/other resource use as relates to features like rage activation, hex, hunter's mark, shadow blade, etc.
  • Proper tracking of expected number of uses of resources like smites, superiority dice, etc., in cases where this is less than the number of resources granted due to having too few hits to apply them on
  • Reaction attacks (will probably add a slider to let you specify what percentage of the time you think you can make one, possibly with a customizable bonus included on selection of feats like PAM and Sentinel)
  • Precision attack
  • Haste
  • Option for adding generic custom limited use resources expressed in terms of damage/accuracy added, frequency of application, number of uses, and refresh period
Planned future UI improvements:
  • Ability to add arbitrarily many new builds to the same graph, with a "show/hide" button for the cluster of input options for each one
  • "Save" and "share" builds by outputting a unique alphanumeric sequence that can be input later to restore options
*Note: The "% of time with advantage" slider has you pick two values. The smaller is the % of the time when something gives you advantage on all your attacks (e.g., greater invisibility or a restrained enemy); the bigger is the % of the time when something gives you advantage on your 1st attack (e.g., the help action from a familiar). The second % is inclusive of the 1st which is why it has to be bigger.

Let me know what you think, whether you find errors --- as I said I'm sure there are plenty!, and what features and interface changes you think would be most useful. Mostly this is a fun/procrastination tool for me, but it's also a good excuse to learn more interactive data vis. If you think there's an error, it would be helpful if you could take a look at the "debug" tables to see if you can locate the source; but even if you aren't inclined to do that, let me know what inputs you have set and what values or comparisons don't seem to be working correctly.
 
Last edited:

log in or register to remove this ad


Fenris-77

Small God of the Dozens
Supporter
Holy crizzap dude, when you say you got carried away you weren't kidding. That is shiny, I love it. Is there any chance you could program in an easter egg to display a rude pop-up if someone selects Gnome Paladin? Asking for a friend...
 

NotAYakk

Legend
You aren't granting Blade bards extra attack at level 6 I think.

A "debug" view that lists your inputs would make this easier to figure out what is going on.

BM maneuvers, Swords/Whispers bards dice, and Paladin smites are mechanically similar. They are damage you can apply after you hit. You can set them to "crit fish" or "dump", and a refresh frequency (long rest/short rest).

Crit fishing on sneak attack? When you can apply it on either attack (ie, if ally within 5' or you have perma-advantage), a simple rule of thumb is that if your (future cumulative) miss chance(s) (this round) are less than your (future, cumulative) crit chance(s) (this round), you should hold the sneak attack for your later attacks.

Swift Quiver is also worth modelling; it is one of the things that makes a Bard 11 strong. And holy weapon. GWM crit bonus attacks. Barbarian frenzy bonus attacks.

You can reduce your load by adding a "Extra attacks bonus action" with "not first round"/"cost bonus action to activate on [short rest][combat] basis" toggle (or a different slider for first round). Holy Weapon and Paladin improved smite can be modeled as "extra damage dice per hit".

Having it auto-populate those is great, but simply exposing them is good.
 

CodeFlayer

Explorer
Nice work! I don't see the modeling engine in the js, is there a back end and if so what language did you choose to use? I'm curious about such things. It looks quite useful. A caster version would be just as interesting.
 

DND_Reborn

The High Aldwin
Very nice work, but such a tool is not viable IMO as there are too many other factors to calculate in. After testing it for a while, it seems a good for the options you've included.
 

Esker

Hero
You aren't granting Blade bards extra attack at level 6 I think.

Good catch; turns out I was labeling them two different ways so the interface wasn't passing the level in those classes along. Fixed now.

A "debug" view that lists your inputs would make this easier to figure out what is going on.

Also an excellent idea. Added a basic value table that you can display by selecting a checkbox under "Display Options > Debugging".

BM maneuvers, Swords/Whispers bards dice, and Paladin smites are mechanically similar. They are damage you can apply after you hit. You can set them to "crit fish" or "dump", and a refresh frequency (long rest/short rest).

Yeah, that should be doable. I'd also like to incorporate precision attack, which works fundamentally differently than those others, but synergizes so well with the power attack feats.

Swift Quiver is also worth modelling; it is one of the things that makes a Bard 11 strong.

That should be fairly easy --- I'll probably add that when I get to ranger stuff generally, since several of those features involve adding extra attacks a certain number of times per day.

And holy weapon. GWM crit bonus attacks. Barbarian frenzy bonus attacks.

Yeah, I'm currently working on breaking out the damage components more finely (right now, crit damage is folded in to each attack, but it'd be better I think to be able to break it out, which would also make it fairly easy to implement Cleave.

You can reduce your load by adding a "Extra attacks bonus action" with "not first round"/"cost bonus action to activate on [short rest][combat] basis" toggle (or a different slider for first round). Holy Weapon and Paladin improved smite can be modeled as "extra damage dice per hit".

Improved smite is there already, actually; it just turns on if you have 11+ Paladin levels.

Taking "bonus action activated" effects into account properly is on my to-do list.
 

Esker

Hero
Nice work! I don't see the modeling engine in the js, is there a back end and if so what language did you choose to use? I'm curious about such things. It looks quite useful. A caster version would be just as interesting.

The back-end is implemented in R with the help of the Shiny engine to handle the interactive elements. I'll probably stick the source code on GitHub at some point.

I do want to include some "gish" options (other than booming blade), like Hunter's Mark, Hex, Haste, Shadow Blade, etc.; I'm already tracking spell slots for smites and calculating actions and bonus actions used for attacking per day, so some of the groundwork is there to keep the resource-use element "fair" in those comparisons.
 


DND_Reborn

The High Aldwin
The back-end is implemented in R with the help of the Shiny engine to handle the interactive elements. I'll probably stick the source code on GitHub at some point.

I do want to include some "gish" options (other than booming blade), like Hunter's Mark, Hex, Haste, Shadow Blade, etc.; I'm already tracking spell slots for smites and calculating actions and bonus actions used for attacking per day, so some of the groundwork is there to keep the resource-use element "fair" in those comparisons.
Those are some of the things I was talking about.

My favorite DPR build is a Rogue/Sorcerer who can do about 75-80 damage to two targets nearly every round (depending on your adventuring day) at level 20, or something like 90-100 to a single target.
 

Remove ads

AD6_gamerati_skyscraper

Remove ads

Recent & Upcoming Releases

Top