How to make A Shin Megami Tensei style Gun system?

In Shin Megami Tensei, you can equip Swords and other melee weapons in one slot. This is your primary attack.

You can also equip guns as a secondary weapon, and you can equip ammo to give the guns special effects, like status and element effects. There are some gun scripts floating around, but they give the ammo limited numbers, and they need to not have that limitation, but I want the added status effects to just affect gun weapons.

Pretty sure I need a script like Yanfly's Ace Equip Engine to add two different types of equippable weapons and add an "Attack" and "Shoot" command to players, I'm just stumped how to add equippable ammo as a gun enhancer and limit it to just effecting gun attacks only like in SMT, without making the ammo limited.
Why not just ignore ammo altogether and tie the effects to the equipped gun?

Or, since you're trying to rip off SMT, why not remove primary attacks altogether because they're completely useless compared to gun attacks?
Because I want to emulate how they did it, as I'm making a game that takes heavy notes from SMT, but will not be using any of their assets (it's not a fan game using ripped assets at all), but still strives to have a very SMT like engine.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-shin-megami-tensei-style-gun-system.104327/