-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Magazine implementation: weapons added by Chaosvolt #15002
Conversation
* Adds magazines for the Browning Automatic Rifle. Standard capacity is 20 rounds, and 30-round variants exist as well. * Magazines added for AK-74 and AN-94. Currently has the standard 30-rounder and the RPK-74 45-round mag. Which will also be useful if we ever add RPKs. * M60 and M240 given the M13 link, disintegrating belt. * Makarov given the classic 8-round mag. If I could find any sign that 10 or 12 round PMM magazines were compatible with the standard PM, I'd add them. * Magazines given to both variants of the Skorpion. * Thompson given 20, 30, and 50-round magazines. Note the what model the game's Thompson is based off of is vague, and note that M1 and M1A1 Thompsons did not accept drum mags. * Sten given its standard 32-round mag, along with a craftable magazine in the same vein as the survivor .223 magazine. Reduced capcity as it isn't double-column, but still lower reliablity. If we ever have makeshift, magazine-fed 9mm weapons, this might be the logical choice for it. * Itemgroup patterns established based on PRs adding mags to item groups. Not entirely sure where else they might go, or exact reccomended odds. M1 Garand left unotuched because we don't yet have a way to make a gun automatically unload a magazine when emptied.
* Derp. I knew I forgot something
"to_hit" : -2, | ||
"ammo_type" : "3006", | ||
"capacity" : 30, | ||
"reliability" : 8, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aftermarket should be less reliable, maybe 7?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, possibly. It is 1 less than the 20-round, but bumping it down to 7 might be acceptable.
Oh wait, quick question. Is the reload_time for the magazines to load the magazines themselves, or to load them into the guns? That would be a fail on my part. |
"ammo_type" : "3006", | ||
"capacity" : 20, | ||
"reliability" : 9, | ||
"reload_time" : 30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specify alternatives
if for 223
if you want this to work with ammo conversions. Probably stanag30
for both this and m1918mag_30
Both. |
Ah, I see. |
* Reload figures for magazines increased overall. Apparently this wolud be the time taken to load the magazine itself. * Reload time changed for the BAR. Unsure where I got that obscenely huge number. * Small reliability nerfs for 7.62x51mm belt and 30-round BAR magazine.
When you're ready do you want to compile the results in the same table format as #14981 so I can paste them in to the header of that PR. |
Went with 100 for most of the magazines, with further increases for higher-capacity versions. One thing I'm pondering is how will the belts work. I assume they're meant to come pre-loaded? And ah, sure. I'll need to assemble a table for it. Other possible ideas:
|
Craftable from individual rounds (once I work out the code) |
Ah, I see. o.o I might suggest handling it like the LAW, make the crafted/found item a tool that, when used, transforms into the desired item with the desired number of charges. |
"valid_mod_locations": [[ "accessories", 4 ],[ "barrel", 1 ],[ "bore", 1 ],[ "conversion", 1 ],[ "grip", 1 ],[ "magazine", 2 ],[ "mechanism", 4 ],[ "muzzle", 1 ],[ "rail", 1 ],[ "sights", 1 ],[ "stock", 1 ],[ "underbarrel", 1 ]] | ||
"magazines": [ "m1918mag", "m1918mag_30" ], | ||
"valid_mod_locations": [[ "accessories", 4 ],[ "barrel", 1 ],[ "bore", 1 ],[ "conversion", 1 ],[ "grip", 1 ],[ "mechanism", 4 ],[ "muzzle", 1 ],[ "rail", 1 ],[ "sights", 1 ],[ "stock", 1 ],[ "underbarrel", 1 ]], | ||
"default_mods": [ "m1918mag" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't specify defaults as this support is likely to be deprecated. Please be creative instead with item_groups
to ensure the magazine is common or rare.
A future PR will likely implement a percentage chance to spawn an a magazine which would make this redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, okay. Will be nice to see a feature that allows for random chances of having the mag in it instead.
* Can always be re-implemented via whatever future feature might allow different odds of spawning a weapon with a magazine in it.
Clip. This is one of the occasions where it's correct to say clip. Sorry, couldn't help myself. |
It might be worth adding this now as I can add a flag supporting automatic unloading later |
Doh. I thought mentioning that was my shtick. o3o And ooh, if we're able to add automatic ejection of clips/magazines/clipazines...no idea if any other weapons would be able to make use of it. |
The code already exists for destroying consumed ammo belts so shouldn't be too tricky |
Ah, interesting. Had forgot about that. |
"type" : "MAGAZINE", | ||
"id" : "sten_mag", | ||
"price" : 4000, | ||
"name" : "STEN 32-round magazine", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
STEN magazine is more concise
Consider adding |
Ah right, hmm. Had almost forgot about that. |
* Sten magazine renamed to be more concise. * Flags added to the magazines for ammo pouches.
Add the You also need to reduce the volume of each weapon now we have detachable magazines. EDIT: |
This is fing awesome i love the detail and depth you lot go to in cdda not
|
Ah right, very well. Back, was out again earlier. |
* Magazine well properties added to the changed guns. * Skorpion volumes have been altered, as they might've been a tad on the diminutive side.
* Whoops.
"type" : "MAGAZINE", | ||
"id" : "thompson_mag_30", | ||
"price" : 4000, | ||
"name" : "Thompson 20-round magazine", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy-paste typo
consider also Thompson extended mag for consistency with the other names
* Fixed 30-round Thompson magazine name. * Removed mention of capacity from magazine names, instead given in description and named to be consistent with magazine names in other PRs. * Beefed up weight of drum magazine. I might have to find some more field manuals, as the bog-standard BAR mag was the only one I could get real-world weight data for.
* Forgot the 30-round Thompson mag * Also beefed up Sten magazine volume.
* Adds a reusable option for M240 belts. * Adds more conversion logic for the different weapons. Not sure if I have it formatted right.
So, this is a thing I'm pondering. Let say I want to add conversion logic from the Skorpion (either model), to .45 ACP Thompson magazines. For the first, we only have 1 magazine option. For the second, there are 3. How should alternatives be defined in each of the 4 magazines? |
|
Ah, I see. And what about when, for example, converting 2 magazines to 3? |
|
Hmm. And that is added to both magazines? Like for example, converting the 2 Sten mags to 3 Thompson mags. owo |
No, to the individual guns themelves |
Oh right. I could've sworn they were added to the magazine, not the gun. >.< EDIT: Yeah, I got that from you. See the USP 9mm and .45 magazines in https://github.com/CleverRaven/Cataclysm-DDA/pull/15003/files for example. |
Yup, sorry my bad, you need to add |
Ah. Much confuseddragon. So that still leaves me unsure how to handle a 2-3 magazine option conversion. |
Can you give me the exact example? |
Ah, very well. Entries for the sten magazines, where 2 options are converted into 3. This shows the way they are now, for the regular and makeshift ones respectively:
The last bit in both cases, the conversion to .45 ACP, is where I'm unsure. |
Superceded by #15072, so it's officially out of my hands for the time being. |
Now that #14949 is a thing, went ahead and started expanding on the magazine options, focusing on weapons I've added. It's a start, so far. o3o
M1 Garand left untouched because we don't yet have a way to make a gun automatically unload an en-bloc clip when emptied.
A couple flags will be unused until #14972 is merged, but it isn't a strict prerequisite to this PR.