Optional Magazine Blacklist Mod

To start, I respect the work that’s going into revamping the entire gun system to use magazines and such, which is much more realistic, but also much more complicated. I would love to see a mod added to the blacklist mod options that overwrites those changes and removes magazines if that’s possible, reverting the guns to how they used to be.
I am having far too much frustration finding guns everywhere but never finding a magazine so I have all the ammo and all the firearms and still can’t use them, and I quite liked how they worked before.
This way those who like the new system can still have it, and those who don’t can just activate this mod. I am just not sure if such a mod is even possible.

Seems like it would be possible, revolvers and single shot rifles are still in-game. But that would be a ton of work for something that I don’t think anyone will use once magazines are done. The feature is still brand-new and being updated almost daily. Theres a lot of flak on github about the current spawn rate for magazines, I expect something will be done about it soon. I hereby give you permission to debug in some magazines until the spawning is fixed. Cheers!

edit: https://github.com/CleverRaven/Cataclysm-DDA/issues/15443#issuecomment-185473108
mugling plans to look into magazine spawns over the weekend.

Wouldn’t simply modifying all firearms to the way they were and making it a mod work? It would be soooooo time consuming however…

I feel it would’ve been wiser to develop all the magazine-related stuff at once and in private, then publish it all at once (after some private testing). The way it is now the changes just trickle in, a few guns and calibers at a time, resulting in mixed behavior. The lack of magazines is almost toxic. Spawned guns should come with an empty, full or partially spent magazine.

But yeah… Magazines mod. It’d make sense. This reminds me of Project Zomboid, which also has a magazine system, but it’s completely optional. There’s like 3 or 4 different choices for gun reload behavior.

Not a huge fan of the magazine system nor a huge opponent either but I gotta tip my hat to Mugling, though. Recently the changelogs have been flooded with his name. I may not agree with what he’s doing to our sheep but I’m in awe at the way he does it. 8D

This would probably be reasonably easy to do, the most straightforward way to do it would be to override just the field of the gun that defines the number of rounds it can hold internally, I think just by overriding that field it would no longer require or be compatible with magazines. It would be very simple to add something to the json loading code to blacklist all of the magazine items with a single json entity.
The main piece of work would be to add those gun overrides, something like:

  {
    "id": "ruger_1022",
    "type": "GUN",
    "edit-mode": "override",
    "clip_size" : 10
  }

A slightly more exotic solution might look up the default magazine for each gun and set the gun’s internal magazine size to the capacity of the magazine. Actually that might be really easy now that I think of it.

Nope, so very nope. The magazine overhaul has changed thousands of lines of code and tens of thousands of lines of json. There’s no way such a huge change is going to work if you try and do it all at once. Also the DDA codebase is such a fast-moving target that by the time those changes were finished, they would probably be broken in weird ways because tons of related code would have changed while the author was off writing their code. Also it would make reviewing and commenting on the code nearly impossible, writing thousands of lines of code and having it work is hard, reading and understanding thousands of lines of changes is basically impossible.

We’ve been putting a lot of effort into keeping things stable while these changes go in, but at a certain point there’s a tradeoff between getting it done and keeping it stable.

[quote=“Kevin Granade, post:5, topic:11425”]This would probably be reasonably easy to do,
The main piece of work would be to add those gun overrides, something like:

{ "id": "ruger_1022", "type": "GUN", "edit-mode": "override", "clip_size" : 10 } [/quote]
I think that would need to be:
“edit-mode”: “modify”,
I believe “override” wants all the fields present in order to work.

It’s called experimental for a reason, this isn’t the first time things have been a bit strange while new features are implemented and it definitely won’t be the last. But it always gets back to smooth sailing eventually. You all haven’t even managed to break my saves in over a year :wink:

I actually like the extra hurdle in getting working guns. The great equalizer is much too great once you have lots of ammo on hand. And DIY guns get more of a chance to shine this way.

However, I think it’s worth pointing out that for a lot of the less exotic feed systems (/me shoots a sideways glare at the FN P90), the magazine is basically a metal box of specific measurements and a springloaded mechanism - therefore, easy to copy with some tools.

I would like to raise, in that regard, the issue of “copying” items. Say, you have a clothing item on hand. You want to make another one. You have the necessary materials and tools on hand, and a bit of relevant skill. How about the ability to, in CDDA, try and use the item as its own recipe, without endangering the original item? I know that some items you can acquire the recipe for by disassembly. In a lot of cases it makes sense, with various internal parts that aren’t easily examined or measured. But for relatively simple items, that could be adequately inspected without disassembly, wouldn’t it make sense to have the ability to copy them? And yes, I do believe it could apply to DIY magazines - all one has to do is have the right shape, size, and snaggy bits (to fit a particular gun), so crafting a DIY magazine for a particular gun should be possible without disassembling any existing magazines for that gun or learning specifically about them from a book - just by having one to copy from.

Really? I figured the magazines involved only a handful of coding AND tons of .json editing. I mean, once one gun is made to accept and operate with magazines, the rest involves just… doing the same thing over and over again? I guess not? I can’t imagine what other potential issues there could be…

…Like, loose full magazines on the ground, on fire, and the game pukes out because ammo is supposed to explode…?
…Ammo pouches on player, and the player walks near lava, raising the temperature, and the game is unsure if it should try to cook the ammo in the magazine that’s in the pouch?
…Or, like, trying to drive over a burning magazine on the turn it’s supposed to be destroyed by fire, and the game doesn’t know which one should be the murderer - the fire or the tire?

Well, I guess I can imagine a few potential conflict situations after all.

Ah. Now, that makes sense (and I never really thought about what you guys have to balance there with). Enlightening.

aaand here it is No magazines mod by kevingranade · Pull Request #15490 · CleverRaven/Cataclysm-DDA · GitHub
The dynamic thing ended up working, so every gun automatically gets the capacity of its default magazine.
We plan on having guns with integral mods indefinitely, so this should keep working as well, though there are some things that probably won’t work (for example there are no magazine extensions anymore if you go this route).

[quote=“Malkeus, post:6, topic:11425”]I think that would need to be:
“edit-mode”: “modify”,
I believe “override” wants all the fields present in order to work.[/quote]
I think you’re right, my bad.

That’s pretty reasonable for some items, and yes a lot of box magazines are a good example.

I assume at some point, being able to make magazines is planned, as they are FAR easier to make than many things we can make now (at the risk of getting political, it’s why laws regarding magazine size are so amazingly stupid and useless - the only people it affects are those who are willing to follow the law… which leaves out all the criminals by definition).

I had at one point intended to come here and give my opinion on the magazine change, but it mostly boiled down to “sounds neat but effectively acts as a wall to gun use since chambering rounds doesn’t work” and having this mod included will suit me just fine for now. I like the idea of having to find more magazines to extend combat readiness, but I’ll wait until there’s a stopgap solution of chambering a single round before using it in my games. Thanks for making this mod, it’s much appreciated :slight_smile:

Thanks a lot for making the mod! I do intend on using the magazine system at some point but it’s nice to have the variety. Not a huge problem but I have noticed that the Glock 19 is limited to 7 rounds with the mod activated, but obviously I understand that fixing it may not be a huge priority.