Wondering where that weapon making guide is?

Ok here is to be more specific. About a month or 2 ago while I was looking through a thread that I don’t remember the name of I came across a link that sort of gave logic to how the to hit ratio for items in the vanilla game was made. For example one part of it the idea was that if an item was designed to kill humans it would start with +4 to hit but if it was unwieldy it then got -2 leading to the items final to hit ratio being +2. I am wondering where that is and if there was also something similar for firearms?

Well, I’m really puzzled what happened. I followed the history of the file and found the final state of it: https://github.com/CleverRaven/Cataclysm-DDA/blob/4bfb67b0eb8db3e8dbb03ad0000e19dad10216e2/doc/GAME_BALANCE.md

But the odd thing is it no longer exists in the repository. It seems that it was deleted at some point with little fanfare, and it’s quite difficult to find deleted files in github’s history.

The file was moved to the developer wiki.

Yep, looks like they moved “to encourage contributions”, but in practice it means they disappeared, I’m reverting that change.

Done, those docs are restored in the source.

Thanks. I was also hoping for something the gave explanations to the choices of base dispersions of firearms?

There isn’t one unfortunately, if you can find a good source for gun accuracy or even just max rages, that’d be super, but I’ve never found anything decent.

So all the guns dispersion was just chosen semi Willy nilly? (Whatever made sense)

What specifically do you need researched? I’m a bit of a gun nut with formal training and can probably track down anything you might need.

Edit: max range on most non-shotguns will reach the reality bubble; the in game ranges are a joke at the moment. Example: .22LR 45 grain ammo has a max range of TWO MILES and effective range of 1.2 miles.

1 Like

Thats why I need numbers, because what we really care about is relative ranges. Most firearms are in reality accurate enough to hit anything in the reality bubble, so if we’re going to have differentiation between gun ranges, we have to scale them to fit the bubble.

As for what numbers I need, ideal would be the best achieved distribution of hits at some range, next best would be best range to hit a target first try with a known size and range to target, and worst but usable is “effective range” or “max range”.

1 Like

For ranged weapons I was more of wondering say why a M4 has 180 base dispersion and a Remington 700 have 90 base dispersion and not 90 and 45?

I’ll research the base data for factory specifications for the guns in the base game and hash out a low end (firearms 1, Marksmanship 1) and high end (firearms 5, Marksmanship 5). You can expect most guns to get a bump in range. Am I correct in the assumption that a tile in game is a 3’x3’ square? That would help with meter conversions.

Edit: I’ll have to do some wizardry on the made up guns. Dust off my physics books and put them to use.
Edit 2: A lot of the guns have conversion kits listed for bullet types other than manufactured specification (and a few that I can’t even find kits for). A gunsmith could probably do it, but if I can’t find the specs for the additional ammo types, I’m dropping them. Additionally if I know what the dispersion was measured in I could give a better idea of bullet displacement and could effectively just update the .json for a pull request and save somebody the time from looking at a spreadsheet and making the changes.

I’d love to have some kind of data on differences between beginner and expert as well, but I’m curious where you’re going to get that, specifically on the low-to-medium end of things.

What I need is a system going forward that we can use to keep this tuned up as we make changes to the game. As such simply updating gun stats directly is pointless, because the entire exercise will need to be repeated any time there’s a major change to the game.
What I really want is to embed the real numbers in either the configuration data or in some tests, and tune the ranged system to make gun performance fit our constraints.

There is no such mapping between squares and real distance, it’s necessarally a compromise in each context where it is considered, so there is one or more scales for map features, another for sight distances, another for movement speed (and yet another for vehicle speed vs walking speed), and one or more for ranged weapons. Furthermore, all of these scales are subject to change relative to each other, and in fact we don’t even keep track of them, as there’s no point to doing so.

Those are a game-ism, most of them aren’t physically possible. I’m not too worried about them.

Dispersion is measured in Minutes of Arc, but again, a one-off adjustment of values isn’t helpful, since we can’t just set dispersion to real values.

Dispersion adjustments. I think at zero → 2 skill should have a positive dispersion with 3 being the base dispersion of the gun, and 5 → 10 decreasing the dispersion by 1 degree down to a minimum based on firearm category.

Hard coding the adjustments would allow for any changes in mechanics to cross all .json files and should affect all mods that add firearms as well. I’m pretty rusty at C++ and having a quick look at the ballistics and firearms code made my eyes cross. I’d think a simple check and modifier at the start of the projectile check would probably be what I would do, but I’d have to get real intimate with the code to make sure that’s really the better option.

