-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Lack of a consistent guideline for ranged weapon damage #26183
Comments
I've updated the spreadsheet after much rigorous testing that mainly consisted of plotting data points all over Desmos. The example formula now works well for even edge cases, so long as the Damage Type/Terminal Ballistics (DT) multiplier is properly accounted for. Due to the basing of the formula off of the pre-existing gun balance, the end results are not far off from the current game values in most cases. Any drastically different values I've found have indicated something wrong with either the gun or projectile itself, such as the incredibly heavy arrows of CDDA. (A Metal Bodkin is 925.942 grain. Assuming best case scenario aka. the bow we're using has a very high draw weight of 80lb we're still at a ratio of 11.5 grains per pound of draw force. Well above the 8 grain per pound rule of thumb for what makes a heavy arrow for a bow.) Due to this, I believe the current example formula, with some tweaking, has potential use as either a base or the entirety of the new formula for ranged damage. I've also included a calculator on the first sheet so that the formula can be easily tested with any set of projectile kinetic energy and DT combination. Spreadsheet Link |
Two requests:
|
Table creation is progressing very slowly due to personal busy work, and the sheer amount of manual input my current method requires. for the next bit. If anyone wants to help or has any ideas for expediting the process, I'd much appreciate it! |
a Python script to read the guns and ammo json files and output the various combinations in a csv file would be pretty simple. Do you just want damage and ap values? I could add that to my todo list for the week if you would like. |
If you could do that, it'd be wonderful Undying. For guns damage and AP values are what I'm looking for, and the damage, AP, and weight for the ammos. No idea how the combinations would be automated, but if that's also possible it would be a super time saver for me |
I was thinking of generating tables like:
make two of them, 1 for damage and one for ap. How dose ammo weight get factored in? |
Ammo weight would be a separate list from the damage/AP differences. Having both current and under formula ammo weights is important as without noting a change in ammo weight, some of the new formula's outputs are a bit crazy. I think I noted the arrows above, and they're a good example. With current CDDA arrow weight the bow damage would be very, very low compared to a more sane arrow weight. Though, using my current knowledge of notepad++ search function I can fairly easily extract all the ammo weights I need, so if making a separate list for the weights is an issue at all I can get that bit done |
Loading the json is ~85% of the complexity but from there, outputting extra info is trivial. I'll make it output the name, id, weight, dmg and ap. |
So, loading in stuff has proven to be more involved than I was expecting. (It's not hard there is just a lot of different cases to handle -> lot more code -> it's going to take a bit longer) Here is what it's currently outputting with the following shortcuts in place:
|
Forgot how easy it was to skip errors loop iterations so here now with mods: btw I was originally going to have it tell you which mod it came from but I got lazy and decided to have it just distinguish between base and mods |
You're a life saver undying, thanks a ton for the gun data. The extra w/ and w/o mods is icing on this data filled cake! I'll get to work running all the values through soon and post the table link here when done! |
I'm almost done with the inheritance handling which will add a lot (ammo in particular uses it a lot) but I figured that would get you started. I don't plan on making the script handle integrated mods though since the complexity of doing so and their numbers would make it easier to do by hand. Anyways this has been a good exercise let me know if there are any tweaks/filters you would like. |
Btw, your analysis scripts might be something we'd want to drop into the
tools directory
|
@kevingranade I was thinking about asking if it would be of interest. Right now it's fairly specialized in order to reduce the work but theoretically, it shouldn't be that much work to generalize it into a generic json loader + factory for use in whatever. |
Get your new and improved Gun vs. Ammo tabel 2.0 now with ammo inheritance: |
Took @Theundyingcode's data and put it into a semi-nicely formatted spreadsheet. kevin, theundyingcode, poragon - just ping me and I'll give you edit access. I don't think all of the weapons and ammo variants are getting handled correctly, because this is the 9mm data:
There should be more guns and more ammo variants. Crossbow data looks right:
So I don't think it's an issue with my spreadsheet (could be, but don't think so). There's only 184 weapon entries in the original sheet and these seems much too low. |
Haven't gotten around to handling inheritance for guns yet just ammo. (They are currently getting ignored) The whole item factory bit was a lot more than I was initially expecting so I have been adding a bit at a time. The only thing left is to process the deferred guns so one more push. YAY MOTIVATION (-.-)..zzzZZZZ |
2 similar comments
Haven't gotten around to handling inheritance for guns yet just ammo. (They are currently getting ignored) The whole item factory bit was a lot more than I was initially expecting so I have been adding a bit at a time. The only thing left is to process the deferred guns so one more push. YAY MOTIVATION (-.-)..zzzZZZZ |
Haven't gotten around to handling inheritance for guns yet just ammo. (They are currently getting ignored) The whole item factory bit was a lot more than I was initially expecting so I have been adding a bit at a time. The only thing left is to process the deferred guns so one more push. YAY MOTIVATION (-.-)..zzzZZZZ |
Yeah, I noticed few missing guns such as the coilgun and shotgun varieties. Was working on a good format for display the value differences but your sheet is much better Langsdorf lol. I'll go ahead and make a copy of it and focus on the work of figuring out the speed of these projectiles, thank a lot for the help! |
Let's not duplicate effort. @Poragon, I can give you access to the sheet and you can make your changes there. @Theundyingcode, sorry, I read your announcement as saying you had everything and thought I was being helpful by pointing out the missing stuff. Take your time, just either feed me the results when you're done or request access to the sheet so you can update it yourself. |
Sorry I kept you waiting an extra 2 days for literally less than 10 min of work but here is tabel 3.0 now supporting gun inheritance: |
9mm guns, highlighting inheritancedata/json/items/gun/9mm.json:3: "id": "briefcase_smg", 9mm guns in the spreadsheet
There should be 16 entries, but there are 10, with 5 duplicates. Also, there are 8 variants of 9mm ammo, but 9mm JHP is showing up twice and no other variants is showing up at all. |
I'll take another look |
So the problem is that I never thought i needed to support inheritance for the abstracts so out of the entire also, ksub2000, l_sp_9mm and, uzi will not get added by design since they have internal mods and I decided the complexity of including mods would make it easier to just add them by hand. I'll look at see about adding a list of skipped guns. |
Was lookin' through the bow section of the comparison sheet @mlangsdorf and it seems the bow damage values are all mussed up? Not quite sure how the values are being drawn from the raw data sheet, but there's some pretty noticeable differences between the two (eg. compound bow w/ firehardended is 22 dmg on raw but 40 on Weapon Data/Sorted Weapon Data) Edit: Seems to be with all damage values. Weapon damage being added twice? |
Yeah, weapon damage was being added twice. Hammered that out and cleaned out some other bugs. @Theundyingcode: the only guns where the built in mods should matter for damage calculation are the l_lmg_223 (integral long barrel) and the rm11b_sniper_rifle (integral suppressor). The folding stocks on the uzi and ksub2000 shouldn't matter for the damage analysis. |
Debugging a script with a whole bunch of specific case shortcuts is a nightmare so I scrapped it and wrote a new general purpose one. It was pretty quick to write since I know what i'm doing now and I left out the item factory and just stuck to nested dictionaries. Notes:
|
The body is really good at absorbing blunt impacts to basically anywhere but the head and joints (If they can't fold in the direction of impact). Unless the come from a MLB pitcher or a superhuman, a normal person can take a hit from a thrown blunt object with little more than a bruise so long as it doesn't hit in a bad place. (throw stones at people to chase them out not kill them) That said, your average person would probably be able to knock you out with a good hit to the head. Bassically, really low on the damage scale but headshots/crits dealing damage more inline with everything else? |
Lower on the damage was what I was thinkin' too, just means that there will have to be a few ranges for the terminal ballistics factor to take place in. Things more wound channel focused than FMJ round will be more efficient for the KE to DMG conversion, things slightly more cavitation/shock focused than FMJ rounds will also be more efficient for KE to DMG, and things that start shifting to pure shock will be less efficient than FMJ rounds for KE to DMG. |
here is the large table with your requested changes @mlangsdorf: I made the format: |
Thanks! BTW, you're not handling weapons with multiple ammo types correctly, like the .410 shotguns. I fixed it up by hand but you may want to look at it. Okay, we've got the data. Now what? |
I didn't know there were guns that used multiple ammo types... |
Now that we got the base game data all sorted and nicely displayed thanks to Undyingcode and mlangsdorf, It's just a matter of creating a sheet that will display the same stuff, but with values that the formula has created. The main work from here on out will be getting the kenetic energy for each ranged weapon, that'll require a bit of research but shouldn't be too terrible since there's some fairly lenient ranges for most projectiles. It'll be easy for guns, since damage for them is derived from their kinetic energy in the first place, and they serve as the base for the whole formula so their damage shouldn't change if it was correct in the first place, just the AP values. I'll begin work on @mlangsdorf 's spreadsheet and include a new sheet with a few examples of how listing a weapons kinetic energy can be achieved via showing a real world comparison. Once we get all the weapons listed out I can just copy the sorted weapon data sheet and set a formula that looks at the weapons kinetic energy sheet to find the values and we'll have a nice way to see the entire set of results of the formula. |
Did a quick google search for firearm muzzle energy, lots of sites like this: |
Yep, CDDA actually already bases firearm damage around KE, with sqrt(KE) being the damage of the bullet in question. Actually serves as the beginning point of the current iteration of the damage curve, with everything balanced around how guns are balanced effectively. The firearm listings will really just be to double check on things to ensure that no guns have strayed from the current balance (eg. mrlangsdorf mentioned the .50 cal pistol doing more than the rifle, which it should not). The difficult bit is going to be non-bullet weapons such as bows, crossbow, ect. They have much more complex means of figuring out the KE for a given bow/projectile combo. I'm currently looking around for an easy way to figure out crossbow values, I already found a bow calculator here but there still remains an issue of figuring out what exactly the various draw lengths/weights are for all the different bows in CDDA. Not quite sure as to how to go about that, as I dunno if the design of the bows actually had any real consistent design or was just eyeballed. Have to dig through some pull requests and maybe find out the thinking behind each one. |
To a first pass, bow/crossbow KE should be the same as bullet KE: 1/2 mv^2. It's going to be harder to get good m and v values for crossbows and arrows, but the basic logic should be the same. |
Yeah, looking into it seems that the draw length differences are the only big thing that will need to be accounted for between crossbow/bows, so any online arrow calculator should work for both. Only thing that remains is figuring out all the bow variants. I've no idea how fast the 'self bow' shoots an arrow, google spits out a pretty wide range for those sorts of bows. Should we adopt a tier system where there's a percentage increase in KE output per tier, w/ a real life bow analogue (eg. compound bow, we already got stats for that) as the base? Or should we try to match up what each of these bows to their closest real life analogue? Second one has been proving sorta tough given only the info the game gives on the bows. |
Closest real-world analogue and interpolated the rest. |
Gotcha, I'll begin the construction of the actual kenetic energy sheet on mrlangdorf's doc. |
Your gif was great for morale Undying, it's helpful all of its own. The selfbow is a perfect example of this. A self bow or simple bow is a bow made from a single piece of wood. Extra material such as horn nocks on the ends, or built-up handles, would normally be accepted as part of a self bow. The materials used for crafting match up here, but the issue comes that absolutely nothing that would really help define the kenetic energy (KE) of a bow has been given from this. The KE of an arrow leaving the bow is determined by the potential energy (PE) stored in the bow prior to release which can be calculated as shown here; The x on the image is referred to as the draw length of a bow, and the F the draw weight. At the absolute bear minimum, we require these two bits of information (along with an efficiency ratio of PE:KE as thermodynamics demands as such as its a very important bit) to get the KE of the arrow, the goal of all this. As stated before, the bow description gives us none of this so I tried to find a real world analogue. Issue is it turns out you can make a very wide combination of efficiency, draw length, and draw weight on a bow defined as 'a single piece of wood.' Draw length is dependent on height and bow intent, so even assuming everyone in CDDA is the exact same height as the average american (169.55cm) you still can't make a good estimate as you could make a selfbow to mimic a longbow or a short bow. Draw weight is a similar story with ranges (that you'd likely put into common use) being from 50-70lb. Efficiency depends entirely on the material, bow type, and the skill used in creation, which thankfully we do have. Issue is, there's no stats I can find for "the efficiency of a selfbow made by an amateur" because that's a massive range of sizes and materials, and getting anymore specific turns out no results. To top it all off, talking with the resident bow expert Darktoes revealed that the selfbow described in CDDA isn't even an actual selfbow. TL;DR: Way back someone made the first bow, they slapped a random name that made no sense on it, threw a damage value that also made no consistent sense on it, totally forgot to mention any relevant things about it in its description and ever since then all bows have been balanced based off only each other. I can't move them from their weird 'bow world' of balance without clarifying exactly what they are which would heavily alter them and I'm concerned that falls under its own issue entirely. I need a bow-physicist adult ;-; |
I have been doing more work on my script in order to make it load all cdda's json and ended up adding a few more debug messages one bit of which is relevant:
The script assumes that everything should default to 0 so if it can't find the value it's supposed to modify, it pretends it was 0. (relative results in setting it to the relative value and proportional set it to 0) Let me know if this is incorrect behavior. |
After a discussion on discord and staring at bow/crossbow values more, I'm just going to go ahead and make the best real life comparison and try to factor in the crafting skill requirement as an indicator of where the KE should be. It does mean that the comparison sheet isn't really correct for bows/crossbows. We're now comparing CDDA bows/crossbows to CDDA bow/crossbows, re-imagined for clarity then put through the formula. |
I really don't think there's a better way to go about it. Like I mentioned on Discord (restating for others), guns are easy to determine because they have specific models and bullet types that have specific values, and, for the most part, the game uses those specific models and types. Bows and crossbows have been around for thousands of years and there is a LOT of variation within them. The best we can do is try to pick sensible parameters for our test cases and use what data we can find. So long as we get things roughly standardised, I'm happy to be responsible for tweaking them to roughly realistic and balanced values. |
I think we should be documenting our references, preferably in the JSON and again in doc/ . |
A centralized place to put sources would be nice, not quite sure where in the .json we could throw it given that just bow stuff has about 10~ links between discussion and spreadsheet that are relevant to the balance. In the documentation would be easy and agreeable though, I've already set down most my sources either in the spreadsheet or here linked so it's a simple move to put them in some document. Also, aside from pneumatic weapons which are shaping up to be another bow and thus will be overly generalized until a done over of 'em takes place, the majority of the research work for all the weapons has been done. Spreadsheet is mainly just throwing in numbers now and should be useful for comparisons across a variety of weapon/projectile types shortly. |
The dreaded issue of TB >1 being an exclusively uphill range has been solved by making it split into another range and I still kept the two equation solution. With this final edit to solve the broadhead/bodkin issue highlighted when doing the comparison sheet the formula should every case of a projectile! Now it really is just taking it and applying it to every item which is still the meaty work, but the equation(s) themselves being all-inclusive is a very good milestone. |
Brought AP curve in line with DMG curve's range. No formulas on DMG side were changed, just the range of 'em. AP curve was tweaked slightly on the blunt end because I at some point forgot to use -0.3 instead of -0.5. Should be much easier to see the process now. Also OP updated with new desmos links Edit: AP Curve/calculations still got some weird quirks. They weren't the focus of the issue and more of a concept on the side but be wary anyone using them, it really likes making hollow points more appealing than FMJ |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered. |
@laveyanfiend I saw that you mentioned changes to bullet damage based on barrel length in discord. Does that mean this issue should be closed or is this left open for historical reference? |
Stale for years now, still useful for reference but it's clearly not proceeding. |
Cataclysm currently lacks a consistent guideline for ranged weapons as a whole. While we have the guideline for bullets/guns which does a wonderful job and is outline near the bottom of this document
this cannot apply to all projectiles due to differences in terminal ballistics.
Ideally a formula needs to be created for all ranged weapons to follow that accounts for terminal ballistics in either an abstract or detailed way to ensure consistency across ranged weapons.
I've set up a very basic example solution which takes the in game bullets and bullet formula as a base and accounts for terminal ballistics as an end multiplier of damage, with damage increasing as the projectile's lethal nature is more based on wound channels.
The numbers and sources behind the example solution can be found in this spreadsheet, and an interactive bit to serve as a quick test of the multiplier on a few of CDDA's weapons can be found on this graph.
I've personally very little experience in terminal ballistics so it's difficult for myself to create a way to abstract them accurately. Any feedback as to other options and alternate solutions would be vastly appreciated!
The text was updated successfully, but these errors were encountered: