Aller au contenu

Photo

Calculating the average damage per round


  • Veuillez vous connecter pour répondre
17 réponses à ce sujet

#1
Kato -

Kato -
  • Members
  • 392 messages
Hi,

Does someone know a reliable formula to do this?(considering everything like chances to hit and crits etc...) I have found the D&D damage averager on the web but I wonder if the formulas it uses are up-to-date, or if there's a better formula I should use instead? (I'm balancing a large number of NPCs...)

Thanks!


Kato 

Modifié par Kato_Yang, 22 août 2012 - 05:33 .


#2
the.gray.fox

the.gray.fox
  • Members
  • 127 messages
For your own good: I suggest you to think of something else.
Then again, it is *your* time -- spend it however you wish.


Anyhow...
There would be a lot of data to account for: equipment, feats, racials, current spell bonuses, class and level, and of course number of attacks per round, and which weapons are used during which attack (for dual-wield). Currently there is not enough support to query all of it. Least of all in real time.

The tracking and querying of active spells effects alone would require massive modding, spanning over hundreds of scripts just to build the _tools_ to do said tracking & querying.
For starters you would have to rescript the Dispel System. That is not something you want to deal with, believe the fox.

At any rate there is no way you could do it all in one slick script. You would TMI out of it long before reaching job completion. You would be forced to split the workload on multiple scripts running in disjoint contexts (to dodge the TMI), which in turn prevents you from doing it all in real time -- that is: actual game time elapses from the moment you start the query and the moment the job is finished. In that timeframe more scripts can run and more things can happen, potentially invalidating your query.



Can NWNX query spell effects and return you their properties? I mean, on _Windows_ not just Linux?
If it can -> you must definitely employ it. That chops off the biggest slice of the work, and the rest of the pie can be taken on with regular scripts.


-fox

#3
Shadooow

Shadooow
  • Members
  • 4 470 messages
You can look into PRC, they tried to do this as they in past had to fake extra attacks via special scripting routines for Tempest class. Yet, FYI that solution never worked perfectly because all what fox wrote is true.

#4
Kato -

Kato -
  • Members
  • 392 messages
Thanks for the infos, Gray Fox. Considering all this I think I'll keep on using the D&D damage averager, indeed.

@ShadoOoW: Nice info, I'll take a look for sure, to at least learn from the system you mention :)


Kato

Modifié par Kato_Yang, 24 août 2012 - 02:46 .


#5
henesua

henesua
  • Members
  • 3 878 messages
Kato- it sounds to me that you don't need to calculate this in real time, but simply want an estimate while designing an encounter. Is that correct?

#6
Kato -

Kato -
  • Members
  • 392 messages
Yes Henesua.

#7
henesua

henesua
  • Members
  • 3 878 messages
Thats an interesting way to handle this. I'll have to try it out.

Normally I consider the strength and weaknesses of a creature and what kind of PC is more likely to fall victim to their special attacks rather than damage output.

For example, one creature is able to cast that AOE mind fog spell that lowers will saves by 10, and then a gaggle of monsters with special attacks requiring will saves lowers the boom on the party. This would wipe out a fighter of equal level, but for a mixed party would range from a minor nuissance to a challenge depending on the mix. To up the challenge I'd throw in a couple heavy hitters (high HP, high damage output melee attackers). And the spawn could be designed to adjust the challenge based on which classes and levels of PCs have entered the encounter zone.

So anyway thats normally how I think about it. I've never optimized an encounter based on average damage per round before. It seems to me that that would work well for melee focused NPCs but when it comes to spell casting it would break down since saves can cause wide swings in terms of how much damage is dealt, and particular defenses can make it nearly impossible for a PC to muscle through until they figure out how to "crack the encounter".

Modifié par henesua, 24 août 2012 - 09:14 .


#8
MagicalMaster

MagicalMaster
  • Members
  • 2 003 messages
If you know the AB, AC, attacks per round, and a rough estimate of damage per hit you can figure out how much damage per round a creature will do. Spells are easiest to figured out in general.

For example, if a player has 15 AC and the mob has an AB schedule of 10/5 with 10 damage per hit, you have...

80%/55% = 1.35 hits per round, or an average of 13.5 damage taken per round. Different weapons have different crit ranges, but you can figure out an upper bound at a minimum. Assuming the attacker has a basic longsword and lacks Improved Critical, you have a 10% chance to crit if every critical that threatens actually crits. Which, with a x2 multiple, is 10% more damage on average.

So now we have 14.85 damage taken per round.

Now, if we add additional attackers they get a +2 flanking bonus which you'd have to factor in, but that's a basic gist.

#9
Kato -

Kato -
  • Members
  • 392 messages
Indeed, I guess that'll do it, thank you all for the insight :)


Kato

#10
Kato -

Kato -
  • Members
  • 392 messages
As a side note, in case it can be helpful, I have written down the formula, starting from MagicalMaster's calculations, which BTW give the same results as the D&D damage averager, since having the formula offers more flexibility than using the mentioned tool.

n = bchm + (b-bc)h

Where:
b = avg weapon damage(including IPs) + str modifier + weap spe feats + avg dmg from buffs
h = sum of hit chances in the schedule (in percentage)
c = crit chance (in percentage)
m = crit multiplier

Example: Attacker str 18, longsword, AB schedule 20/15/10/5, vs target AC 30