Here is the dicey problem with firearm ranges then. Arbitrary values for everything means no realistic way to modify the distance any given gun should operate at. At minimum all guns should have their ranges buffed by at least 2 tiles (bows too), and more in some cases. The RM11B should be hitting 25 to 30 squares on a precisely aimed shot with moderate firearm skills, and that’s basing distance off using the Bus as a general idea of how big a tile is. A school bus is typically 45’ long, and the school bus in game is 11 tiles long. That effectively makes 1 tile at least a 4 foot distance in one direction, but a 1.75 foot distance in another (width of a school bus) If you meet in the middle and argue a 2.5 foot square, then at least you have a number to base viable gun ranges off of. You’re still looking at some redonkulous numbers, I.e. pistols that hit out 30 squares as an effective range, so I understand the need to curb that.

I won’t bother trying to stat them out in a meaningful manner. Using the base dispersion is ultimately going to be easier on that front. Muzzle velocity would really be the next number to crunch (which I have so far for every firearm from 5x50 through .45 so far, going down the file list), I notice a couple of guns have a barrel length entry which absolutely affects muzzle velocity, but I don’t know how the game determines the length of a barrel since a lot of guns are missing the entry,

That takes 90% of the math out of the equation and makes determining dispersion modifiers on skill levels a hell of a lot easier. For some reason my brain was thinking it was in radians for some bizarre reason and I was confused on the numbers I was getting. Engineering brain needs more caffeine I think.

Edit: Ultimately I think dispersion should be calculated at the distance to the target if it isn’t already. A shot 2 tiles away shouldn’t miss regardless of the gun unless a jam occurs, while a shot at 20 tiles should have a large change of missing depending on weapon scopes and skill.

That’s not data…

This is why I was asking for numbers, I’m already really intimate with the ballistics code, so I have that part sorted out, all I’m missing is the data.

Nothing even remotely approximating real-world ranges is possible in the existing game engine, so that’s the best we can do.

Why does it matter how long a shot you can make relative to the length of a bus? I’d buy a tactical argument of some kind like “charging guy with knife vs guy with holstered pistol”, but comparing it to vehicle length is totally irrelevant.

It is, that part is pretty straightforward trig.

druidniam, why are you trying so hard to avoid just posting the data?
"shotgun user of y skill can hit target at X distance reasonably"
or such for a bunch of weapons is the data being looked for.

To add my 2cents;
Finding such data for each and every gun will probably be very difficult.
Modern firearms are already very easy to use compared to bows or javelins.
Most modern standard assault rifles and pistols also don’t really differ that much in the accuracy department.
A modern AR variant doesn’t shoot much straighter than a WWI bolt action rifle, if at all (especially when comparing them at the usual engangement ranges in CDDA).
The real life “dispersion” is so small that you’d have to exaggerate them to take effect in game.
You SHOULD be able to hit a stationary target over several map tiles with a rifle.

I’d give up on searching for individual grouping data and just look at the the most relevant things modern guns differ from another:
caliber
reliability
mag size
ease of maintenance

"shotgun user of y skill can hit target at X distance reasonably"
The problem with this is that you measure a modern marksmen’s skill at absurd ranges (relative to CDDA) and with stationary targets.

yes, but it’s about relativity. if shotguns can shoot X far but rifles can shoot Y far, then we can make X be 5 tiles and Y be 9 tiles, or something.

That’s kicker. I’m not sure what exactly he wants for data. I based an in-game term off real world experience and both going to the range over the years and watching videos from gun nuts who have gotten to play with toys i haven’t (or manufacturers promotional videos.)

The closest real world data i could provide is already effectively covered by how dispersion and the firearns skills work. A tweak to accuracy and a bump to maximum effective ranges are really all that can be done. I just woke up so i’m going to tinker with some values and see whats more viable without becoming full on realistic.

I already said what I want:

When H&K test their weapon accuracy, they mount their guns onto a tightly fixed stand and then see how much dispersion is there from the barrel alone.
I assume other weapon manufacturers do the same but I don’t know if that data is available.
What I do know is that these groupings are VERY tight and the notable inaccuracies stem from the shooter, not the weapon itself (assuming sights and everything are adjusted properly of course).
This means that CDDA guns should generally be extremely accurate already but having no or low weapon/marksmahship skills, moving targets and bad lighting should be what make the guns inaccurate.
When you miss, it’s 99% because of you, not because of the weapon.