Guns with fixed mags can have their capacity modded now

This is more of an FYI for anyone who wants to make gun mods that modify the capacity of fixed mag guns. The main notes is that this feature is in the game from experimental build #10833 onward.

An example based on an edited belt feed adapter mod

{
“id”: “beltfeed”,
“type”: “GUNMOD”,
“name”: { “str”: “belt feed adapter” },
“description”: “A test item to test the pastabilities of increasing the capacity of fixed mag weapons.”,
“weight”: “950 g”,
“volume”: “750 ml”,
“integral_volume”: “250 ml”,
“price”: 32000,
“material”: [ “steel” ],
“symbol”: “:”,
“color”: “green”,
“location”: “mechanism”,
“mod_targets”: [ “rifle” ],
“acceptable_ammo”: [ “223”, “308”, “50” ],
“pocket_mods”: [
{
“pocket_type”: “MAGAZINE”,
“rigid”: true,
“ammo_restriction”: { “223”: 10, “308”: 10, “50”: 10 }
}
],
“flags”: [ “INSTALL_DIFFICULT”, “IRREMOVABLE” ]
},

The only other thing to note so far is that due to allowing multiple ammo types this will make the modded weapon load any of the listed ammo but the gun will only work when loaded with the originally intended ammo.

This can also be used to convert a fixed mag gun into a detachable mag gun and vice versa.

Just replace the MAGAZINE part with MAGAZINE_WELL instead

{
“id”: “beltfeed”,
“type”: “GUNMOD”,
“name”: { “str”: “belt feed adapter” },
“description”: “A test item to test the pastabilities of increasing the capacity of fixed mag weapons.”,
“weight”: “950 g”,
“volume”: “750 ml”,
“integral_volume”: “250 ml”,
“price”: 32000,
“material”: [ “steel” ],
“symbol”: “:”,
“color”: “green”,
“location”: “mechanism”,
“mod_targets”: [ “rifle” ],
“acceptable_ammo”: [ “223”, “308”, “50” ],
“pocket_mods”: [
{
“pocket_type”: “MAGAZINE_WELL”,
“holster”: true,
“max_contains_volume”: “20 L”,
“max_contains_weight”: “20 kg”,
“item_restriction”: [ “scarhmag”, “scarhbigmag”, “scarhmag_30rd”, “scarh_makeshiftmag” ]
}
],
“flags”: [ “INSTALL_DIFFICULT”, “IRREMOVABLE” ]
},

Would this explain the Marlin 39A .22 rifle bug that won’t allow the gun to be loaded with ammo, due to not having a magazine? “Tube loader”.

I nearly died in a test run because I couldn’t load the gun :frowning:

Has this only applied to the marlin or does it apply to other weapons that have speedloaders assigned to them?

I only just tested a handful of stuff from Experimental #10853 and several revolvers seemed to function. Double Barrel shotgun faired ok. But I have no idea if there was anything else. I am not on the machine the game is at present. If you could fix the Marlin it is possible it was the only one missed. I’d hate to have you go through all the guns…yeesh. Lotta guns bro :dizzy_face:

Ok that is indeed fucky. So it is weird at least right now but here is how things seem to work. When a gun that can be loaded with speed loaders spawns with ammo loaded it is fine and will work perfectly. The problems only come if said gun is completely unloaded, you save and quite the game then reload that save. Then the gun will not work at all.

Here are some options at least from my testing that can remediate this problem until it is fixed.

  1. Before saving and quitting keep such guns loaded with at least 1 round in the magazine.

  2. Use a text editor or some other program that can edit json files and remove the pocket data that defines the gun as able to load from a speed loader, at least until point 1 becomes available again.

But yeah this definitely should not be happening and a pr should be made as soon as possible if there isn’t one already.

Thanks for checking it out. I don’t have a git account so if you feel up to making the report. Feel free. I like the marlin. Great lil toy at the beginning =D