8.5*0.1*(0.55+0.30+0.05+0.05)*2 + (8.5-8.5*0.1)0.95 = 8.8825 avg damage/round

Cheers

Kato

Modifié par Kato_Yang, 25 août 2012 - 06:20 .


#11
MrZork

MrZork
  • Members
  • 940 messages
One might also take into account that many attack rolls in the crit range won't actually be crits, which lowers the total DPR a bit. The effect isn't typically that big - accounting for failed threat rolls in in the example above, the DPR is 8.75, which is very close. But, it edges toward significance for weapons with a wide crit range or large multiplier, particularly in situations where AB is much lower than AC.

For example, if the same attacker above were using a keen scimitar against an AC 35 opponent, the bh[1+c(m-1)] formula (above) gives DPR of 4.4, whereas true DPR is 3.6. Still not a huge difference, but whether it's worth working out depends on what you're doing with the information.

Modifié par MrZork, 26 août 2012 - 09:35 .


#12
Kato -

Kato -
  • Members
  • 392 messages

MrZork wrote...

One might also take into account that many attack rolls in the crit range won't actually be crits, which lowers the total DPR a bit. The effect isn't typically that big - accounting for failed threat rolls in in the example above, the DPR is 8.75, which is very close. But, it edges toward significance for weapons with a wide crit range or large multiplier, particularly in situations where AB is much lower than AC.

For example, if the same attacker above were using a keen scimitar against an AC 35 opponent, the bh[1+c(m-1)] formula (above) gives DPR of 4.4, whereas true DPR is 3.6. Still not a huge difference, but whether it's worth working out depends on what you're doing with the information.


Yes, the formula assumes a successful crit for each chance. How would you fit the failed threat rolls in the formula? Or if you prefer, how do you reach the numbers you posted?


Kato

Modifié par Kato_Yang, 26 août 2012 - 03:00 .


#13
MagicalMaster

MagicalMaster
  • Members
  • 2 003 messages
Well, for the longsword, you have a 10% chance to threaten critical.  If you do, on the first attack you have a 55% chance of actually landing the critical, a 30% chance of actually landing a critical on the second, 5% on the third, and 0% on the fourth.

So if you break the attacks down...

First attack
- 55% chance for a hit
- Within that 55% chance for a hit you have a 5.5% chance for a crit.  Thus a 49.5% hit and 5.5% crit
- With a x2 multiplier, you get 49.5% + 11% = 60.5% damage of a hit

Second attack is 30% hit with a 3% crit, so 27% + 6% = 33% damage of a hit

Third attack is 5% hit with a 5% crit, so 4.75% + 0.5% = 5.25%

Fourth attack is 5% hit, no chance of a crit, so 5%.

60.5% + 33% + 5.25% + 5% = 103.75% hits per round

8.5 damage * 1.0375 = 8.81875 (round it to 8.82).

Edit: Curious to see where the difference between my number and MrZork's comes from.

Edit 2:

MrZork wrote...

For example, if the same attacker above were using a keen scimitar against an AC 35 opponent, the bh[1+c(m-1)] formula (above) gives DPR of 4.4, whereas true DPR is 3.6. Still not a huge difference, but whether it's worth working out depends on what you're doing with the information.


So...

0.3/0.05/0.05/0.5 with the scimitar

Default formula would give 0.45 * 7.5 * 1.3 = 4.3875 (round to 4.4)

Actual breakdown gives...

30% chance to hit, 30% of the hits will be crits, so 21% + 18% = 39%

5% chance to hit, 5% chance to crit, so 4.75% + 0.25% = 5.25%

5% chance to hit, 0% chance to crit = 5%

5% chance to hit, 0% chance to crit = 5%

So 39% + 5.25% + 5% + 5% = 54.25%

7.5 * 0.5425 = 4.06875 (round to 4.1)

Modifié par MagicalMaster, 26 août 2012 - 04:24 .


#14
Kato -

Kato -
  • Members
  • 392 messages
Nicely explained MagicalMaster, I'll modify the formula accordingly, thank you.


Kato

Modifié par Kato_Yang, 26 août 2012 - 04:45 .


#15
MrZork

MrZork
  • Members
  • 940 messages
I don't know what step I was flubbing last night, but tonight I am getting the exact results that MM posted. Sorry if that caused any confusion. :blush:

#16
Kato -

Kato -
  • Members
  • 392 messages
NP MrZork, thanks anyway, my formula needed corrections. I'm using it in code to dynamically display the avg damage in the NPC description, based on the player examining the NPC(among some other things).


Kato

Modifié par Kato_Yang, 27 août 2012 - 06:26 .


#17
MrZork

MrZork
  • Members
  • 940 messages
Yeah, the spreadsheet I worked up has like twenty options for keen, feats, flurry-of-blows, etc. (and it's still not really as automated as I'd like), so who knows what setting I left from some other test. I need to add a button that clears all the settings... ;)

Your dynamic description sounds pretty slick. I wonder if a toolset tool would allow something similar for the little preview window? CR is okay, but there are times when knowing DPR would make designing encounters easier.

Modifié par MrZork, 27 août 2012 - 08:52 .


#18
Kato -

Kato -
  • Members
  • 392 messages
Not sure but I don't think so, yet perhaps you could use Moneo to scan the creature(s) quickly during design time, applying the formula from within the run script. Just an idea...


Kato

Modifié par Kato_Yang, 28 août 2012 - 02:27 .