Reload Skill [Using Yanfly's Skill Core and Buff & States Core & Weapon Unleash]


Salutations, developers!
​




One of my characters is a mage gunner; her pistol is fueled by her magic power, dealing Magic damage at each strike. However, due to balancing issues, this shooting power has to be limited by some sort of ammo.


When using an Arcane Pistol, the weapon has these notetags:

<Replace Attack: 150> // 150 is the "Shot" skill, with it's own damage formula.
<Replace Guard: 151> // 151 is the "Reload" skill.

What i want (but don't know how to) do is the following:

  • An "Ammo" State, which stores a certain number of "bullets"
  • The "Shot" Skill requires the "Ammo" state to be availabe, consumes one "bullet" and, if the "bullet" amount in the state reaches 0, removes the state (thus making the "Shot" unavailable)
  • The "Reload" skill applies the "Ammo" state and sets it's "bullet count" to, let's say, 5.
  •  



Could someone please help/guide me in this work? I'm still pretty green in this "variable scope" thing, and i would prefer to use a state-stored variable, instead of a global one, for this.
This may not be exactly what you're looking for.. but it could be something that you'd want to take a looksie at.


Best 🙂


-Mia

Original thread: https://forums.rpgmakerweb.com/threads/reload-skill-using-yanflys-skill-core-and-buff-states-core-weapon-unleash.68724/