Our game has a quest where you need to give an NPC 3 random items. They can literally be any item ingame. I don't know how to code this without accounting for every single item in the game, though. Is there a way to do this?
MZ How to give an NPC any item
RPG Maker MZ SupportI don't know exactly what you want, and I am trying to answer you as fully as possible because this site is due to be closed to new threads and replies within a few days.
From your post, I understand that you want to select an item from the party's inventory, remove the selected item from the party inventory, and have the game know that you have given the item to the NPC event. Apologies if I have misunderstood.
The "Select Item" event command lets the player select an item from the party inventory, and records the item number (its position in the database) in a variable. It is possible to use the "Change Items" editor command to remove an item whose number (database position) is stored in a variable from the party's inventory.
I would do the NPC event something like this:
If you don't need the game to remember what items you have given to the NPC, you could use switches or self switches to check whether you have made each of the 3 gifts.
In case you need to reply or ask further questions, I will try to keep an eye on this thread before this forum closes.
Good luck!
Edited for: Poor typing!
From your post, I understand that you want to select an item from the party's inventory, remove the selected item from the party inventory, and have the game know that you have given the item to the NPC event. Apologies if I have misunderstood.
The "Select Item" event command lets the player select an item from the party inventory, and records the item number (its position in the database) in a variable. It is possible to use the "Change Items" editor command to remove an item whose number (database position) is stored in a variable from the party's inventory.
I would do the NPC event something like this:
If you don't need the game to remember what items you have given to the NPC, you could use switches or self switches to check whether you have made each of the 3 gifts.
In case you need to reply or ask further questions, I will try to keep an eye on this thread before this forum closes.
Good luck!
Edited for: Poor typing!
Original thread: https://forums.rpgmakerweb.com/threads/how-to-give-an-npc-any-item.184030/