CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.11k stars 4.11k forks source link

Arbitrary Gun Damage, plus Proposal to Fix #15752

Closed Nioca closed 8 years ago

Nioca commented 8 years ago

I'm not sure whether this is a remnant from when Whales was developing this (I'm guessing it is), or if it's something more recent, but it's something that's bugged me regarding firearms since I first started playing. And as we slide closer and closer to a more realistic depiction of firearms, it stands out more and more.

I'm referring (as the title states) to the arbitrary way that gun damage values have been set. Right now, each gun seems to have been slapped with a specific damage value, no matter how little it actually made sense; as best I can tell, it seemed to be based on how powerful the person statting it out thought the gun should be, without basing it on any real world data. To the best of my knowledge (and I'll confess here; I'm speaking entirely from looking up statistics online, rather than real world experience), when it comes to the gun itself, the only thing that can affect the velocity or energy of the bullet is the length of the barrel; and even then, it's a small difference. A 5.56 NATO fired from an M4 Carbine only loses about 7% of its velocity when compared to that same round fired from an M16, despite being a good quarter shorter.

To give an example of what I'm talking about, let's take a look at two in-game firearms: the M1911 Pistol and the KRISS Vector. The former has a 5.03 inch barrel (for the government model), the latter comes standard with a 5.5 inch barrel. So, all other things being equal, the KRISS Vector should be negligibly more powerful, right? Not according to the game: the M1911 gets an 8 point damage bonus above the KRISS Vector (the M1911 gets a whopping +6 damage bonus, while the KRISS Vector gets a -2 for some reason).

They aren't the only ones with weird damage values; the TEC-9 (+3, despite being shorter than some 9mm handguns) and Five-seveN (+2, where the P90 gets a flat 0) are two other prominent examples that stick out in my mind, and I'm sure they're not the only ones.

What I'd like to do is go through all the guns and rebalance all of their damage values to something more realistic (or at least internally consistent). What I have in mind currently is to set a baseline firearm for each caliber (9mm = Beretta M9, .45 ACP = M1911, .223 = M16, etc.), which would be considered Damage 0. For each 2 inches in barrel length other firearms differed, it'd provide a plus or minus 1 point difference in damage, rounded to the nearest damage bonus. Revisiting M16 vs. M4, this means the M4 would have a ranged damage of -3 (5.5 inches shorter, rounded to 6 inches), and the M1911 and KRISS Vector would be on equal footing in terms of damage.

This does have the drawback of potentially homogenizing a lot of guns in terms of damage (particularly handguns), but as far as I can tell, the gun used has more of a bearing on accuracy and felt recoil than it does on actual lethal potential; that's decided mostly by the ammo used.

Any thoughts, opinions, or things I've missed? As I stated earlier, my knowledge of firearms is purely theoretical, so there might be something I've overlooked.

kevingranade commented 8 years ago

See doc/GAME_BALANCE.md, any rebalancing should refer to the rationale there, which is mostly based on muzzle energy retrieved from sources online.

ejseto commented 8 years ago

I think the damage stat should just be removed/set to 0 for all guns. The damage bonus can be internally calculated based on the new barrel length stat, which has the beneficial side effect of allowing us to remove the bonus in the case of sawn-off weapons. I think it's a reasonable approximation to assume that the "integral barrel length" (or "un-saw-off-able" barrel length if you will) is similar or same between same-caliber weapons, although calibers that share both pistols and rifles might be exceptions.

kevingranade commented 8 years ago

That number is not the length of the barrel, it's how much of the barrel you can remove without breaking the gun. For delayed blowback guns and guns with tube magazines the two are wildly different. There are also any number of reasons you'd want to depart from pure barrel length to determine damage, it's far simpler to just have a damage adjustment stat.

Nioca commented 8 years ago

