Skip to content

Commit

Permalink
add ar-15 .22 conversion kit (CleverRaven#75210)
Browse files Browse the repository at this point in the history
* add ar-15 .22 conversion kit

* Update data/json/items/gunmod/conversions.json

* Apply suggestions from code review

Co-authored-by: DoctorBoomstick <[email protected]>

* fix gun not cycling ever

* Update data/json/items/gunmod/conversions.json

* Apply suggestions from code review

Co-authored-by: Holli <[email protected]>

* fix damage modifier, fix documentation also

* Apply suggestions from code review

---------

Co-authored-by: DoctorBoomstick <[email protected]>
Co-authored-by: Holli <[email protected]>
  • Loading branch information
3 people authored Jul 29, 2024
1 parent b6c708d commit 951b8da
Show file tree
Hide file tree
Showing 8 changed files with 112 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@
"subtype": "collection",
"entries": [ { "item": "modular_ar15", "contents-item": "retool_ar15_762" } ]
},
{
"id": "ar15_22",
"type": "item_group",
"subtype": "collection",
"entries": [ { "item": "modular_ar15", "contents-item": "retool_ar15_22" } ]
},
{
"id": "mdrx_223",
"type": "item_group",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,20 @@
"on_overflow": "spill",
"entries": [ { "item": "retool_ar15_762" }, { "item": "762_ar15mag_30rd", "charges": 0 }, { "group": "nested_retool_extras" } ]
},
{
"type": "item_group",
"id": "boxed_22_ar15kit",
"subtype": "collection",
"container-item": "box_retool_large",
"on_overflow": "spill",
"entries": [
{ "item": "retool_ar15_22" },
{
"distribution": [ { "item": "22_ar15mag_10", "charges": 0, "count": 2 }, { "item": "22_ar15mag_28", "charges": 0, "count": 2 } ]
},
{ "group": "nested_retool_extras" }
]
},
{
"type": "item_group",
"id": "boxed_223rem_mdrxkit",
Expand Down Expand Up @@ -310,7 +324,8 @@
{ "group": "boxed_450bushmaster_ar15kit", "prob": 20 },
{ "group": "boxed_450bushmaster_ar15kit_medium", "prob": 15 },
{ "group": "boxed_450bushmaster_ar15kit_short", "prob": 10 },
{ "group": "boxed_762_ar15kit", "prob": 30 }
{ "group": "boxed_762_ar15kit", "prob": 30 },
{ "group": "boxed_22_ar15kit", "prob": 30 }
],
"prob": 100
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,24 @@
{ "group": "on_hand_762" }
]
},
{
"id": "nested_ar15_retool_22",
"type": "item_group",
"//": "this is a distribution for the gun, reasonable number of backup mags, and some ammo to repack",
"//2": "groups together all identical weapons rechambered for the same caliber and converted with different barrel-lengths.",
"subtype": "collection",
"ammo": 100,
"entries": [
{ "group": "ar15_22", "charges": [ 0, -1 ] },
{
"distribution": [
{ "collection": [ { "item": "22_ar15mag_10" }, { "item": "22_ar15mag_10", "prob": 50 } ] },
{ "collection": [ { "item": "22_ar15mag_28" }, { "item": "22_ar15mag_28", "prob": 50 } ] }
]
},
{ "group": "on_hand_22" }
]
},
{
"id": "nested_mdrx_retool_223rem",
"type": "item_group",
Expand Down Expand Up @@ -191,7 +209,8 @@
{ "group": "nested_ar15_retool_300blk", "prob": 20 },
{ "group": "nested_ar15_retool_50beowulf", "prob": 15 },
{ "group": "nested_ar15_retool_450bushmaster", "prob": 15 },
{ "group": "nested_ar15_retool_762", "prob": 25 }
{ "group": "nested_ar15_retool_762", "prob": 25 },
{ "group": "nested_ar15_retool_22", "prob": 15 }
],
"prob": 100
}
Expand Down
32 changes: 32 additions & 0 deletions data/json/items/gunmod/conversions.json
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,38 @@
"min_skills": [ [ "weapon", 2 ] ],
"add_mod": [ [ "brass catcher", 1 ], [ "bayonet lug", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
},
{
"id": "retool_ar15_22",
"type": "GUNMOD",
"name": { "str": ".22 upper receiver" },
"description": "This is a complete upper receiver assembly containing a barrel, handguard, and bolt carrier group that, given the right knowledge, is installable upon an AR-15-style rifle's lower frame. Swappable uppers enable compatible firearms to be retooled for different cartridges and barrel lengths, with this kit furnishing a weapon with a 16-inch barrel chambered for .22 rounds.",
"//": "M4-22 Gen II Upper 22LR/16''BBL",
"variant_type": "gun",
"weight": "2275 g",
"volume": "1696 ml",
"longest_side": "600 mm",
"integral_volume": "1696 ml",
"integral_weight": "2275 g",
"integral_longest_side": "406 mm",
"barrel_length": "406 mm",
"price": "284 USD 53 cent",
"price_postapoc": "5 USD",
"material": [ "steel", "plastic" ],
"symbol": ":",
"color": "dark_gray",
"location": "bore",
"mod_targets": [ "modular_ar15", "modular_m4_carbine", "modular_m16a4", "modular_m16_auto_rifle", "modular_m27_assault_rifle" ],
"install_time": "5 m",
"dispersion_modifier": 15,
"overwrite_min_cycle_recoil": 83,
"//0": "AR has too big recoil for .22 round, 83 is right on the edge of being able to use blackpowder loaded and ratshot",
"ammo_modifier": [ "22" ],
"magazine_adaptor": [ [ "22", [ "22_ar15mag_10", "22_ar15mag_28" ] ] ],
"pocket_mods": [ { "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "22_ar15mag_10", "22_ar15mag_28" ] } ],
"min_skills": [ [ "weapon", 2 ] ],
"damage_modifier": { "damage_type": "bullet", "amount": 2 },
"add_mod": [ [ "brass catcher", 1 ], [ "bayonet lug", 1 ], [ "rail", 2 ], [ "sights", 1 ], [ "underbarrel", 1 ], [ "muzzle", 1 ] ]
},
{
"id": "retool_mdrx_223rem",
"type": "GUNMOD",
Expand Down
33 changes: 33 additions & 0 deletions data/json/items/magazine/22.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,39 @@
"flags": [ "SPEEDLOADER" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "22": 19 } } ]
},
{
"id": "22_ar15mag_10",
"type": "MAGAZINE",
"name": { "str": ".22 10-round conversion magazine" },
"description": "A black, 10-round polymer magazine for AR-platform rifles converted to fire .22 Long Rifle ammunition.",
"weight": "130 g",
"volume": "187 ml",
"longest_side": "110 mm",
"price": "22 USD 99 cent",
"price_postapoc": "50 cent",
"material": [ "plastic" ],
"symbol": "#",
"color": "light_gray",
"ammo_type": [ "22" ],
"flags": [ "MAG_COMPACT" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "22": 10 } } ]
},
{
"id": "22_ar15mag_28",
"type": "MAGAZINE",
"name": { "str": ".22 28-round conversion magazine" },
"description": "A black, 28-round polymer magazine for AR-platform rifles converted to fire .22 Long Rifle ammunition.",
"weight": "220 g",
"volume": "220 ml",
"longest_side": "184 mm",
"price": "23 USD 99 cent",
"price_postapoc": "70 cent",
"material": [ "plastic" ],
"symbol": "#",
"color": "light_gray",
"ammo_type": [ "22" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "22": 28 } } ]
},
{
"id": "mosquitomag",
"looks_like": "glock17_17",
Expand Down
1 change: 1 addition & 0 deletions data/mods/Generic_Guns/gunmods/gg_gunmods_blacklist.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"retool_ar15_450_medium",
"retool_ar15_450_short",
"retool_ar15_762",
"retool_ar15_22",
"retool_mdrx_223rem",
"retool_mdrx_223rem_short",
"retool_mdrx_223rem_medium",
Expand Down
4 changes: 3 additions & 1 deletion data/mods/Generic_Guns/magazines/gg_magazines_migration.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@
"m1carbinebigmag",
"zpap85mag",
"papm77mag",
"papm77mag_10rd"
"papm77mag_10rd",
"22_ar15mag_10",
"22_ar15mag_28"
],
"type": "MIGRATION",
"replace": "rifle_mag"
Expand Down
2 changes: 1 addition & 1 deletion doc/JSON_INFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -4201,7 +4201,7 @@ Gun mods can be defined like this:
"ammo_modifier": [ "57" ], // Optional field which if specified modifies parent gun to use these ammo types
"magazine_adaptor": [ [ "223", [ "stanag30" ] ] ], // Optional field which changes the types of magazines the parent gun accepts
"pocket_mods": [ { "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "ai_338mag", "ai_338mag_10" ] } ], // Optional field, alters the original pockets of the weapon ; share the syntax with pocket_data; pocket type MAGAZINE and MAGAZINE_WELL are always overwritten, pocket type CONTAINER is always added to existing pockets; for MAGAZINE and MAGAZINE_WELL both ammo_modifier and magazine_adaptor fields are required to correctly migrate ammo type; type: TOOLMOD can use this field also
"damage_modifier": -1, // Optional field increasing or decreasing base gun damage
"damage_modifier": { "damage_type": "bullet", "amount": -1 }, // Optional field increasing or decreasing base gun damage
"dispersion_modifier": 15, // Optional field increasing or decreasing base gun dispersion
"loudness_modifier": 4, // Optional field increasing or decreasing base guns loudness
"range_modifier": 2, // Optional field increasing or decreasing base gun range
Expand Down

0 comments on commit 951b8da

Please sign in to comment.