Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebalance archery take... 5? #37241

Merged
merged 6 commits into from
Mar 2, 2020

Conversation

kevingranade
Copy link
Member

@kevingranade kevingranade commented Jan 20, 2020

Summary

SUMMARY: Balance "Overhaul archery balance."

Purpose of change

As outlined in #35971, #30681 and #26183 and started in #28069, archery balance has been up in the air for a very long time now.
After addressing effective range in #37199 I'm taking a look at a pile of other effectiveness mechanisms here.
The goal is making archery in general be more representative of reality, and in broad strokes that means applying the planning outlined in #26183 and https://docs.google.com/spreadsheets/d/1wpuAk7F1fJ227yAgYbokwn7KxdEeOv-MGFvnnnW5s1Q/edit#gid=781207725 to normalize archery damage potential while shifting a significant part of the damage contribution to multipliers on arrowheads instead of having the damage be additive.

Describe the solution

  • Adjust arrow damage multipliers.
  • Squashed reload times.
  • Calculate momentum for bows and crossbows.
  • Map momentum figures to damage.
  • Tweak damage for interaction with zombies.
  • Retune draw weight figures for bows.

The rationale for the damage numbers is that we make some assumptions about weapon draw weight and efficiency based on the understanding of what real-world item each weapon represents, and once we have an estimated power output, we take the square root of the presented projectile momentum as the base damage number. Then this number is modified by the terminal ballistics characteristics of the arrow, mostly the head, to determine the final damage number. In practice this falls into a handful of categories.
0.5 multiplier from blunt-tip arrows used for hunting small game.
0.75 for poorly sharpened tips, such as a bare wood tip.
1.0 for a decently sharp spike of a tip, exemplified by a bodkin tip used to maximize armor piercing.
1.25 for a crude bladed tip.
1.5 for a modern broadhead.
1.75 for a particularly high performance arrow with an advanced modern broadhead tip.
There might be some ambiguity about which arrow falls into which category, so I could readily see issues with the assignment of these values.

A somewhat more arbitrary number is the mapping of strength stat to weapon poundage.
The document that Darktoes put together perpetuates the assumption that each point of strength stat is good for 10 pounds of draw weight on a bow. This doesn't make much sense, as it places the low end of bows at 30lbs within the reach of an incredibly feeble str 3 character, and the main "used by fit hunters" 60lb draw bows in reach of a still significantly-weaker-than-average str 6 character. AFAICT the goal here was to keep the mapping trivial and to have that simple mapping span all the way to nonsensical 200lb draw weight bows. I've instead opted to try and place the 30lb draw at the low end of strength but not utterly feeble, and to place the 60 lb draw at a bit over average, and then the very high draw weight bows land in the upper limits of strength.

There's no coherent case for crossbow poundage limits, so these are all set at 8 when the style of crossbow calls for it, and the limit is absent in cases when there is some built-in mechanical advantage.

A somewhat odd issue is that the reload time for various bows was all over the place, I've squashed them all to 30 moves as I have a great deal of trouble justifying a second or more to place an arrow on a string.

Damage mapping

Here's a set of break points for hunting I've been able to find
All arrows weigh 30g / 463 grains

FPS ft-lbs slug-ft-s Game
136 19.01 0.28 Turkeys
153 24 0.315 Whitetails at close range
195 39 0.401 Whitetails
249 63.73 0.512 Elk
278 79.44 0.572 Moose

Describe alternatives you've considered

Compared to the previous PR, I removed the majority of string changes considering that the 0.E release is just around the corner, adjusted the strength requirements, refrained from doubling damage resulting from the kinetic energy analysis, and refrained from adjusting incidental values such as the range stat.