Regarding muzzle energy: I'd considered using that for the guns, but while it's fairly easy to find muzzle energy for a specific round, finding muzzle energy for each gun firing a specific load is significantly trickier, at least for the less common firearms. I actually attempted to look up the muzzle energy of a 9mm from a Beretta Cx4 Storm, to no avail (I did manage to find a bunch of statistics for it in .45 ACP, but the CDDA Cx4 Storm is 9mm, so that wasn't helpful). In addition, that also leaves the question of the Pipe guns and the Leadworks guns, which have no statistics in this regard to back them up. I could only take wild guesses at what the muzzle energy on those would be.

Hence, why I'm proposing basing it off of barrel length; the statistics are more constant and easier to find, and it's easier to infer what they might be for the fictional weapons. Although now that I'm thinking about it, the numbers in GAME_BALANCE.md are based off of the round's muzzle energy fired out of a specific-sized barrel, so the baseline ought to be that, rather than a specific gun. Also, having run some numbers, a 3 inch increment would work better in regards to this. 2 inches results in some overly-inflated numbers on the outlier weapons (pistol-caliber carbines need some love, but not THAT much).

To demonstrate my proposal, here's a table of CDDA's 9mm weapons, with their damage adjusted based on barrel length (the Baseline being 5.91 Inches, which is what GAME_BALANCE.md bases the non-+P 9mm bullets on). Most weapons remain about the same; the big shake-ups here are the TEC-9, which got nerfed by 3 points into having no bonus, the Calico M960, which got a 5 point jump to +2 damage, and the Kel-Tec and Cx4, which each got a +3 and +4 bonus respectively.

Firearm Barrel Length NewDmg OldDmg Notes
Glock 19 4.01 Inches -1 0
USP 9mm 4.25 Inches -1 -1
Beretta M9 4.9 Inches 0 -1
L39B & L39 4.9 Inches 0 1 The L39 & L39B is based off the Auto-9 in Robocop, which is in turn a dressed-up Beretta 93R.
TEC-9 5 Inches 0 +3 It's assumed the in-game TEC-9 is the full-size model and not the mini.
Briefcase SMG Unknown 0 +1 It's comparable in size to an MP5, but its concealed nature likely means a shorter barrel.
L2032 Lookout 7.5 Inches? +1 +1 Autorevolvers tended to vary between 6-7.5 inches in barrel length, so we'll err on the side of a +1 here.
STEN 7.7 Inches +1 +1
H&K MP5 8.9 Inches +1 +1
Uzi 10.2 Inches +1 0
9mm Pipe Rifle Unknown +1 -2 Despite it's quality, its volume makes it the largest 9mm weapon available, indicating a barrel size of 16-20 inches. However, given the far poorer tolerances, it's unlikely to hit the same velocity or energy as an actual rifle.
Calico M960 12.99 Inches +2 -3 Probably also needs its volume increased by 1. It's about the same size as an MP5.
Kel-Tec SUB-2000 16.1 Inches +3 0 Note to self: Fix name. It's missing a 0.
Cx4 Storm 16.6 Inches +4 0
kevingranade commented 8 years ago

Since we don't have accurate numbers for every gun, we should abandon the accurate numbers we do have and instead use something that is only somewhat related? How about we accumulate any muzzle energy statistics we can, make sure rounds we have numbers for are proportional, and extrapolate values based on secondary features such as barrel length for the rest?

Nioca commented 8 years ago

Er, no, that's not what I'm suggesting at all. To break it down:

To that end, my (slightly revised) suggestion is that the gun's damage modifier is based on the length of the gun's barrel, as compared to the muzzle energy statistics outlined in GAME_BALANCE.md. We're building off of those numbers, not throwing them out.

kevingranade commented 8 years ago

Muzzle energy numbers necessarily come from a round/gun pairing, the fact that the table only lists rounds is an error.

We need to see if we can fill that table out with the guns, otherwise it's overly approximate.

Otherwise it seems we're on the same page, sorry for misunderstanding. My only request is that you use muzzle energy as an intermediate value when balancing, this will allow people to review the assumptions made. I'm not asking for numbers for every gun, but min/max values for each calibre would provide a scale and something to review.

Nioca commented 8 years ago

Muzzle energy numbers necessarily come from a round/gun pairing, the fact that the table only lists rounds is an error.

We need to see if we can fill that table out with the guns, otherwise it's overly approximate.

Ideally, but I'm finding that even for the venerable M9 Pistol, M4 Carbine, or M16 Rifle, finding concrete numbers backed by a specific round is difficult. One source quotes the M9 at 606 J (equating to 25 damage) with no derivative data to back it up, another quotes a range from 398-610 J (20-25). And the best I've found so far on the M4 & M16 is muzzle velocity.

And yet a quick Wikipedia search turns up exact muzzle energies for the Five-seveN and FN P90 firing SS190 AND five other different 5.7x28mm loads. Funny how that works out. Although the data there suggests I'm on the right track; the muzzle energies listed there suggest the in-game P90 and Five-seveN should do 20* and 17* damage, which is precisely where my adjustments would put those two.

*Stalblar's stats put a -3 damage penalty on 5.7x28mm SS190, since it's armor-piercing ammunition.

And yeah, I'll update the ammo table with data on damage ranges, the barrel length used to get the base muzzle energy figure, and other relevant data. Any guns that deviate from just barrel length-based adjustment will include a comment explaining the rationale (like the Pipe Rifle in the table above).

I think I'll also need to do some fixes to the ammo itself; when I was going through it, I noticed some odd discrepancies and errors, and a few ammo types that are missing. .32 ACP isn't listed, Stalblar used the 10mm FBI Load (functionally identical down to the Joule to the .40 S&W) when the game implies a full-power 10mm, and for 9mm FMJ, he listed the square root of 420 as 24 (it's 20). .223 Remington/5.56 NATO also poses an interesting challenge here; they're technically two different chamberings, so since they're combined here, I'll need to make it consistent while still maintaining the properties of each cartridge.

EDIT: And right after I say that, I stumble across a source that might actually be helpful in regards to muzzle energies for specific guns. Let me take a look and see what comes up real quick.

EDIT 2: Nope, that didn't help. It looks like it's all in cartridges we aren't using.

ejseto commented 8 years ago

Ideally, but I'm finding that even for the venerable M9 Pistol, M4 Carbine, or M16 Rifle, finding concrete numbers backed by a specific round is difficult.

You should go with your initial idea. The muzzle energy numbers in GAME_BALANCE.md appear to have been taken off Wikipedia, which also happens to list the barrel lengths used. I think it's reasonable to assume barrel length and propellant mass are the primary determinants of muzzle energy. Exceptions (like the most-likely-not-rifled pipe rifle) can be handled on a case-by-case basis. Even if you found numbers for the muzzle energies of specific weapons, it's unlikely they'd all have used the same ammunition. I think the most important thing is that everything is consistent with the real world. A .308 should hit harder than a .223 because not only is the bullet bigger, but the case contains more propellant. If it didn't, nobody would use the .308 since it has higher recoil (and presumably is more expensive, containing more materials). A rifle should hit harder than a carbine because the barrel is longer, meaning more propellant energy is transferred to the bullet. If full rifles weren't more accurate or powerful, nobody would use them because they're bulkier and heavier. The exact numbers aren't as relevant, only their positions relative to each other. Before we need more accurate numbers, I'd say we need a better damage model.

I think I'll also need to do some fixes to the ammo itself; when I was going through it, I noticed some odd discrepancies and errors, and a few ammo types that are missing.

There is at least one mathematical error for 9mm FMJ on that table (square root of 420 != 24). A third of that table is also arbitrarily modified, suggesting that square root of muzzle energy is not a very good indicator of real world performance. Also, @mugling rebalanced many of the values in his recent pass. If you're going to base it on muzzle energy, I think it should also be proportional to projectile diameter. Larger holes cause more damage right? Smaller rounds should perhaps gain armor penetration. When that table was made, armor penetration appears to have been completely ignored. Further, armor penetration has never been used in a sensible manner. It's almost always traded at a one-to-one ratio with damage, making it strictly inferior to raw damage.

And the best I've found so far on the M4 & M16 is muzzle velocity.

I don't see why this wouldn't be a one-to-one function of muzzle energy, i.e. E=0.5mv^2. I'm pretty sure they'll always tell you the bullet mass as well.

Nioca commented 8 years ago

A third of that table is also arbitrarily modified, suggesting that square root of muzzle energy is not a very good indicator of real world performance.

It's not. It's good to get a sense of the raw power difference between different cartridges, but if raw power was all that determined an effective cartridge, the US Army would be toting Desert Eagles in .50AE, not Beretta M9s in 9mm. However, unless we want to go full Dwarf Fortress and start modeling individual blood vessels and teeth, it's a factual and consistent number to determine how much HP to subtract from a @, rather than an arbitrary assignment based on what's perceived as more powerful.

I do wish that Stalblar had left some documentation regarding why he altered certain rounds from base muzzle energy. Some of it makes sense if you know the ballistics behind it, but there's some decisions that make you scratch your head. With that being said, for the most part, I'm going to be leaving ammunition alone, only touching it if there's something blatantly wrong (like the 10mm issue, or the calculation errors) or missing (.32 ACP, .50BMG, prolly others). Right now, I want to whip the guns themselves into shape first.

ejseto commented 8 years ago

if raw power was all that determined an effective cartridge

That's not what I or the table implied. "Effective" is not purely a function of stopping power. All things being equal, higher stopping power is better than lower, but obviously all things are not equal and you trade recoil, magazine capacity, weight, etc. for higher stopping power. This is precisely why there are other statistics associated with ammunition besides pure damage.

it's a factual and consistent number to determine how much HP to subtract from a @

It's absolutely not. That line of thinking is why 9mm is more powerful than .45, which is absolutely false. Even considering the mathematical error, taking the square root of muzzle energy results in less than 1 damage difference. Are you telling me you think .45 ACP is less than 5% more lethal than 9mm, all things being equal? I'm not talking about recoil, or how many shots you can fire and land in a given amount of time, I'm talking about two shots landing in the same place. Which caliber does more damage and by how much? Less than 5%?

Quite frankly, a better number to use is propellant mass. This is obviously an upper limit on the amount of energy a bullet can possess, in the unrealistic situation of 100% energy transfer, but it's a controlled quantity that doesn't depend on the particular firearm used.

mugling commented 8 years ago

There are also any number of reasons you'd want to depart from pure barrel length to determine damage, it's far simpler to just have a damage adjustment stat.

Right now, I want to whip the guns themselves into shape first.

Dropping the damage stat from guns entirely is going to be problematic. As @kevingranade points out there are always going to be exceptions. It should however be considered a modifier used only to manually override otherwise sane defaults (see #15765).

I do wish that Stalblar had left some documentation regarding why he altered certain rounds from base

The problem is successive authors have added content with little guidance as to how to select values. In #15765 I've outlined a rules based system guiding how different properties of a gun should affect the stats. For example how does barrel length affect damage? Consider revising or writing further such rules as they enforce some consistency. All the better if such algorithms are backed by empiric evidence.

a few ammo types that are missing I'm going to be leaving ammunition alone, only touching it if there's something blatantly wrong

Yes, please focus your efforts on correcting the existing ammo types rather than adding more. I'm considering @ejseto proposal in #15765 to tag ammo with RECYCLED, SUBSONIC, OVERPRESSURE and this would implicitly require a rules based approach as to how to adjust from the base type.

223 Remington/5.56 NATO also poses an interesting challenge here ... I'll need to make it consistent while still maintaining the properties of each cartridge.

Good, this suggests you appreciate the concept that any modelling has it's limitations and consistency (and therefore gameplay and balance) is equally important to technical correctness, the latter often being hard to define in any case.

Nioca commented 8 years ago

That's not what I or the table implied. "Effective" is not purely a function of stopping power.

When I said "Effective", I was purely referring to ballistic performance. But I think we're wandering a bit off-course here.

Even considering the mathematical error, taking the square root of muzzle energy results in less than 1 damage difference. Are you telling me you think .45 ACP is less than 5% more lethal than 9mm, all things being equal?

...to be perfectly honest? After looking at the numbers and reading up on both, I'm not convinced it is significantly more lethal. At the very least, not to the extent it tends to be hyped up to be. That's why we need to base it on an actual number, and not on our own opinions of what should be more effective.

We can tweak things based on additional factors that aren't considered by muzzle energy. For example, you're right in that muzzle energy doesn't take into account the diameter of the round. But it's one of the best measures we have right now.

Quite frankly, a better number to use is propellant mass. This is obviously an upper limit on the amount of energy a bullet can possess, in the unrealistic situation of 100% energy transfer, but it's a controlled quantity that doesn't depend on the particular firearm used.

Propellent charge only indicates how much propellent is in the cartridge. It fails to factor in things that muzzle energy does (like the bullet's mass and velocity). We'd be trading "Why is 9mm and .45 ACP so close together/.45 ACP outperforming 9mm?" for "Why is .45 ACP (230-grain) so massively outperforming 7.62x51mm Battle Rifle rounds (147-grain)?".

In other news, I actually have been working on this. It's just that I'd like to get all the numbers down on my end before I start submitting PRs, so as to catch anything seriously weird that crops up.

Unexpected side-effect of doing this? Rifles are going to get pretty heavily nerfed, compared to what they were. Some of the numbers on the 5.56 NATO guns were absolutely ridiculous. The damage range here dropped from an 11 point spread (-3 to +8) to a 6 point spread (-4 to +2)

mugling commented 8 years ago

In other news, I actually have been working on this. It's just that I'd like to get all the numbers down on my end before I start submitting PRs

I'd actually encourage opening a PR and obtaining feedback as you go

ejseto commented 8 years ago

base it on an actual number

Explain how muzzle energy converts into damage. The energy does not purely go into destroying flesh. The bullet loses energy as it penetrates (or fails to penetrate) flesh/kevlar/whatever. If it still has energy, it keeps going. If it has so much energy that it keeps going beyond the body, i.e. over-penetrates, that energy is wasted. Therefore the most efficient velocity for a bullet is the one that is precisely zero as it exits the body, such that nothing is wasted.

Assuming penetration at all, I posit that bullet diameter is at least as important, if not more so. Hollow-point rounds are more deadly because they create a larger diameter wound channel. By the same token, a simply larger bullet should also be more deadly because it would also create a larger diameter wound channel.

And one last thing: where do these numbers actually come from? Who chose the loads, and are those realistic and representative of what you'd expect to get if you, say, walked into a gun store and asked for the most popular bullets for both calibers? In the particular case of 9mm vs .45 ACP, what barrel lengths were used for testing? Is there a point in using actual numbers if the "experiment" isn't controlled?

"Why is .45 ACP (230-grain) so massively outperforming 7.62x51mm Battle Rifle rounds (147-grain)?"

Pretty sure those are bullet masses, not propellant masses. And it wouldn't surprise me, assuming penetration of both, if .45 ACP were more deadly. You're going to get a lot of over-penetration with 7.62x51mm. Besides, military rounds aren't necessarily designed purely to kill. You kill one man, you take one man out of the fight. You wound one man, you take three out of the fight - the wounded man and the two who carry him away.

Nioca commented 8 years ago

Explain how muzzle energy converts into damage. The energy does not purely go into destroying flesh. The bullet loses energy as it penetrates (or fails to penetrate) flesh/kevlar/whatever. If it still has energy, it keeps going. If it has so much energy that it keeps going beyond the body, i.e. over-penetrates, that energy is wasted. Therefore the most efficient velocity for a bullet is the one that is precisely zero as it exits the body, such that nothing is wasted.

Truth be told, I'd actually like to see over-penetration mechanics for higher-energy weapons. If, admittedly, so weapons like the Heavy Rail Rifle actually live up to the hype and mow down lines of zombies (and houses).

With that aside, you're absolutely right regarding penetration. But at the same time, that brings it back to what I said earlier: unless we start doing in-depth modeling of tissue damage in-game, there's a limit to how accurate we can go here. Unless you've got a consistent way to break down energy, wound tracts, and penetration into a fairly coarse and objective numerical format (and if you do, by all means, here), it's a rather moot point.

Assuming penetration at all, I posit that bullet diameter is at least as important, if not more so. Hollow-point rounds are more deadly because they create a larger diameter wound channel. By the same token, a simply larger bullet should also be more deadly because it would also create a larger diameter wound channel.

While I might take issue with the claim that diameter is more important, I'm not arguing this point. In fact, I stated earlier that factors other than just straight muzzle energy need to be taken into consideration, and this is one of them.

Pretty sure those are bullet masses, not propellant masses.

Yeah, um, whoops. I was under the mistaken impression that Grains were specifically used for measuring powder, rather than as a potential unit of measure for any object. Mea culpa.

Anyway, at this point, I think we're rapidly approaching the point in the debate where it doesn't matter. If you've got numbers and statistics, bring 'em to the table. If there's a better way to handle it, I don't think you'll actually meet much resistance to it, as long as you demonstrate it works better than what we have now. But until then, what we have does work, and I'd rather work with what we've got now, rather than try to reinvent the wheel on a subject I'm not actually an expert in.

ejseto commented 8 years ago

If there's a better way to handle it, I don't think you'll actually meet much resistance to it, as long as you demonstrate it works better than what we have now.

Well at a minimum, on top of muzzle energy determining damage, I'd like to see a bonus proportional to bullet diameter, ranging from 0% for the smallest (4.6mm?) to, say, maybe 50% for .700 NX? Smaller bullets could receive a similar bonus to armor penetration with .700 NX receiving none to 4.6mm receiving the most. Hollowpoints could simply be treated as larger bullets if you can find data on their expansion diameters. This would reflect reality in that larger bullets would be more lethal and that rounds designed for armor penetration have smaller diameter (4.6mm/5.7mm/sabot rounds being designed specifically to defeat armor).

The particular proportionality constants can of course be tweaked, subject to game balance, and the whole distribution may need to be moved if guns become too strong, but I think a system like this would reflect reality much better than the system we have now where .45 ACP basically has no advantage over 9mm which is both contrary real life and game balance.

There's an interesting document here (http://www.balochistanpolice.gov.pk/thesis/HandgunW.pdf) that might provide some insight. At the least, it supports my (and indeed conventional wisdom's) claim that .45 ACP is a more damaging bullet because it is larger and thus contacts (and destroys) more tissue.

kevingranade commented 8 years ago

Mechanically, it would be preferable to model the effect of bullet diameter on damage as a penalty for low diameter rather than a bonus for large diameter. Continuing to increase diameter does not result in infinite damage, but instead in lower damage as the bullet becomes unable to penetrate to the vitals. On the other extreme you have a projectile with an infinitesimal diameter causing 0 damage, that is as expected. Practically speaking, if the diameter of the bullet relative to its momentum is high enough, treat the bullet as being able to turn all its momentum into damage, so no penalty, if the diameter is low enough to cause over penetration, you lose some of the potential damage. In a more advanced system, we'd model a hit as a torso vs limb vs head hit, or even better generate a number indicating how far the bullet path through the body is, which we could use to determine whether a particular round overpenetrates. So, are there any sources indicating which rounds are prone to over penetration?

Nioca commented 8 years ago

(WARNING! MASSIVE POST AHEAD!)

Okay, I didn't disappear or give up in frustration or anything. I just got busy for a bit, and was trying to track down useful data in regards to bullet diameter and its effects on terminal ballistics. And in doing so, I happened to stumble across a page that had a couple of very interesting formulae: http://jagwildklub.blogspot.com/2012/12/the-rifle-cartridge-killing-power.html

Apparently, more than one person has tried to answer similar questions to what we're asking. The writer of the post in question jotted down a formula for the numerical representation of power between rifle cartridges at 100 yards. But what caught my attention was a similar formula he also posted near the bottom:

I chanced on a reference in the July/August 2005 issue of Rifle Shooter magazine to John Wooter's "lethality-factor index formula," of which I was not previously aware. The "L" formula apparently multiplies kinetic energy (in ft. lbs.) x sectional density x bullet diameter (in inches). Thus it incorporates two of the three factors I adopted for my Rifle Cartridge Killing Power Formula, and makes a nod in the direction of the third. (Apparently great minds think alike!)

It seemed like it might just be what we needed, so I decided to give that formula a test drive. The results were promising, but for our purposes, it started having issues near the more extreme ends of the scale. On one hand, .22LR bullets were coming up with a result of 3. At the other end, .50BMG bullets popped up with a whopping 2541. So I tinkered with it a bit, and found that if I reduced the initial result to its square root, then multiplied that by 4, it returned an actually usable number that still had a realistic basis. To cite a few examples:

Weapon Cartridge New Damage Old Damage
Holdout .22LR 8 12
Pistol 9mm (FMJ) 17 24
Pistol .45ACP (FMJ) 20 21
Magnum Pistol .44 Magnum (FMJ) 40 42*
Assault Rifle 5.56 NATO 29 46
Battle Rifle 7.62 NATO 52 57
Sniper Rifle .300 Win Magnum 80* 73
Antimateriel Rifle .50 BMG 202 131*

The asterisks mark a couple of theoretical cases. for the .300 Win Magnum, what we have in-game is a JHP, where all of these damage values assume FMJ. I'll get to those adjustments in a second. For the .44 Magnum and .50 BMG, Stalblar never touched those (as far as I can tell, anyway) when he rebalanced ammo; those values mark where they'd be if he had, before any arbitrary changes. As you can see, most cartridges get nerfed by the change; personally, I think that actually is for the better, as living tissue (or unliving, as the case may be) is remarkably resilient. Only the really heavy calibers got notable increases, with .50 BMG being the most notable increase, and again, I think this works out (although some testing to see how it scales is probably in order). Catching a bullet meant to kill lightly-armored vehicles is probably going to put whatever body part caught it out of commission regardless of how much kevlar you're wearing. We could still probably lower this number by quite a bit though, since overpenetration in most non-eldritch/non-tank targets is pretty much guaranteed (same goes for the .700 NX).

That said, while this seems to model FMJ rounds just fine (in my opinion, anyhow), that still leaves expanding bullets. In terms of terminal performance, a JHP is going to make a bigger hole than an FMJ. I tinkered with adjusting the effective diameter of the bullet itself for the purpose of determining the extra damage, but found that it scaled badly no matter how I ran it. Ultimately, I settled on a 20% increase to the initial result (before square root) for JHP rounds, and a 10% increase to initial result for Soft-Point rounds, which seemed to balance out quite nicely.

(Worth noting here that all of the above calculations round to the nearest number.)

Finally, taking into account what Ejesto suggested regarding diameter and armor penetration, I created a secondary formula which determined (in game terms, mind you) the armor-piercing value of the various cartridges: sqrt(KEx(1-D)), where KE = Kinetic Energy in foot-pounds, and D = Diameter of the bullet in inches. From here (without rounding yet), I then applied a penalty based on the bullet's composition. Dedicated armor-piercers (such as steel-core rounds) took no penalty, FMJ rounds took a 60% penalty, SP rounds took an 80% penalty, and JHP took a 90%.

It was about this time that I realized that, in all my tweaking and running the numbers, I had about halfway filled out a table of cartridges. So I figured, heck, let's just do the whole thing. And thus, the table below. It's not all-inclusive (+P rounds are missing, and I'm betting there's a couple others I missed as well), but it's more comprehensive than the original table in GAME_BALANCE.md. Note that, mostly, I'm using the cartridges Stalblar selected to represent each round. I did fix a couple of glaring errors in cartridge selection, though (such as FBI Load 10mm, 36gr .223 Remington, etc.).

Also, this doesn't take into consideration any unusual terminal ballistics on each round (such as 5.56 NATO fragmenting if it hits with sufficient velocity, or 7.62x39mm leaving tiny permanent wound cavities); even without it, though, my personal opinion is that this chart is pretty serviceable to our own ends.

Cartridge damage is determined by Kinetic Energy (foot-pounds) x Sectional Density x Bullet Diameter (Inches). Hollow-point and other heavily expanding rounds receive a 20% bonus to this number, Soft Point and lesser expanding rounds receive a 10% bonus to this number. This number is then reduced to its Square Root, then multiplied by 4 to achieve a final damage number. Round nearest for each calculation.

sqrt((KE x SD x D) x B) x 4

Cartridge Armor-Piercing is determined by the Square Root of (Kinetic Energy x (1 - Bullet Diameter (Inches))). This number then receives a penalty based on round composition: None for dedicated AP, 60% for FMJ, 80% for SP/JSP, 90% for JHP.

sqrt(KE x (1 - D)) x P

Ammo ID Description KE ft-lbf Density Dm in IRslt Dmg AP
.22LR 40gr unjacketed bullet 104 0.1139 .224 3+1 8 0
.22LR FMJ 31gr FMJ bullet 204 0.0883 .224 4 8 5
5.7x28mm SS190 31gr AP FMJ bullet 394 0.0883 .224 8 11 17
4.6x30mm 31gr copper-plated AP bullet 373 0.1322 .183 9 12 17
.32 ACP 73gr FMJ bullet 177 0.1068 .3125 6 10 4
.38 Special 110gr JHP bullet 235 0.1233 .357 10+2 14 1
.38 Super 130gr FMJ bullet 468 0.1457 .357 24 20 6
.38 FMJ 130gr FMJ bullet 189 0.1457 .357 10 13 4
9x19mm FMJ 115gr FMJ bullet 420 0.1304 .355 19 17 6
9x19mm JHP 116gr JHP bullet 393 0.1315 .355 18+4 19 1
.40 S&W 155gr JHP bullet 500 0.1384 .400 28+6 23 1
.40 FMJ 180gr FMJ bullet 441 0.1607 .400 28 21 6
10mm auto 220gr FMJ bullet 703 0.1964 .400 55 30 8
.44 Magnum 240gr JHP bullet 1160 0.1863 .429 93+19 42 2
.44 FMJ 240gr FMJ bullet 1280 0.1863 .429 102 40 10
.45 ACP FMJ 230gr FMJ bullet 352 0.1615 .451 26 20 5
.45 ACP JHP 185gr JHP bullet 453 0.1299 .451 27+5 23 1
.454 Casull 300gr JSP bullet 1814 0.2098 .452 172+17 55 6
.500 S&W Magnum 500gr bullet 2254 0.2857 .500 322 72 13
.223 Remington 55gr JHP bullet 1282 0.1566 .224 45+9 29 3
5.56 NATO 62gr FMJ bullet 1303 0.1765 .224 52 29 12
7.62x39mm M43 123gr steel core FMJ bullet 1607 0.1805 .312 90 38 33
7.62x39mm M67 123gr steel core FMJ bullet 1607 0.1805 .312 90 38 33
5.45x39mm 7N10 56gr FMJ bullet 1034 0.1653 .220 38 25 11
5.45x39mm 7N22 57gr steel core FMJ bullet 1078 0.1682 .220 40 25 28
.308 Winchester 168gr hollow point bullet 2630 0.2530 .308 205+41 63 4
7.62 NATO M80 147gr FMJ bullet 2437 0.2214 .308 166 52 16
.270 Winchester 130gr soft point bullet 2702 0.2420 .277 181+18 56 8
.30-06 Springfield 165gr soft point bullet 2872 0.2485 .308 220+22 62 8
.30-06 M2 152gr FMJ bullet 2655 0.2289 .308 187 55 17
.300 Winchester Magnum 220gr JHP bullet 3908 0.3313 .308 399+80 88 5
7.62x54mmR 150gr FMJ bullet 2677 0.2201 .312 184 54 17
.700 NX 1000gr SP bullet 8900 0.2915 .700 1816+182 179 10
.50 BMG 720gr FMJ bullet 12600 0.3955 .510 2541 202 31

Finally, regarding overpenetration: I think any attempt to model this would best be handled on a per-attack basis, rather than trying to assign a value to the cartridge. The reason for this is that, in-game, we can shoot at anything from giant flies to giant tank bots; Most everything will overpenetrate the former, but I seriously doubt anything would manage to overpenetrate the latter. Human-sized targets would of course fall between those two extremes, and what works for one enemy won't work for them all. Overpenetration would probably need to be based primarily on the size of the target, then on damage, then on AP. Enemy armor would work to mitigate AP's impact on overpenetration risk. In the event of overpenetration, the type of hit would also be a factor; a Grazing Hit would probably keep going at almost full velocity, doing minimal damage. Normal and Good Hits probably hit non-vital tissue, and would take a moderate penalty to damage. Critical Hits and Headshots would still deal full damage, since the former likely nailed something vital on the way through and the latter certainly did.

So after all that, thoughts? All forms of grandiose praise, general ambivalence, and thrown rotten produce for being a moron/overlooking something completely bloody obvious are accepted.

ejseto commented 8 years ago

5.56 NATO/5.45x39 seem a little low, don't they? I suppose that's because the formula doesn't take into account fragmentation, tumbling, or hydrostatic shock, but those probably aren't things that can be modeled linearly. It might work out if rifles get an across the board buff due to much longer barrels though.

Kinetic Energy (foot-pounds) x Sectional Density x Bullet Diameter (Inches)

Not sure how much I trust this formula, having been proposed by someone who, by his own admission, "can barely run a calculator." It appears to actually depend inversely on bullet diameter. Sectional density = mass / area = mass / (0.25_pi_D^2). This leaves 1/D dependence at the end (implying hollow-points should actually do less damage, as they have larger diameter once they "open"), which is counter-intuitive. Somehow the numbers have some semblance of balance (pistols better, rifles worse) but ultimately I think the table is going to have to be hand-made.

I don't have much faith in killing power formulas in general. Most such formulas are obviously designed to reinforce someone's pre-conceived notions.

He was right about that though.

Night-Pryanik commented 8 years ago

What's IRslt table header stands for?

Nioca commented 8 years ago

What's IRslt table header stands for?

Initial Result. It's the result for * KE x SD x D* before reducing it to its square root and multiplying by 4.

5.56 NATO/5.45x39 seem a little low, don't they? I suppose that's because the formula doesn't take into account fragmentation, tumbling, or hydrostatic shock, but those probably aren't things that can be modeled linearly.

Indeed, it doesn't. As I stated, this data is before any modifiers for terminal performance beyond the basic statistics for the bullet (with NATO 5.56 being one of the rounds I highlighted).

Then again, it's also worth keeping in mind that both 5.56 NATO and 5.45x39mm are some of the smallest bullets on here; the only differences between either of those two and the .22 LR is the fact that they both have far higher muzzle energies and are a bit heavier (in terms of diameter, 5.45x39mm is actually smaller than the .22 LR!). I'm not saying the 5.56 NATO or 5.45x39mm should perform anything like the .22 LR, far from it; but it's important to keep perspective on what these rounds actually are.

Not sure how much I trust this formula, having been proposed by someone who, by his own admission, "can barely run a calculator."

Actually, his formula was the first one on that page. I'm using the second one. And I'm not sure what that really has to do with anything. It's not like I just dropped the formula here and said it'd work on blind faith; I was running the numbers to make sure that it'd produce usable results. There wouldn't be a giant table a few posts back if it didn't. As is, the formula has an issue of scale at the extreme ends; once that was compensated for, in my opinion, the results turn out just fine.

It appears to actually depend inversely on bullet diameter. Sectional density = mass / area = mass / (0.25piD^2). This leaves 1/D dependence at the end (implying hollow-points should actually do less damage, as they have larger diameter once they "open"), which is counter-intuitive.

Strictly speaking, as Kevin already pointed out, having a larger diameter doesn't automatically equate to more damage. This is because, all other things being equal, a larger-diameter bullet spreads its force out over a wider point of impact, reducing the penetration of the round. Now, if the larger bullet has enough energy behind it to achieve deep penetration, then yeah, it's going to do more damage than a smaller bullet of similar penetration. But simply scaling up diameter on equally-powered rounds just results in shallower wounds.

Somehow the numbers have some semblance of balance (pistols better, rifles worse) but ultimately I think the table is going to have to be hand-made.

So what you're basically saying here is that, because there's no way to model every single factor of terminal ballistics with absolute scientific certainty, that we can't come up with a model that is absolutely perfect, that we should just throw out all real data and just arbitrarily assign values based on what feels right?

facepalm

This is a video game. Not a study in terminal ballistics, a video game. With zombies. We don't need a perfect model, we just need something that tells us how effective something is in general when we shoot a zombie with it.

kevingranade commented 8 years ago

I'm traveling today, so just a few observations, I'll try and spend some proper time looking at this when I can.

Regarding extreme values, I suspected that was going to happen and suggested using over penetration to deal with it by capping damage when it occurs. If hp generally scale with body mass, then very large targets such as hulks will have extraordinarily high hp, at which point those "absurd" values from .50 Cal rounds will be necessary. They will also be the only targets to take full damage from these rounds.

Regarding formulas vs setting damage, I strongly suspect that we are going too run into enough glaring exceptions to any formula we come up with that we will need arbitrary adjustments on top of the formulas. Additionally having a formula baked into the game makes creating and understanding ammo definitions more difficult, because people working backwards from their desired effect are going to have to reverse-engineer what properties the rounds need to have a given effect. The table and formulas are very much the kind of justification I was looking for in a rebalance, but I'm still very skeptical of using them as anything other than a rationale for the values set in json.

ejseto commented 8 years ago

that we should just throw out all real data and just arbitrarily assign values based on what feels right

Pretty much, yes. You call it "real world data" but even experts don't agree what bearing it has on lethality, which is precisely why it's so hard to find formulas for "stopping power."

This is a video game.

This is an argument for not using a formula at all. Game balance and fun is more important than following some made-up formula, especially when that formula contradicts real world performance. And if you're just going to make exceptions to the formula, how's that different than not using one at all?

we just need something that tells us how effective something is in general when we shoot a zombie with it.

The whole point is that it doesn't tell us how effective different rounds are. That's why there are so many contradictions to reality. You want something that tells us how effective they are? Google "caliber 1 vs caliber 2". Yeah, you'll get anecdotal evidence. Anecdotal evidence (based on the experiences of shooters everywhere over decades) is far better than a formula with no basis in reality.

facepalm

Careful with those edges kid.

Nioca commented 8 years ago

Regarding formulas vs setting damage, I strongly suspect that we are going too run into enough glaring exceptions to any formula we come up with that we will need arbitrary adjustments on top of the formulas. Additionally having a formula baked into the game makes creating and understanding ammo definitions more difficult, because people working backwards from their desired effect are going to have to reverse-engineer what properties the rounds need to have a given effect. The table and formulas are very much the kind of justification I was looking for in a rebalance, but I'm still very skeptical of using them as anything other than a rationale for the values set in json.

No arguments here. A level of arbitration is going to be necessary in any and all cases in order to preserve game balance and/or reflect reality. The idea behind both muzzle energy formula Stalblar used and the formula I presented is to provide a reference for comparison, and a rationale for why we're choosing the numbers that we are, rather than seemingly pulling them out of a hat. The formula I presented takes into account factors that simple muzzle energy misses, but muzzle energy is certainly far simpler a reference since all you need is a single figure.