When you replace your weapon, you don't get a "new" ammo clip. Rather, you always automatically use the most full clip in your inventory, whenever you get a new weapon. Thus, if you have 2 clips of 30 rounds and shoot 10 from the first, when you make an attachment/detachment, you will then have the 30 rounds in the weapon's magazine (20 in the spare mag). If you then fire 20 rounds from this full magazine and attach/detach, you will then be using the clip with 20 rounds remaining (with a 10-round clip left in your inventory). This would tend to leave you with lots of half-full ammo clips which is not ideal, but I don't think you actually generate ammo this way (just rechecked this, in the Attachments demo at least, and I wasn't generating any new ammo; if you have a specific different circumstance where you can generate extra ammo, then please tell me).
One annoying issue with ArmA is that you can't remove a magazine from the player and return it without refilling it. I think this might be the effect you are thinking of, but this script never manipulates magazines, only weapons themselves.
My reasoning behind using a long kneeling (well, the medic kneeling) animation was to enforce the idea that making weapons modifications wasn't something you did every 2 minutes in the field. Yes, the case of adding or removing a silencer to a pistol might only take a couple of seconds (at least based on watching James Bond movies), but all the other modifications, although performable in the field, weren't as trivial as just replacing the magazine (and were "non-combat" activities unlike just replacing a magazine). This longer and less "convenient" animation also would tend to dissuade people from continually changing configurations, which would mean that they wouldn't have so much of a problem with the half-full magazines issue.
I should, perhaps, consider an option to allow "fast" (stance-based reload animation as you suggest) or "slow" attachment/detatchment (the current kneeling medic animation). Since I need to revisit this script when I release a new version of SPON Money
, to allow "loose attachements" to be bought and sold, I'll maybe add this suggestion, since although I wouldn't personally use this faster alteration, I'm sure you are not alone in wanting more instant changes (but any case, you have made the change in your own mission anyway).
(I don't think that your reloading in the script correction you give actually has an effect. All it does is reload the weapon before it is replaced, but whatever happens, when the new weapon is given you always end up with the most full magazine in the weapon automatically, this not being affected at all by which magazine was in the "pre-change" weapon).