So basically, i want a event that checks how many of a item, weapon or armor you have and then i want it to give me that information into a variable and if it's possible i also want to have one variable that counts everything but i'm guessing it's probably inefficient or very hard to do so
Get the number of items, weapons and armor in inventory?
RPG Maker MV SupportTo count a specific Item/Weapon/Armor:
This basically just does the event command, except it adds together the counts for all Items in the party inventory.
- Control Variables -> Game Data -> Item/Weapon/Armor
$gameParty.items().reduce(function(a, c) { return a + $gameParty.numItems(c); }, 0)This basically just does the event command, except it adds together the counts for all Items in the party inventory.
- To count Weapons, replace
$gameParty.items()with$gameParty.weapons() - To count Armors, replace
$gameParty.items()with$gameParty.armors() - To count everything, replace
$gameParty.items()with$gameParty.allItems()
This does indeed work exactly as i want it to and much easier than i thought it'd be. Thank you very much.
You're welcome! Happy RPG Making~
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/get-the-number-of-items-weapons-and-armor-in-inventory.152386/