Fix 40mm Capacity (Primarily Milkor) 1.0.0

Do not ask when mod authors will update their mods or if they can upload older versions of their mods.
Bothering mod authors will lead to warnings and repeat offenses will lead to bans.
Due to an unusually high volume of traffic, our site may be experiencing intermittent slowdowns. If you notice any issues, log out of your account and browse anonymously so you can better utilize caching or try using forge.sp-tarkov.com to search for and download mods.

Force sets grenade launcher cylinders to have the right number of slots for grenades

For those who are crashing because of the Milkor grenade launcher


I'd been troubleshooting a specific issue where the game freezes into a white screen after 20 to 30 minutes into random raids, after reviewing the crash logs from two different incidents, this error popped up in both logs:


Item deserialization error: item patron_40x46_m406 (id: 68bb0fc54c53578cc4025fc5) has too large stack count 1 when StackSlot cartridges in item mag_msgl_milkor_cylinder_mag_std_40x46_6 (id: 68bb0fc54c53578cc4025fc4) only allows 0


Essentially, the game is trying to load a grenade shell into the grenade launcher's cylinder, but the cylinder's capacity is, most likely due to a conflicting mod, being incorrectly set to zero. The crash probably happens when a bot attempts to load the Milkor, or the map tries to generate a Milkor with shells in it.

So obviously, I, with zero coding experience and had promptly given up on the search of hours on the SPT workshop for a solution, turned to ChatGPT. I gave it the error logs and my mod list, and it generated a mod that seems to have solved the problem for me. It's a tiny little server mod that forces all 40×46 magazines to have a non-zero capacity (6 for cylinders like Milkor, 1 for single-shot launchers). It runs after most of the other mods load in and fixes whatever another mod broke.

I haven't experienced the same crash since putting it in the list, at least for a few raids in a row.

All files were generated by ChatGPT, I quite literally wrote nothing. I just wanted to share this quick fix in case anyone else experiences the same issue.

Put the mod in your user\mods\




kanamurder