D&D 3.x Expected Damage Calculator

Discuss, create, and theorize about roleplaying games, tabletop games, board games, and other non-electronic interactive entertainments. Run dedicated or complex forum games here, also.

Moderator: ℎalifax

User avatar
Retrofuturist
Posts: 3131
Joined: 2008.09.19 (06:55)
MBTI Type: ENTP
Location: California, USA
Contact:

Postby t̷s͢uk̕a͡t͜ư » 2009.10.05 (06:35)

I decided to faff around with making a Windows application today (like, with a GUI, which is actually new territory to me), and this is the result.

This is intended as a tool for your use as well as a request for feedback. Like I said, this is my very first application with a graphical frontend that I'm comfortable enough to release, so if you find any glaring problems, please let me know.

This is just the very first version of this thing I made. I already know plenty of ways I can expand this thing to be more than this simplistic little thing, such as adding support for multiple attacks, saving and comparing user-generated profiles, throwing in more statistical information, etc. I may very well do some or all of these things if I get around to it, and promise nothing.


And for those of you wondering what the hell use this serves...

Expected Damage:
When I'm creating a character with a decent number of levels and I want to compare the effectiveness of his physical attacks, the figure I rely on to get a good idea of the tradeoffs of various combat styles is a number I call the "expected damage." I've never seen anyone else use this metric for evaluating a character's prowess in combat; this is a benchmark that I came up with, and the existence of any similar benchmark is completely coincidental as far as I'm concerned.
Expected damage factors in number of attacks, accuracy, damage, and critical hit potential to give you a good estimate of how much damage you can expect to deal each round against a given opponent.

Its calculation is pretty straight-forward. You need to know the attacker's attack bonus, the critical hit information for his weapon, and his average damage, as well as the defender's AC.
  • Take the number of values on a d20 that would land you a normal hit (not including the critical threat range) and divide by 20 to get the probability of landing a regular hit. This is the starting value for the expected number of hits from this attack.
  • Take the number of rolls on a d20 that would threaten a critical hit and divide by 20 to get the probability of threatening a critical.
  • Take the number of rolls on a d20 that would confirm a critical hit threat, divide by 20, and multiply by the critical hit multiplier to get the number of expected hits from a critical hit (basically, consider a critical hit to be multiple hits). Multiply it again by the probability of threatening a critical hit and add to the number of expected hits for the round overall.
  • Take the number of rolls on a d20 that would miss, divide by 20, multiply by the probability of threatening a critical hit, and add this number to the number of expected hits this round.
  • Multiply the total number of expected hits this round by the average damage, and you have your expected damage from that attack.
  • Repeat this process for every attack the attacker has in the round.

Here's an example:
Bob is using his rapier to attack an enemy with AC 18. Bob's attack bonus with the rapier is +10 and his damage is d6+3. The critical threat range on a rapier is 18-20, and the critical hit multiplier is 2.
The average value on a d6 is 3.5, and Bob's damage bonus gives us an average damage of 6.5 for this attack.
  • If Bob were to roll a d20 and get a number from 1 to 7, he would miss. There is a 7 in 20 chance that he would deal no damage with this attack. The sum of the expected number of hits Bob would make is so far zero.
  • If Bob were to get a number from 8 to 17, it would be a normal hit. The range 8 to 17 includes 10 numbers, so there is a 10 in 20 chance that Bob will land a normal hit. The sum of the expected number of hits Bob would make is now (10/20), or 0.5.
  • If Bob were to roll a number from 18 to 20, that would be a critical hit threat. There is a 3 in 20 chance that Bob will threaten a critical hit.
    If Bob threatens a critical hit, he can confirm the critical hit with a roll from 8 to 20, which is 13 numbers. So the probability that Bob gets a critical hit is (3/20) x (13/20). Since the critical hit multiplier is x2, we can consider a critical hit from Bob to be the equivalent of two normal hits. The sum of the expected number of hits Bob would make is now 0.5 (from the previous figure) + (3/20) x (13/20) x 2 = 0.695.
  • If Bob threatens a critical hit, he can achieve a normal hit by rolling a number from 1 to 7. The probability that Bob will deal normal damage from an unconfirmed critical hit threat is (3/20) x (7/20). This puts the final number of expected hits to 0.695 (from the previous figure) + (3/20) x (7/20) = 0.7475.
  • On average, Bob will land 0.7475 hits per round on his opponent. Since each hit deals an average of 6.5 damage, we can expect Bob to deal 6.5 x 0.7475 = about 4.86 damage per round.

