Get number of items in the party

Hey @All 🙂

I need to know, how much of an item the party owns.

To check general, if the party own the item, I use this function:
Code:
if( $gameParty.hasItem($dataItems[bquests[j].gegenstaende[iGegenstand].id])){
}

But how do I get the number of this item?
maybe
PHP:
 var nbItem = $gameParty.numItems( $dataItems[id] ); // return number item from id
if ( nbItem ){
  // do stuff if it >0

};
THX, that's it 🙂

Is there a list of all function in rmmv? I know this (), but there is only a part of all function.
Why do you need to do this via script? The event command Control Variables lets you set a variable to the number of items the party holds.

If you NEED to do it via script, then look at Game_Interpreter and see what it does when you use that event command.
Why do you need to do this via script? The event command Control Variables lets you set a variable to the number of items the party holds.

If you NEED to do it via script, then look at Game_Interpreter and see what it does when you use that event command.

I don't need to do it via script. I need exactly this function 🙂 What I need to know ist, where from he knows this function. Is there somewhere a list, that shows all function I can use in my rmmv plugin? 🙂
It is in the event commands - Control Variables > Game Data > and there'll be something there to select the number of a particular item/weapon/armor in inventory.

You said you don't need to do it via script, but then you said you want to use it in your plugin. A plugin IS a script. Are you writing a plugin? As I said, look at Game_Interpreter (in rpg_objects.js) and see what it does behind the scenes when you use the Control Variables command to get the count of items. That's what everyone else has to do if they want to find out, and you will learn better by looking it up yourself than just being told.
Sorry, I've got you wrong. Yes, I write a plugin.

Thanks for the tip, I look at the js file 🙂
to know the full list of rmmv command script, open debug console (f8).
and tape 'window'
after for search in WINDOWS folders of your project where and what do the command, be shure you case the index for search and scan content to find the command.
10-14-2010-7-48-59-PM.png


this allow you to find what file hold your command and do what, and fully scan the scrypt content file .js or .html or all other text files.

Original thread: https://forums.rpgmakerweb.com/threads/get-number-of-items-in-the-party.89297/