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 AK-47 semi-auto rifle, Mini Draco pistol, AK magazines #39041

Merged
merged 28 commits into from
Apr 14, 2020
Merged

Add AK-47 semi-auto rifle, Mini Draco pistol, AK magazines #39041

merged 28 commits into from
Apr 14, 2020

Conversation

carmakazi
Copy link
Contributor

@carmakazi carmakazi commented Mar 26, 2020

Summary

SUMMARY: Content "Add AK-47 semi-auto rifle, Mini Draco pistol, AK magazines"

Purpose of change

In anticipation of a coming realism pass on ammunition spawns, it is found that 7.62x39mm is currently a bit underrepresented in the game, as it is a fairly common sight in real life, though not as common as 5.56. However, right now, the only civilian-legal, and therefore reasonably common, 7.62x39 rifle in the game is the SKS. AK-variant rifles see a decent amount of popularity among American civilian shooters (though again, not as much as the AR-15), and so I believe these guns would be a good fit in the game.

Describe the solution

While there are many civilian AK pattern rifles available, the ones in this PR were chosen for the following reasons:

  1. The WASR-10 has been available on the US market for some time, lending some to its availability.
  2. The WASR-10 is reasonably priced, lending some to its availability.
  3. The WASR-10 has at least a decent build quality, avoiding the quirks and issues of some other models currently available.
  4. The WASR-10 has a distinct and concise name, in order to help players unfamiliar with guns differentiate it from an AK-47 assault rifle.
  5. The Century Arms Draco pistol has the first two points going for it, but perhaps the build quality may be lacking a bit, and the lower durability and lack of the NEVER_JAMS flag reflects that. Despite that, it is still a colloquially recognized and acquired weapon, even if for the wrong reasons sometimes.

As of this posting, the WASR-10 is a mid-low common drop, while the Draco is mid-low rare. You may notice that the WASR is currently higher on the loot totem pole than the AR-15; I believe that's because the AR-15 is significantly underrepresented currently, but changing that falls outside the purview of this PR.

EDIT 4/01/2020: WASR-10 has been changed to generic AK-47 semi auto, and several new magazines have been added, including a 10, 20, and 75 round drum magazine.

Describe alternatives you've considered

Not adding it.

Testing

Test game loads with no issues, guns spawn into inventory and function as intended.

Additional

Please add 0.E content freeze and other appropriate tags.

@anothersimulacrum
Copy link
Member

Be sure to update generic guns for these weapons!

@carmakazi
Copy link
Contributor Author

Be sure to update generic guns for these weapons!

I filed the WASR under the sporter rifle, and the Draco under the automagnum pistol, since there isn't a comparable pistol in the mod. It's rare enough I don't think it should be a problem.

@anothersimulacrum
Copy link
Member

anothersimulacrum commented Mar 27, 2020

since there isn't a comparable pistol in the mod

You can see what #37768 did, because that also added a rifle round pistol.
You could looking into adding some sort of rifle round pistol for these cases.
Or just leave what you have.

@carmakazi
Copy link
Contributor Author

That PR seems to also put the AR pistols under the sporter carbine. It should work most of the time, but I wanted to avoid possible strange situations that would be caused by crossing gun types i.e. a rifle appearing where a pistol should be. It's probably 12 one way, a dozen the other honestly, so I'm inclined to leave it be.

I wouldn't mind adding a GG analogue, but I think that'd be better left to the mod maintainer(s). Not sure they'd even want it since these guns are such odd ducklings.

@Cyrano7 Cyrano7 added 0.E Content Freeze [JSON] Changes (can be) made in JSON labels Mar 27, 2020
data/json/items/gun/762.json Outdated Show resolved Hide resolved
data/json/items/gun/762.json Outdated Show resolved Hide resolved
data/json/items/gun/762.json Outdated Show resolved Hide resolved
data/json/items/gun/762.json Outdated Show resolved Hide resolved
data/json/items/gun/762.json Outdated Show resolved Hide resolved
data/json/items/gun/762.json Outdated Show resolved Hide resolved
@carmakazi
Copy link
Contributor Author

I updated the stats based on your recommendations. As for the mod slots, I changed the rail and underbarrel to require mounts (because no modular handguard), sights (because most optics would require an AK side rail adapter or other option, abstracted for game), and the Draco now requires a mount for a stock, as it has no provisions for a stock of any kind without an adapter or rear trunnion swap. Since collapsing/folding stocks exist for AK type rifles and mods are generalized currently, I left the stock option open for the WASR.

@tenmillimaster
Copy link
Member

I believe referring to the semiauto AK as the WASR isn't the right choice. Nearly every firearms retailer markets their AK's under 'AK', or 'AK-47' names (with manufacturer or models appended), despite that being incorrect. The WASR should just be renamed 'AK', or 'AK-47'. The description can make it clear that it's a semiautomatic AKM clone of some flavor.

@carmakazi
Copy link
Contributor Author

I believe referring to the semiauto AK as the WASR isn't the right choice. Nearly every firearms retailer markets their AK's under 'AK', or 'AK-47' names (with manufacturer or models appended), despite that being incorrect. The WASR should just be renamed 'AK', or 'AK-47'. The description can make it clear that it's a semiautomatic AKM clone of some flavor.

I'm not wholly on board, but I can understand wanting to generalize all the civilian AK models under one item like the AR-15 is and not have to split hairs over different models. I'll make the change.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Need to make all wasr10 IDs the new ID.

data/json/itemgroups/Weapons_Mods_Ammo/guns.json Outdated Show resolved Hide resolved
data/json/itemgroups/Weapons_Mods_Ammo/guns.json Outdated Show resolved Hide resolved
data/json/itemgroups/Weapons_Mods_Ammo/guns.json Outdated Show resolved Hide resolved
data/mods/Generic_Guns/firearms/gg_firearms_migration.json Outdated Show resolved Hide resolved
@carmakazi
Copy link
Contributor Author

In the spirit of #39156 I am looking at adding some AK magazines as well, including auditing the specs of the current ones. Hold on merging.

@carmakazi carmakazi changed the title Add WASR-10 rifle, Mini Draco pistol Add AK-47 semi-auto rifle, Mini Draco pistol, AK magazines Apr 2, 2020
Add 10, 20, and 75 round AK magazines.
Change IDs of existing AK magazines to match.
Audit existing AK magazine specs.

https://www.centuryarms.com/maak78a.html
AK drum mag specs
-Weight = 2.25 lbs empty = 1021g
-Volume = pi r^2 h = 63.617 in^3 = 1.042 L, + 100ml to account for feed lips
-Price = copied from link $120

https://www.lightfighter.net/topic/article-dimensions-magazines-and-other-items
-AK 30 round volume

https://www.reddit.com/r/ak47/comments/3tf05z/762x39_ak_magazine_weight_reference/
-AK 30 and 20-round weight

AK 20 round found listed at 7 inch height, recalculate volume to 17.5 in^3.  Use % deviation from 30 rounder to extrapolate 10 and 40 round volume.  Reduce/increase weight by 30% from 30 round magazine for every 10 rounds lost or gained.  (was within 3 grams between the found 30 and 20 rounder weight.)

https://www.centuryarms.com/maak78a.html
AK drum mag specs
-Weight = 2.25 lbs empty = 1021g
-Volume = pi r^2 h = 63.617 in^3 = 1.042 L, + 100ml to account for feed lips
-Price = copied from link $120

https://www.lightfighter.net/topic/article-dimensions-magazines-and-other-items
-AK 30 round volume

https://www.reddit.com/r/ak47/comments/3tf05z/762x39_ak_magazine_weight_reference/
-AK 30 and 20-round weight

AK 20 round found listed at 7 inch height, recalculate volume to 17.5 in^3.  Use % deviation from 30 rounder to extrapolate 10 and 40 round volume.  Reduce/increase weight by 30% from 30 round magazine for every 10 rounds lost or gained.  (was within 3 grams between the found 30 and 20 rounder weight.)
Minor: remove NEVER_JAMS flag from AKs, audit AKM specs.
data/json/items/gun/762.json Outdated Show resolved Hide resolved
data/json/items/gun/762.json Outdated Show resolved Hide resolved
data/json/items/gun/762.json Outdated Show resolved Hide resolved
data/json/items/obsolete.json Outdated Show resolved Hide resolved
data/json/items/obsolete.json Outdated Show resolved Hide resolved
@tenmillimaster
Copy link
Member

tenmillimaster commented Apr 2, 2020

The draco will need a damage penalty.
Edit: I gave you the wrong image.

image

carmakazi and others added 4 commits April 3, 2020 13:10
Co-Authored-By: LaVeyanFiend <[email protected]>
-Revised AK-47 description
-Remove barrel_length from AKs
-Add -5 damage penalty to Draco
@tenmillimaster tenmillimaster added Items: Magazines Ammo holding items and objects. Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics labels Apr 7, 2020
Copy link
Member

@tenmillimaster tenmillimaster left a comment

Choose a reason for hiding this comment

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

Seems fine now. Item spawn weights would benefit from comparing against gunbroker though.

@ZhilkinSerg
Copy link
Contributor

Please test your changes in-game and resolve following issues:

src/item_factory.cpp:1368 [const itype *Item_factory::find_template(const itype_id &) const] Missing item definition: akmbigmag

02:48:43.082 ERROR : src/item_factory.cpp:1368 [const itype *Item_factory::find_template(const itype_id &) const] Missing item definition: akmmag

02:48:43.083 ERROR : src/item_factory.cpp:1324 [void Item_factory::check_definitions() const] warnings for type cw-24hack:

magazine "akmbigmag" specified for "762" is not a magazine

magazine "akmmag" specified for "762" is not a magazine

02:48:43.083 ERROR : src/item_factory.cpp:1324 [void Item_factory::check_definitions() const] warnings for type cw-24:

magazine "akmbigmag" specified for "762" is not a magazine

magazine "akmmag" specified for "762" is not a magazine

02:48:43.083 ERROR : src/item_factory.cpp:1324 [void Item_factory::check_definitions() const] warnings for type svs-24c:

magazine "akmbigmag" specified for "762" is not a magazine

magazine "akmmag" specified for "762" is not a magazine

02:48:43.083 ERROR : src/item_factory.cpp:1324 [void Item_factory::check_definitions() const] warnings for type svs-24:

magazine "akmbigmag" specified for "762" is not a magazine

magazine "akmmag" specified for "762" is not a magazine

02:48:43.092 ERROR : src/item_factory.cpp:1324 [void Item_factory::check_definitions() const] warnings for type cw-24k:

magazine "akmbigmag" specified for "762" is not a magazine

magazine "akmmag" specified for "762" is not a magazine

02:48:43.128 ERROR : src/item_factory.cpp:1324 [void Item_factory::check_definitions() const] warnings for type cw-24m_hack:

magazine "akmbigmag" specified for "762" is not a magazine

magazine "akmmag" specified for "762" is not a magazine

02:48:43.128 ERROR : src/item_factory.cpp:1324 [void Item_factory::check_definitions() const] warnings for type cw-24m:

magazine "akmbigmag" specified for "762" is not a magazine

magazine "akmmag" specified for "762" is not a magazine

@carmakazi
Copy link
Contributor Author

Please test your changes in-game and resolve following issues:

Twas an issue with Expanded Weapons still using the old AK mags. Should be fine now, or the Travis build passed anyway.

@ZhilkinSerg ZhilkinSerg merged commit f40ad4c into CleverRaven:master Apr 14, 2020
@carmakazi carmakazi deleted the carmakazi_addgun2 branch April 16, 2020 15:04
@ghost ghost mentioned this pull request May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Items: Magazines Ammo holding items and objects. [JSON] Changes (can be) made in JSON Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants