Skip to content

Commit

Permalink
Civilianize G36 (#75154)
Browse files Browse the repository at this point in the history
* add sl8

* remove g36

* more g36 removal

* proper to-hit

* Adjust item tests

* add sl8 to itemgroups

* Update guns_by_calibre.json

* Add DDotD blacklist

* More descriptive description

* add space

* Add magazine spawn

* Update data/json/items/gun/223.json

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

---------

Co-authored-by: Tonkatsu <[email protected]>
  • Loading branch information
Holli-Git and tenmillimaster authored Jul 22, 2024
1 parent 13a1a5f commit 28fe361
Show file tree
Hide file tree
Showing 14 changed files with 81 additions and 143 deletions.
31 changes: 0 additions & 31 deletions data/json/itemgroups/Weapons_Mods_Ammo/arsenal/police_armory.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
{ "group": "police_armory_mini14", "prob": 5 },
{ "group": "police_armory_m1a", "prob": 5 },
{ "group": "police_armory_aug", "prob": 1 },
{ "group": "police_armory_g36", "prob": 1 },
{ "group": "police_armory_hk417", "prob": 1 }
]
},
Expand Down Expand Up @@ -1338,22 +1337,6 @@
{ "group": "police_armory_boxes_556_mk318" }
]
},
{
"type": "item_group",
"id": "police_armory_g36",
"//": "One or more G36 rifles, empty mags, full mags, 223 remington training ammo and mk318-type duty ammo.",
"subtype": "collection",
"entries": [
{ "item": "hk_g36", "contents-item": "holo_sight" },
{ "item": "hk_g36", "contents-item": "holo_sight", "prob": 50 },
{ "item": "hk_g36", "contents-item": "holo_sight", "prob": 25 },
{ "item": "g36mag_30rd", "count": [ 1, 7 ] },
{ "group": "police_armory_full_g36mag_223", "count": [ 1, 3 ] },
{ "group": "police_armory_full_g36mag_556_mk318", "count": [ 1, 2 ] },
{ "group": "police_armory_boxes_223" },
{ "group": "police_armory_boxes_556_mk318" }
]
},
{
"type": "item_group",
"id": "police_armory_hk417",
Expand Down Expand Up @@ -1428,20 +1411,6 @@
"container-item": "augmag_30rd",
"entries": [ { "item": "556_mk318", "charges": 30 } ]
},
{
"id": "police_armory_full_g36mag_223",
"type": "item_group",
"subtype": "collection",
"container-item": "g36mag_30rd",
"entries": [ { "item": "223", "charges": 30 } ]
},
{
"id": "police_armory_full_g36mag_556_mk318",
"type": "item_group",
"subtype": "collection",
"container-item": "g36mag_30rd",
"entries": [ { "item": "556_mk318", "charges": 30 } ]
},
{
"id": "police_armory_full_hk417mag_308",
"type": "item_group",
Expand Down
31 changes: 0 additions & 31 deletions data/json/itemgroups/Weapons_Mods_Ammo/field_drops.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,37 +114,6 @@
}
]
},
{
"id": "field_g36",
"type": "item_group",
"//": "this is a distribution for ammo and magazines an active combatant would have immediately on hand. Most should be expended.",
"//2": "usually takes the form of 100% chance for first mag, 70% for second, 50% for third with reducing chances of them being mostly expended.",
"//3": "this group is for G36 rifles",
"subtype": "collection",
"entries": [
{
"distribution": [
{ "item": "g36mag_30rd", "ammo-item": "556_mk318", "charges": 30, "prob": 50 },
{ "item": "g36mag_30rd", "ammo-item": "556_mk318", "charges": [ 0, 5 ], "prob": 50 }
],
"prob": 100
},
{
"distribution": [
{ "item": "g36mag_30rd", "ammo-item": "556_mk318", "charges": 30, "prob": 30 },
{ "item": "g36mag_30rd", "ammo-item": "556_mk318", "charges": [ 0, 5 ], "prob": 70 }
],
"prob": 70
},
{
"distribution": [
{ "item": "g36mag_30rd", "ammo-item": "556_mk318", "charges": 30, "prob": 30 },
{ "item": "g36mag_30rd", "ammo-item": "556_mk318", "charges": [ 0, 5 ], "prob": 70 }
],
"prob": 50
}
]
},
{
"id": "field_steyraug",
"type": "item_group",
Expand Down
26 changes: 2 additions & 24 deletions data/json/itemgroups/Weapons_Mods_Ammo/guns.json
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@
{ "group": "nested_rifle_flintlock", "prob": 180 },
{ "group": "nested_steyr_aug", "prob": 40 },
{ "group": "nested_win70_458", "prob": 60 },
{ "group": "nested_sl8", "prob": 10 },
{ "group": "nested_arx160", "prob": 40 },
{ "group": "nested_psl", "prob": 10 },
{ "group": "nested_iwi_tavor_x95_300blk", "prob": 10 },
Expand All @@ -457,9 +458,9 @@
{ "item": "type99_sniper", "contents-item": "arisaka_monopod", "prob": 2, "charges": 0 },
{ "item": "m60_semi", "prob": 5 },
{ "item": "steyr_aug", "prob": 5 },
{ "group": "nested_sl8", "prob": 2 },
{ "item": "fn_fal_semi", "variant": "fal_dsa", "prob": 40 },
{ "item": "hk_g3", "prob": 40 },
{ "item": "hk_g36", "prob": 30 },
{ "item": "m1918", "prob": 30 },
{ "item": "modular_m4_carbine", "variant": "modular_m4a1", "prob": 45 },
{ "item": "m14ebr", "prob": 15 },
Expand Down Expand Up @@ -881,13 +882,6 @@
"contents-item": "shoulder_strap",
"prob": 1
},
{
"item": "hk_g36",
"ammo-item": "556_mk318",
"charges": [ 0, 30 ],
"contents-item": "shoulder_strap",
"prob": 1
},
{
"item": "benelli_tsa",
"variant": "mossberg_500_security",
Expand Down Expand Up @@ -956,7 +950,6 @@
},
{ "item": "ruger_mini", "ammo-item": "223", "charges": 20, "contents-item": "shoulder_strap", "prob": 5 },
{ "item": "steyr_aug", "ammo-item": "556_mk318", "charges": 30, "contents-item": "shoulder_strap", "prob": 1 },
{ "item": "hk_g36", "ammo-item": "556_mk318", "charges": 30, "contents-item": "shoulder_strap", "prob": 1 },
{
"item": "benelli_tsa",
"variant": "mossberg_500_security",
Expand Down Expand Up @@ -1121,20 +1114,6 @@
],
"prob": 1
},
{
"collection": [
{
"item": "hk_g36",
"ammo-item": "556_mk318",
"charges": [ 0, 30 ],
"contents-item": "shoulder_strap",
"damage": [ 0, 3 ],
"dirt": [ 0, 7050 ]
},
{ "group": "field_g36" }
],
"prob": 1
},
{
"collection": [
{
Expand Down Expand Up @@ -1236,7 +1215,6 @@
{ "group": "field_ar15_mk318", "prob": 80 },
{ "group": "field_mini14", "prob": 5 },
{ "group": "field_steyraug", "prob": 1 },
{ "group": "field_g36", "prob": 1 },
{ "group": "field_shotgun", "prob": 10 },
{ "group": "field_308", "prob": 10 },
{ "group": "field_3006", "prob": 5 }
Expand Down
5 changes: 3 additions & 2 deletions data/json/itemgroups/Weapons_Mods_Ammo/guns_by_calibre.json
Original file line number Diff line number Diff line change
Expand Up @@ -635,13 +635,13 @@
"type": "item_group",
"id": "guns_rifle_rare_223",
"items": [
{ "group": "nested_hk_g36", "prob": 30 },
{ "group": "nested_m249_semi", "prob": 5 },
{ "group": "nested_m4_carbine", "prob": 45 },
{ "group": "nested_m16_auto_rifle", "prob": 25 },
{ "group": "nested_zpapm90", "prob": 1 },
{ "group": "nested_zpap85", "prob": 1 },
{ "group": "nested_mdrx", "prob": 30 },
{ "group": "nested_sl8", "prob": 35 },
{ "group": "nested_sig_assault_rifle", "prob": 25 }
]
},
Expand Down Expand Up @@ -725,7 +725,8 @@
{ "group": "mdrx", "prob": 10 },
{ "group": "nested_ar15_with_kits", "prob": 19 },
{ "group": "nested_mdrx_with_kits", "prob": 10 },
{ "group": "nested_sig_assault_rifle", "prob": 3 }
{ "group": "nested_sig_assault_rifle", "prob": 3 },
{ "group": "nested_sl8", "prob": 4 }
]
},
{
Expand Down
3 changes: 1 addition & 2 deletions data/json/itemgroups/Weapons_Mods_Ammo/magazines.json
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,7 @@
[ "augmag_30rd", 15 ],
[ "augmag_42rd", 5 ],
[ "augmag_100rd", 2 ],
[ "g36mag_30rd", 15 ],
[ "g36mag_100rd", 3 ],
[ "sl8mag", 10 ],
[ "usc10mag", 5 ],
[ "usc15mag", 7 ],
[ "usc20mag", 20 ],
Expand Down
26 changes: 13 additions & 13 deletions data/json/itemgroups/Weapons_Mods_Ammo/nested_guns.json
Original file line number Diff line number Diff line change
Expand Up @@ -1558,19 +1558,6 @@
{ "group": "on_hand_308" }
]
},
{
"id": "nested_hk_g36",
"type": "item_group",
"//": "this is a distribution for the gun, reasonable number of backup mags, and some ammo to repack",
"subtype": "collection",
"ammo": 100,
"entries": [
{ "item": "hk_g36", "charges": [ 0, 30 ] },
{ "item": "g36mag_30rd" },
{ "item": "g36mag_30rd", "prob": 50 },
{ "group": "on_hand_223" }
]
},
{
"id": "nested_henry_big_boy",
"type": "item_group",
Expand Down Expand Up @@ -1881,6 +1868,19 @@
{ "group": "on_hand_223" }
]
},
{
"id": "nested_sl8",
"type": "item_group",
"//": "this is a distribution for the gun, reasonable number of backup mags, and some ammo to repack",
"subtype": "collection",
"ammo": 100,
"entries": [
{ "item": "sl8", "charges": [ 0, 10 ] },
{ "item": "sl8mag" },
{ "item": "sl8mag", "prob": 50 },
{ "group": "on_hand_223" }
]
},
{
"id": "nested_scar_h",
"type": "item_group",
Expand Down
40 changes: 24 additions & 16 deletions data/json/items/gun/223.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,36 +208,44 @@
"melee_damage": { "bash": 12 }
},
{
"id": "hk_g36",
"copy-from": "rifle_auto",
"id": "sl8",
"copy-from": "rifle_semi",
"looks_like": "modular_ar15",
"type": "GUN",
"name": { "str": "G36 assault rifle" },
"description": "An assault rifle chambered in 5.56x45mm and accepting G36 magazines.",
"weight": "3630 g",
"volume": "4640 ml",
"longest_side": "1004 mm",
"barrel_length": "480 mm",
"price": "2 kUSD 100 USD",
"price_postapoc": "60 USD",
"name": { "str": "SL8 civilian rifle" },
"description": "A semi-automatic clone of an older German assault rifle. Due to importation bans, it is semi-auto and can only feed from 10 round magazines.",
"weight": "3901 g",
"volume": "3919 ml",
"longest_side": "987 mm",
"barrel_length": "635 mm",
"price": "1 kUSD 789 USD",
"price_postapoc": "5 USD",
"variant_type": "gun",
"variants": [
{
"id": "hk_g36",
"name": { "str": "H&K G36 rifle" },
"description": "Designed as a replacement for the early H&K G3 battle rifle, the G36 is more accurate, and uses the much lighter .223 round, allowing for a higher ammo capacity."
"id": "sl8",
"name": { "str": "SL8-6" },
"description": "The SL8 is an importation-legal gun similar to the German G36, made to be semi-auto only, and to only feed from 10 round single stack magazines. It also features a distinctive thumbhole stock, a polymer handguard, and a top rail for mounting optics."
}
],
"to_hit": -1,
"to_hit": { "grip": "none", "length": "hand", "surface": "line", "balance": "uneven" },
"material": [ "steel", "plastic" ],
"symbol": "(",
"color": "dark_gray",
"ammo": [ "223" ],
"dispersion": 150,
"durability": 8,
"min_cycle_recoil": 1350,
"modes": [ [ "DEFAULT", "semi-auto", 1 ], [ "AUTO", "auto", 4 ] ],
"pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "g36mag_30rd", "g36mag_100rd" ] } ],
"modes": [ [ "DEFAULT", "semi-auto", 1 ] ],
"valid_mod_locations": [
[ "mechanism", 2 ],
[ "rail mount", 1 ],
[ "sights", 1 ],
[ "sling", 1 ],
[ "stock accessory", 2 ],
[ "underbarrel mount", 1 ]
],
"pocket_data": [ { "magazine_well": "60 ml", "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "sl8mag" ] } ],
"melee_damage": { "bash": 12 }
},
{
Expand Down
33 changes: 16 additions & 17 deletions data/json/items/magazine/223.json
Original file line number Diff line number Diff line change
Expand Up @@ -477,24 +477,23 @@
]
},
{
"id": "g36mag_30rd",
"copy-from": "stanag30",
"looks_like": "stanag30",
"type": "MAGAZINE",
"name": { "str": "G36 30-round magazine" },
"description": "A standard capacity box magazine for use with the G36 assault rifle.",
"ammo_type": [ "223" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "223": 30 } } ]
},
{
"id": "g36mag_100rd",
"copy-from": "stanag100drum",
"looks_like": "stanag30",
"type": "MAGAZINE",
"name": { "str": "G36 100-round double drum magazine" },
"description": "A bulky 100-round double drum magazine for use with the G36 assault rifle.",
"id": "sl8mag",
"looks_like": "stanag10",
"type": "MAGAZINE",
"name": { "str": "10 round SL8 magazine" },
"description": "A single stack magazine for the SL8 rifle, holding 10 rounds.",
"weight": "70 g",
"volume": "132 ml",
"longest_side": "58 mm",
"price": "60 USD",
"price_postapoc": "2 USD",
"material": [ "plastic", "steel" ],
"symbol": "#",
"color": "light_gray",
"ammo_type": [ "223" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "223": 100 } } ]
"reload_time": 120,
"flags": [ "MAG_COMPACT" ],
"pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "223": 10 } } ]
},
{
"id": "augmag_10rd",
Expand Down
15 changes: 15 additions & 0 deletions data/json/obsoletion_and_migration_0.I/migration_items.json
Original file line number Diff line number Diff line change
Expand Up @@ -1551,5 +1551,20 @@
"id": "acidbomb",
"type": "MIGRATION",
"replace": "sling-ready_molotov"
},
{
"id": "hk_g36",
"type": "MIGRATION",
"replace": "sig_assault_rifle"
},
{
"id": "g36mag_30rd",
"type": "MIGRATION",
"replace": "stanag30"
},
{
"id": "g36mag_100rd",
"type": "MIGRATION",
"replace": "stanag100drum"
}
]
2 changes: 1 addition & 1 deletion data/mods/Generic_Guns/firearms/gg_firearms_migration.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
},
{
"id": [
"hk_g36",
"sl8",
"garand",
"m1903",
"hk_g3",
Expand Down
3 changes: 1 addition & 2 deletions data/mods/Generic_Guns/magazines/gg_magazines_migration.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@
"ruger_arr_mag",
"bren2_762mag30",
"bren2_762mag10",
"g36mag_30rd",
"g36mag_100rd",
"sl8mag",
"blrmag",
"m1918bigmag",
"m1918mag",
Expand Down
Loading

0 comments on commit 28fe361

Please sign in to comment.