Or to be more succinct, here's what's usually on scratch paper I use to figure this out:
Image
"Miss" is there to make sure my numerators add up to 20.
I multiply everything that isn't "miss," and then multiply by the average damage. Bam.

But anyway, point is, this thingy I've attached does this for you (for one attack).

Enjoy.
<3 Suki


PS: For those interested, I can throw in the source for a console-based calculator I use that calculates expected damage against a range of AC's and plots them for you (requires gnuplot).
Attachments
dmgexpect.rar
(3.91 KiB) Downloaded 143 times
"you know i always joked that it would be scary as hell to run into DMX in a dark ally, but secretly when i say 'DMX' i really mean 'Tsukatu'." -kai

"... and when i say 'scary as hell' i really mean 'tight pink shirt'." -kai


spoiler

Image


User avatar
Demon Fisherman
Posts: 1265
Joined: 2008.09.19 (06:28)
NUMA Profile: http://nmaps.net/user/
MBTI Type: ENTP

Postby blue_tetris » 2009.10.05 (22:56)

Breaks the spirit of the game. Math is easy. Roleplay is legitimate.
Image
The Real N Sex on the Xerox Space Pimp Online Super Fluffy Pack 1! Super Fluffy Pack 2! Super Crunchy Pack! Mother Thumping Impossible: 2005 MotY! Time is on My Side: 2006 PMotY! Survival map king! Best humor award! Best satire award! Best voice award! Inadvertently intimidating! Assholier than thou! Gdubs is totally back! WIS 14! Cyberzone creator! Clique creator! Most lines on IRC! Ventrilo moderator and regular! Certified Dungeon Master! Most modest person ever! ENTP! Incorrigible alcoholic! CHA 19! AMERICAN! Least pretentious! Elitist extraordinaire! Liberal libertarian! Incapable of experiencing love! Check Safe! Commodore of the Eldritch Seas! Archmagus of the Eleventh Hall! Sheriff of the Uncharted West! Godfather of the IRC Mafia! Pun enthusiast! Quadster! Challenging Dunbar's number! Wikipedian!Approves of 4th Edition! 1,000 Blank White Cards! radio_free_tetris! Migratory! INT 18! Doesn't know when he's being genuine, therefore cannot form lasting relationships with people! Really into black chicks! Even more into Indian chicks and Blasians! Hates moderators! Loves the C word! Tronster! Thinks we should play more Worms! Always wins iSketch! Owns a Wii! Plays as Pikachu in Smash Bros! Wrote literotica! Wrote anime fanfic! Sorta into Asians! Lived and loved the 80's and 90's! Chattiest sig! Cyberzone ][ creator! Operand of the Greater Space Pimp Continuum! Helped lead the forum move!Wizard Date! Participated in the blue_tetris takeover! Pithiest one-liners! Walkin' on, walkin' on broken glass! Seems to have an invisible touch! Economist! Mario hackster! Owner of the most complex D&D campaign setting! Micromanagerial! FREEDOM is all-American! Slowly distancing! Supports the Democrats! Supports the old GOP! CATO Institute fanboy! Penn and Teller fan! Large, in charge, and on a barge! Heralded by community as genius hero! Proud yet humble recipient of the Mare & Raigan Award for 2008! CON 9! Dave of Nazareth! Communist is annoyed with me! Not half bad at images! F.Y.I. I am a medic! It's a spook house, lame ball. Too bad! Space Pimp II: Rags 2 Bitches! F.Y.I. I am a spy! Entire team is babbies! STR 10! Sorta appreciating scythe and atob again, for new reasons! Played CS:S briefly! Welcome to Nebraska! Do you think you can Live! Heist! Portrayer of the mighty 88 Shells! Joyous proprietor of the future estate of Kablizzy and blue_tetris! It's Batmen all the way up! They brought crystals to a sceince fight; that's a good way to lose your cat! Even SlappyMcGee! I'm about to run out of either primates or sexually transmitted diseases! One-upper! Toaster oven clairvoyant Mythomaniac! That's the Magic of Macy's! Half of Half! Spend all my time making love, all my love making time!

Plus (Size) Member
Posts: 42
Joined: 2008.09.27 (02:56)

Postby taaveti » 2009.10.06 (05:32)

Out of curiosity, did you do the GUI stuff manually or did you use some framework?

In terms of interface design, it would probably be a good idea to get into the habit of displaying some kind of warning message (e.g. via MessageBox) when you fail out of the button handler. Users tend to be happier about "invalid parameter" warnings than buttons that don't seem to do anything.

In any case, it's certainly better than my first foray into GUI programming was (back when the world was black and white and Roosevelt was in office...).

User avatar
Retrofuturist
Posts: 3131
Joined: 2008.09.19 (06:55)
MBTI Type: ENTP
Location: California, USA
Contact:

Postby t̷s͢uk̕a͡t͜ư » 2009.10.07 (08:31)

blue_tetris wrote:Breaks the spirit of the game. Math is easy. Roleplay is legitimate.

I separate the two. As long as my stats represent what my character is, I see zero problems. So if I'm playing a legendary war machine, I want to be damned sure that my character is a legendary war machine. I've seen "expert assassins" who blew goats at assassination when it came down to practice, and I don't like that that happens.
The games I'm used to these days have extremely few combats in them, anyway.

taaveti wrote:In any case, it's certainly better than my first foray into GUI programming was

Thanks!

taaveti wrote:Out of curiosity, did you do the GUI stuff manually or did you use some framework?

Microsoft has a program called MSDNAA. I don't remember what the heck it stands for, but through it, computer science students get free software.
This program was written in C# and written / compiled in Visual Studio 2005, which has a form-building toolkit. I built the GUI purely through a graphical approach involving clicking and dragging.

"you know i always joked that it would be scary as hell to run into DMX in a dark ally, but secretly when i say 'DMX' i really mean 'Tsukatu'." -kai

"... and when i say 'scary as hell' i really mean 'tight pink shirt'." -kai




spoiler

Image



User avatar
Demon Fisherman
Posts: 1265
Joined: 2008.09.19 (06:28)
NUMA Profile: http://nmaps.net/user/
MBTI Type: ENTP

Postby blue_tetris » 2009.10.07 (19:43)

4E is superior for roleplayers like Tsukatu.

It makes the numbers exceedingly less important by balancing all factors much better than 3E every balanced them. You can play a wider assortment of characters in 4E without sacrificing your personal concept to make sure you travel down a well-munchkinned route. You may want to play some more 4E sometime, Sook.

If you strongly separate flavor from mechanics (and, I prefer to also), it's the system for you. I played a 4E game where a few simple renames for powers enabled a perfectly Oriental setting. In 3E, choosing certain abilities also set your character's flavor.
Image
The Real N Sex on the Xerox Space Pimp Online Super Fluffy Pack 1! Super Fluffy Pack 2! Super Crunchy Pack! Mother Thumping Impossible: 2005 MotY! Time is on My Side: 2006 PMotY! Survival map king! Best humor award! Best satire award! Best voice award! Inadvertently intimidating! Assholier than thou! Gdubs is totally back! WIS 14! Cyberzone creator! Clique creator! Most lines on IRC! Ventrilo moderator and regular! Certified Dungeon Master! Most modest person ever! ENTP! Incorrigible alcoholic! CHA 19! AMERICAN! Least pretentious! Elitist extraordinaire! Liberal libertarian! Incapable of experiencing love! Check Safe! Commodore of the Eldritch Seas! Archmagus of the Eleventh Hall! Sheriff of the Uncharted West! Godfather of the IRC Mafia! Pun enthusiast! Quadster! Challenging Dunbar's number! Wikipedian!Approves of 4th Edition! 1,000 Blank White Cards! radio_free_tetris! Migratory! INT 18! Doesn't know when he's being genuine, therefore cannot form lasting relationships with people! Really into black chicks! Even more into Indian chicks and Blasians! Hates moderators! Loves the C word! Tronster! Thinks we should play more Worms! Always wins iSketch! Owns a Wii! Plays as Pikachu in Smash Bros! Wrote literotica! Wrote anime fanfic! Sorta into Asians! Lived and loved the 80's and 90's! Chattiest sig! Cyberzone ][ creator! Operand of the Greater Space Pimp Continuum! Helped lead the forum move!Wizard Date! Participated in the blue_tetris takeover! Pithiest one-liners! Walkin' on, walkin' on broken glass! Seems to have an invisible touch! Economist! Mario hackster! Owner of the most complex D&D campaign setting! Micromanagerial! FREEDOM is all-American! Slowly distancing! Supports the Democrats! Supports the old GOP! CATO Institute fanboy! Penn and Teller fan! Large, in charge, and on a barge! Heralded by community as genius hero! Proud yet humble recipient of the Mare & Raigan Award for 2008! CON 9! Dave of Nazareth! Communist is annoyed with me! Not half bad at images! F.Y.I. I am a medic! It's a spook house, lame ball. Too bad! Space Pimp II: Rags 2 Bitches! F.Y.I. I am a spy! Entire team is babbies! STR 10! Sorta appreciating scythe and atob again, for new reasons! Played CS:S briefly! Welcome to Nebraska! Do you think you can Live! Heist! Portrayer of the mighty 88 Shells! Joyous proprietor of the future estate of Kablizzy and blue_tetris! It's Batmen all the way up! They brought crystals to a sceince fight; that's a good way to lose your cat! Even SlappyMcGee! I'm about to run out of either primates or sexually transmitted diseases! One-upper! Toaster oven clairvoyant Mythomaniac! That's the Magic of Macy's! Half of Half! Spend all my time making love, all my love making time!

http://www.starstore.com/acatalog/Planet_Apes-lawgiver-statue.jpg
Posts: 514
Joined: 2008.09.26 (19:13)
MBTI Type: ISTJ

Postby Pikman » 2009.10.10 (02:28)

Bah, /me agrees with blue. This just seems to ruin the fun.

"Hey, let's run a GENERATOR! It can do all of this shit for us!" "Booooooooooring."

User avatar
Queen of All Spiders
Posts: 4263
Joined: 2008.09.29 (03:54)
NUMA Profile: http://www.freeWoWgold.edu
MBTI Type: ENFP
Location: Quebec, Canada!
Contact:

Postby SlappyMcGee » 2009.10.21 (11:38)

blue_tetris wrote:4E is superior for roleplayers like Tsukatu.

It makes the numbers exceedingly less important by balancing all factors much better than 3E every balanced them. You can play a wider assortment of characters in 4E without sacrificing your personal concept to make sure you travel down a well-munchkinned route. You may want to play some more 4E sometime, Sook.

If you strongly separate flavor from mechanics (and, I prefer to also), it's the system for you. I played a 4E game where a few simple renames for powers enabled a perfectly Oriental setting. In 3E, choosing certain abilities also set your character's flavor.


Jesus Hertz Christ, you want to pimp out 4E.

I like your program a lot, Tsukatu, although I hardly have a game I could use it in.
Loathes


Return to “Tabletop Gaming”

Who is online

Users browsing this forum: No registered users and 2 guests