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

Add more 9x19mm guns #43015

Merged
merged 11 commits into from
Oct 17, 2020
Merged

Add more 9x19mm guns #43015

merged 11 commits into from
Oct 17, 2020

Conversation

Rail-Runner
Copy link
Contributor

Summary

SUMMARY: Content "Add more 9x19mm guns"

Purpose of change

Adding more variety to obscure guns that can be found.

Describe the solution

Add entries for more 9x19mm guns, their magazines, add them to item groups and Generic Guns migration lists. Also added an item group for extremely rare guns in general (that would be too rare to get even a frequency of 1 in obscure gun lists; )

Describe alternatives you've considered

So as to not add guns that are actually nearly useless, I decided to not add guns which use very rare ammo in addition to being rare themselves.

Testing

Launched the game to make sure that no errors happen; loaded, unloaded and fired newly-added guns to make sure that they behave correctly.

Additional context

Suggestions related to actual probability of guns spawning in item groups are welcome.

@anothersimulacrum anothersimulacrum added the [JSON] Changes (can be) made in JSON label Aug 18, 2020
@tenmillimaster
Copy link
Member

tenmillimaster commented Aug 22, 2020

As of 2017, there were 630,019 civilian transferrable machineguns registered in the united states. Common things on the registry tend to be: Uzi's, Mac 10/11's, Kulsprutepistol m/45's, HK's, Thompsons, Stens, and M4/m16's, some AK's, some m14's, some m1919's.

Full auto broomhandles would be unimaginably rare.
Full auto MP18's are basically unheard of. There are a few, but I doubt there are more than 10 or so.

For references on how to estimate some of the less rare guns, refer to #34666 . @laveyanfiend did good work averaging out the numbers. Try searching through completed listings to get a more stable reference.

I also suggest renaming the mausers to be more inclusive, a name like "Broomhandle Mauser" and "Schnellfeuer" can add some functionally equivalent Astras to the subset of guns you're representing.

Also, one of the guns you have appears to have no folding stock, but is described as such?

@Rail-Runner
Copy link
Contributor Author

Also, one of the guns you have appears to have no folding stock, but is described as such?

Thing is, the folding stock gunmod doesn't seem to work like it should; it reduces volume for some reason, but should probably reduce just length instead (with reduction being individual for every gun). So I decided to assume length to be length of a folded gun, and just give SLOW_WIELD flag to those guns to represent having to unfold the stock before use.

@tenmillimaster
Copy link
Member

tenmillimaster commented Sep 3, 2020

The numbers I gave you were raw gunbroker results, not direct numbers to use in the item groups. You need to either: Adjust the entire group so gunbroker results and each gun are 1:1, or adjust the raw results given so that the results:indices ratios matches gunbroker:indices ratios.

For example: There were 324 Luger P08's given. I just searched for completed makarov pistol listings: 267 listings.
The ratio in game needs to be 324 P08 : 267 Makarovs, roughly 1.2:1.

Therefore you can either multiply every item in guns_pistol_obscure by (GB hits makarov)/(current weight makarov), or 2.67 and then insert your 324 for P08's directly into the distribution...

OR

Insert 121 (the calculated equivalent in game weight, as determined below).
(GB hits P08)/(GB hits makarov) * (current weight makarov)=
324/267*100
121.3

In both cases, the ratio of P08's to makarovs is the same as IRL, about 1.2 : 1. I recommend the former case, as it will make future maintenance of the lists slightly easier as we gradually work through and audit them.

@Rail-Runner
Copy link
Contributor Author

Mostly fixed now, though I didn't have the exact numbers for PPSh-41 or STEN SMGs, to assign spawn frequency to MP 40 based on that.

"weight": "1070 g",
"volume": "615 ml",
"price": 90000,
"pocket_data": [
Copy link
Contributor

Choose a reason for hiding this comment

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

ERROR : src/item_factory.cpp:1437 [void Item_factory::check_definitions() const] warnings for type mauser_c96:

cannot have more than one pocket that handles ammo (MAGAZINE or MAGAZINE_WELL)

],
"flags": [ "RELOAD_ONE" ],
"pocket_data": [
{ "pocket_type": "MAGAZINE", "ammo_restriction": { "9mm": 10 } },
Copy link
Contributor

@Wishbringer Wishbringer Oct 11, 2020

Choose a reason for hiding this comment

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

Suggested change
{ "pocket_type": "MAGAZINE", "ammo_restriction": { "9mm": 10 } },

I think the problem mentioned above is originating from here.

@Rail-Runner
Copy link
Contributor Author

Should be working now.

@ZhilkinSerg ZhilkinSerg merged commit a44ff87 into CleverRaven:master Oct 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants