Magazine API
(or some steam points.. I want to buy new profile wallpapers..)
This mod does not add any weapons or magazines.
This mod allows other modders to use multiple magazine types on the same firearm.
For example, an AK with a 30-round mag AND 95-round RPK drum mag.
>>Example Mod (Vanilla Firearm Magazine Expansion)<<
- For modder: Single line per a weapon. simple.
- Tooltip will be automatically generated by API. You can see that in the screenshot. will be fancy in the future tho.
- Best Magazine will always be "magazine that has highest ammo count" no matter magazine types.
- Also, when you are inserting bullets in your spare magazine, mod try to insert bullet into where the Best Magazine is.
- When you are inserting bullets, If you don’t have any bullets for Best Magazine, mod will try to find next magazine type.
- Regarding above, you can use multiple type of ammo for single firearm. (for now, single type per single magazine however will be changed.)
- When there’s no ammo in all of your magazines, magazine which has highest Max Capacity will be the best magazine.
- If you want to change your magazine manually, not automatically selected magazine, right-click your weapon and find "select magazine" menu
- MagAPI.defineParam(weapon, mag1, mag2, … mag99, mag100) — This is all you have to do.
Example
If you need more detailed description, check the pinned discussion.
It’s pretty stable as I believe, but I’m not sure about performance when there are many magazine types.
I believe it will be okay too, but anyway, this is why I’m saying this is in testing.
About Compatibility, since weapon mods does not allow to use more than one weapon mod, it will be okay.
Also, you can fix & edit my code freely unless you are gonna set this mod as required of your mod.
About MP
I will try when B42 MP is out, but honestly, I have not played MP in the last 11 years of PZ.
So I’m not sure.

Tooltip will show correct maxAmmo and currentAmmo, However, name of magazine will not be changed.
This is my first API mod and also my first medium-sized mod, so anything bad can happen.
I wrote this code in 6 hours, but the idea came 1-2 months ago.