Guns And Reloading Them

Yanfly's YEP_X_SkillCostItems is great for simulating ammunition, esp. in conjunction with the default WeaponSkill plugin, much as YF's SkillCostManager and WeaponAttackReplace did for Ace. I've been combining these scripts/plugins to simulate guns needing ammo to fire for years now, the Ace Scripts in my Lovecraftian horror game Chapelwaite and the MV Plugins in the very gun-centric Live Free Or Die and my current unannounced project.

What these scripts do not do, however, is let you define or display how many rounds a weapon holds in its clip or allow for/require reloading when a clip is empty. As a dirt simple example, a .357 magnum revolver holds 6 rounds whereas a 9mm automatic holds 15 rounds. For 90% of games this reloading function isn't one you really need but LFOD is all about guns and shooting them, so being able to add a 'clip size' "stat" to firearms would hugely help in differentiating guns so that guns of the same/similar type and caliber don't feel the same. It would also make the rhythm and flow of battle feel more like I want them to. Wayyyyyy back in the day in 2k3 I somehow evented a passable reloading system in a super-heavily modified DBS. While in theory I could do something like that, in this age of Plugins it would be unforgivably cludgy and awkward, and thinking about the like, 32 boilerplate pages of event code that were pasted into every battle troop to accomplish all of the things I was doing with that DBS gives me like...'Nam flashbacks, lol.

Is anyone aware of a "reloading" script that plays nice with Yanfly Engine Plugins and if not, is anyone willing to have a go at making one? I'd like any plugin produced from this request to be available to everyone, since it's not like it's a paid request and I think this could open up some new design space for MV games in general. Thanks!
new year, new month, new decade, gentle bump
Hi, you can do this with Yanfly plugins.
Think the ammo as skill uses, then it would be easy.

Needed: yanfly core, itemcore, skillcore, skillcost items, limitedskill uses

Give the pistol two skills (reload pistol, pistol shot)
Set the pistol shot plugin command to

<Limit Uses: 6>

Then set reload like this.
bog.png


Turn off any skill uses recover from default limitedskill.

After, your pistol will have how many “ammos” (actually how many uses pistol shots still has)
The ammos (skill uses) left is shown, and does not replenish when you remove then requip the used gun.

To make the system feel different, you can make another weapon like revolver and uses only +1 when reloading the revolver, a double barrel shotguns that uses two ammo but reload only get 1 shot, machinegun that uses bigger catridge but may hit multiple times, etc.

Technically you can make special bullets (like silver bullets) with another attack skill formula, just that the pistol may have way more bullets loaded than it's supposed to be.

It's not compatibile with the default rest I think, would replenish all the gun shots (skill uses).

You cannot also emulate hitman movie type of actions where you exchange pistols that are loaded with bullets, unless you choose to equip a pistol of another weapon id.
It's not compatibile with the default rest I think, would replenish all the gun shots (skill uses).
If you give it the <Not Recover All Uses> tag, it shouldn't.

Miragewolf, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/guns-and-reloading-them.115360/