@ZhilkinSerg ZhilkinSerg added <Documentation> Design documents, internal info, guides and help. [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Code: Tests Measurement, self-control, statistics, balancing. Game: Balance Balancing of (existing) in-game features. Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics [Markdown] Markdown issues and PRs labels Jan 20, 2020
@ghost
Copy link

ghost commented Jan 20, 2020

This is not right, if going by base bow numbers as kinetic energy then blunt tip needs to deliver 'bullet equivalent' damage.
Eg. longbow fired arrow should come close to .22 bullet at effective range - when pure energy is considered, but due to it having cutting arrowhead the wounding caused will be vastly greater than that of .22

Also effective difference between flint broadhead and steel or even 'high-tech' one is a little more than marketing trick, at least for soft targets - flint would shatter on even light plate or chain.

as I have a great deal of trouble justifying a second or more to place an arrow on a string.

Different bow constructions have different draw characteristics, for best ballistic that means delivering more force closer to chord, but that is also less ergonomic to the operator - hence some power focused constructions like compound bow tend to take longer to draw than eg. mongol recurve that good archer could supposedly shoot 2-3 times a second.

@Saint-of-Grey
Copy link
Contributor

I wouldn't assume bullets damage the same way arrows do, but easily digested data is a tad difficult to track down. A quick search shows this has been a hotly debated subject between bow hunters and gun hunters for quite some time, with plenty of dickwaving on both sides.

The only real direct comparison I can track down is bored people shooting buckets full of sand or even body armor using both and the arrow has far more penetration power than the bullet in these cases. As it would turn out, this isn't just something you have to wonder about, as someone has written a rather extensive physics paper on the subject of arrow terminal ballistics. Some images I tracked down during this search showed that the ballistic profiles both have a fair amount of depth: (link link link).

@8street
Copy link
Contributor

8street commented Jan 20, 2020

I can also add that in real life arrows have broadhead tips and sport tips. Broadheads have more damage, but sports penetrate much better in my opinion.

Also, the range of all bows is underestimated. The aiming range is much smaller and corresponds to the max game range now. I can shoot at a distance of 100m from my recurve 30 pound bow. But precisely I can shoot only at 20m and smaller (in a target about the size of a man). And I'm an ordinary amateur.

Also, bows with more than 60 pounds do not make sense. Leave it to crossbows. User will not be able to stretch properly such a strong bow. This bow will automatically turn into less strong due to incomplete tension, according to the strength of a user. Or he will not be able to aim properly with him.

Copy link
Contributor

@mlangsdorf mlangsdorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would help if you added more comments defining the bows - overall size, material, draw length if you have them, but delivered arrow energy is probably most important.

I generally recommend raising archery damage from your baseline, since I found SoG's article on arrow terminal ballistics to be fairly persuasive, and that means that high momentum arrows and bolts should do vastly more damage than their low KE would suggest.

@@ -186,7 +186,7 @@ Pawn shop | Anything except milspec weighted towards unusual calibers |
Everywhere else | Predominately 9mm and 223. Always with standard magazine | Often | Sometimes | Ruger 223 mag, M1911 mag

## Ammo stats
The damage (**Dmg**) of ammunition is the square root of a round's muzzle energy in joules (**Energy, J**) rounded to the nearest integer with an arbitrary increase or decrease to account for terminal ballistics. Damage of handloaded ammo is set to 92% (rounded down) of their factory counterparts. A similar system for calculating recoil is planned but not currently being worked on. The figures used to calculate stats and any other relevant information are presented in table below.
The damage (**Dmg**) of ammunition is the square root of a round's muzzle energy in joules (**Energy, J**) rounded to the nearest integer with an arbitrary increase or decrease to account for terminal ballistics. Damage of handloaded ammo is set to 92% (rounded down) of their factory counterparts. A similar system for calculating recoil is planned but not currently being worked on. The figures used to calculate stats and any other relevant information are presented in table below. Bows and arrows use a similar system, but energy is defined in the bow or crossbow, and the arrow provides an adjustment for terminal ballistics with the prop_damage field.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arrow and crossbolt damage should probably get a fair bump (+30-40%) to account for them being high mass, high momentum penetrators that outperform their KE. ie, a 0.40" diameter, 0.1 lb hunting arrow fired from a 52" elm straightbow with a 50 lb pull only has 45J of KE - about the same as a .22 LR round - but has 13 kgm/s of momentum, more than a 0.50 BMG round. We should probably make the amount of the bump explicit here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder for me, I still need to revisit this and outline how it's intended to work now.

"ammo": "bolt",
"weight": "3000 g",
"volume": "1750 ml",
"bashing": 11,
"to_hit": 1,
"ranged_damage": 28,
"ranged_damage": 14,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modern compound crossbows produce around 200 J, but I'd bump this up to 19 to account for bolt's superior momentum. Even then, the best damage you're producing is only 33.

"ammo": "bolt",
"weight": "6803 g",
"volume": "5 L",
"bashing": 20,
"to_hit": -1,
"ranged_damage": 50,
"ranged_damage": 22,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wouldn't be an authentic medieval crossbow, which underperforms its draw weight, but a modernized reproduction with better engineering and delivered energy around 300 J.

Copy link

@yarbelk yarbelk Feb 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reasoning: medieval crossbows had very short draw lengths due to limits in material science and the reasonable danger of 1000lb tensions right next to your face.

which may be relevant to our esteemed survivor cobbling together a xbow from random parts...

"ammo": "bolt",
"weight": "3500 g",
"volume": "1750 ml",
"bashing": 11,
"to_hit": 1,
"ranged_damage": 20,
"ranged_damage": 11,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd put this at 16, for a decent design that delivers 150 J of energy for a base of 12 and the +30% bow/bolt boost.

"ammo": "bolt",
"weight": "2728 g",
"volume": "1500 ml",
"bashing": 11,
"to_hit": 1,
"loudness": 10,
"ranged_damage": 17,
"ranged_damage": 10,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an improvised 60J design. A better design would be easy to make but it's the first crossbow people craft.

"flags": "PRIMITIVE_RANGED_WEAPON",
"skill": "pistol",
"ammo": "bolt",
"weight": "900 g",
"volume": "500 ml",
"bashing": 4,
"ranged_damage": 7,
"ranged_damage": 9,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd bump this to 11, for a 70J pistol crossbow. Yes, that makes it better than the makeshift crossbow but it's a much better design.

"loudness": 16,
"ranged_damage": 20,
"ranged_damage": 12,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An English yew longbow with a 130 lb draw produces around 144 J of energy, for a damage 15 or 16. I'd be okay with being around 18 for a 200J bow with a ridiculous draw.

"reload": 150,
"ranged_damage": 40,
"reload": 30,
"ranged_damage": 16,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd keep this about 4 points about the non-compound greatbow.

"ammo": "arrow",
"weight": "680 g",
"volume": "3500 ml",
"bashing": 10,
"armor_data": { "covers": [ "TORSO" ], "coverage": 5, "material_thickness": 1, "encumbrance": 20 },
"reload_noise_volume": 3,
"loudness": 8,
"ranged_damage": 10,
"ranged_damage": 7,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems ridiculously low for a longbow which should be producing 100+ J, even if not made from yew. Up this to about 13.

@mlangsdorf
Copy link
Contributor

As an aside, I'm extremely dubious about the rapid rate of loosing for Mongol bows. For all bows, kinetic energy of the arrow going out has to be less than the kinetic energy the archer put into bending the bow, and the bow just lets you store KE slowly and release it quickly. The faster you're loosing arrows, the less time you have to slowly store KE and the less advantage the bow gives you over just throwing arrows at people. If you're loosing 3 arrows in 1.5 seconds, they're going to have a lot less KE than the arrow from the guy who loosed a single arrow in 3 seconds.

@kevingranade
Copy link
Member Author

blunt tip needs to deliver 'bullet equivalent' damage.

Blunt tip is not a bullet like tip, it is specifically a very wide tip designed to not penetrate into the target.

A "field point" is a bullet like tip, and unless I missed it, those get the same multiplier as bullets do.

some power focused constructions like compound bow tend to take longer to draw than eg. mongol recurve that good archer could supposedly shoot 2-3 times a second.

As an aside, I'm extremely dubious about the rapid rate of loosing for Mongol bows.

"reload" is not "draw time", it is "time to place the arrow on the string".

It might be illustrative to break down the sequence of events

  1. Open firing menu with bow equipped (no time spent)
  2. Select an arrow to fire (obtain cost for inventory retrieval)
  3. Reload time for bow (the time we're talking about, just placing an arrow in the hand onto the string)
  4. Aim time (varies wildly, from 0 moves to multiple turns)
  5. Firing/release time (I just dropped this in Drop firing times on ranged weapons. #37230 to one second or less, all the way down to .2 sec for an expert archer)

4 almost always dominates total time, when it doesn't you're very unlikely to hit anything.
5 is only interesting in that it might end your turn and give an approaching monster a chance to act before you get another turn.
We're implicitly assuming that "time to draw" is baked into 4 and 5, and I'm quite confident that for the use cases we care about, those are sufficient to cover any draw time.

I can also add that in real life arrows have broadhead tips and sport tips. Broadheads have more damage, but sports penetrate much better in my opinion.

This is already accounted for, different arrows have either a high damage multiplier, or some amount of bonus armor penetration. Ideally this would be some kind of zero sum sliding scale where you can trade damage for penetration and vice versa, but we have it manually specified in the bow and arrow definitions.

Also, the range of all bows is underestimated.

This is out of scope for this issue, but I'll just say that effective range is scaled the same way gun ranges are, edge of visible area is not treated as 60 meters away, more like 500 meters away.

User will not be able to stretch properly such a strong bow.

A typical person will not, but DDA characters are not restricted to typical levels of strength.

I think it would help if you added more comments defining the bows - overall size, material, draw length if you have them, but delivered arrow energy is probably most important.

I'll add the pertinent assumptions from the spreadsheet to the bow and arrow entries as comments.

I found SoG's article on arrow terminal ballistics to be fairly persuasive

UGGGGHHHHH, yea me too, I'll take a look at some figures and see where it pans out.

@kevingranade
Copy link
Member Author

OK I've convinced myself we can switch to a momentum-based model without too much trouble.
Force expended by the bow is fixed.
That force goes into accelerating the bow arms and string and the arrow.
Part of efficiency is the ratio of bow limb mass vs arrow mass. Whichever is heavier gets more force applied to it.
Bow limbs and string are not a simple fixed mass due to rotational inertia, but can be treated as such.

So what we have is:
P. Bow Power (draw weight * some goofy constant * draw length).
Ml. Bow limb mass (not actually mass, but representative of it).
Ma. Arrow mass (this is actually just mass).
Ah. Arrowhead mechanical advantage.

The formula for arrow damage is something like:
D = f( P / Ml ) * g( Ma * Ah )

f(P * Ml) is encoded as bow "ranged_damage".
g(Ma * Ah) is encoded as arrow "prop_damage"

f() is something similar to sqrt() to handle scaling as more power is dumped into the system.
g() is potentially something similar, or it might just be the identity function.

That's all for plugging a bunch of numbers in, at the end of the day we can still just multiply the two terms to get expected damage.

Caveats:
Heavier arrows should have a better efficiency, but also have an accuracy penalty since they're moving slower and have a more curved trajectory. Higher power bows should possibly have an accuracy bonus to account for their higher speed and therefore flatter trajectories.

@kevingranade
Copy link
Member Author

After fiddling around with the formulas a bit, I realized that we can't split out bow limb weight and arrow weight, they are part of the same interrelated evaluation. What we CAN do however is standardize the mass of our arrows to eliminate this discrepancy, and once we factor these pieces back out we can re-add different masses of arrows and different effects on arrow selection.

@ghost
Copy link

ghost commented Jan 21, 2020

As an aside, I'm extremely dubious about the rapid rate of loosing for Mongol bows.

Don't quote me on that, just distinctly remember that bit about about mongol or some other asian recurves when doing my own research once the whole bow debacle started. I'm guessing they counted arrow that was still being drawn as shoot for it to make sense though, since from my practical tests of fast shooting techniques I was unable to quite reproduce even 1.5 releases/s - it was a rather heavy (for me being a novice at least), ~45lbs borrowed recurve though.

@mlangsdorf
Copy link
Contributor

This is one of the reasons I want to know delivered energy of the arrow, because if you know arrow kinetic energy KE, you can do:
KE = 0.5 * m * v^2
v = sqrt( 2 * KE / m )
momentum = m * ( 2 * KE / m )^0.5

and as I have mentioned before, Doug Cole has worked out extremely complicated formulas for determining the KE of the arrow based on the bow design, thickness, length, draw length, and materials. Which basically work out to 45J on the low end to 200-300J on the high end and we can assign numbers that look right and match people's expectations of bow performance without getting into the nitty gritty of bow design.

@kevingranade
Copy link
Member Author

Just an update, I'm still plugging away at this, but some of the momentum numbers are fairly hard to come by, and the stats in the spreadsheet from The Lethal Spring are incoherent (0.3 lb arrows?!?). I actually tried to buy The Lethal Spring, but couldn't get SHG to take any of my payment options.
I'm filling in the numbers, but it's slow going for various reasons.

@kevingranade
Copy link
Member Author

Progress update, obviously I'm still poking at this. I managed to get my copy of deadly spring, and it seems the cribbed stats I was basing things on were critically flawed in that someone transcribed arrow diameter in inches as arrow weight in lbs. Well that's obviously not correct, it's not even off by some factor it's just wrong. Now that I have the real numbers (which I've put in the item definitions as comments) it became MUCH easier to determine momentum and also place those in those comments, so now we have all the bows on a linear scale based on momentum.

The range is 0.2 or so to 0.8 ft-lb-s for "normal" bows, but the "huge compound bow" is at 1.4 and the "Rantz-Gustang" I've modelled as a 1,000 lb draw arbalest with steel arms, which puts it at 4, which is crazy high but not totally unreasonable.

The next step is mapping momentum to damage, here's the plan for that.
Take recommended bow loadouts for hunting various game and build a table of "this bow should be able to take down a X with a good shot, but not Y".
Encode the above table as a unit test that scores good hits on the specified targets with the specified bows and then asserts whether the target is killed or not.
Fiddle with a linear conversion rate that makes the tests pass.
Sanity check the results.
In particular sanity check that the results vs zombies are what we want them to be, because a bow shot that will kill a deer by making it bleed out is not going to work the same on a zombie.

@kevingranade kevingranade added <Bugfix> This is a fix for a bug (or closes open issue) and removed 0.E Content Freeze labels Feb 21, 2020
@kevingranade kevingranade added this to the 0.E milestone Feb 21, 2020
@kevingranade
Copy link
Member Author

Unless I'm missing something all I have left is auditing bow draw weights.

@kevingranade
Copy link
Member Author

This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/so-how-does-the-new-archery-work/19850/37

tests/archery_damage_test.cpp Outdated Show resolved Hide resolved
tests/archery_damage_test.cpp Outdated Show resolved Hide resolved
@I-am-Erk
Copy link
Member

Is there anything left waiting on this before merge?

@kevingranade
Copy link
Member Author

It's ready to go.

@anothersimulacrum
Copy link
Member

There are merge conflicts.

@kevingranade
Copy link
Member Author

Conflicts resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. <Documentation> Design documents, internal info, guides and help. Game: Balance Balancing of (existing) in-game features. [JSON] Changes (can be) made in JSON [Markdown] Markdown issues and PRs Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics
Projects
None yet
Development

Successfully merging this pull request may close these issues.