I want to implement ranged weapons into my game in the same way that FFXII uses them; meaning that if your character equips a ranged weapon (gun, bow, crossbow, etc.) he has to equip ammo for it. The ammo won't be used up.
Currently I have it working like this:
- Equipping a ranged weapon grants a trait that allows to equip the correct ammo (bows allow arrows, crossbows allow bolts, etc.)
- Using Yanfly's Equip Core plugin I have locked equipment slots 1 & 2 (main hand & off-hand) which makes it so you can't unequip either weapons or off-hand armor (minor problem: other characters can't unequip their off-hand items)
- If you change the weapon to a different type, you lose the trait and unequip the ammo, gaining the trait for the new weapon. But you can leave the menu without ever equiping ammo, which I don't want.
Current workaround checks which type of ranged weapon the character is using and if any type of correct ammo is equipped. If not, it shows a little message and opens the equipment menu again, but that's not quite as ellegant as I want it to be.
Any help would be appreciated!
EDIT: Made a small video showcasing how it should work.
[embedded media]