Asking for help (I'm a newbie): using items on events

Hello guys!
I'm currently trying out RMMV to make my first complete game. I'm a beginner so I'm just testing things out for now.
I'm thinking of making a game similar to Ao Oni or The Witch's House where the player interacts with items and the environment, puts stuff in the inventory and uses items to resolve puzzles.

I'd like to use the same system of those games: the player can open the inventory and select an item whenever they want, and if they're in front of the right event they will use the item and interact with it.
For example: I have a piece of a certain shape. I open the inventory and select it, but nothing happens. When I'm in front of a wall with a hole of that shape, I open the inventory and use the piece, and I get something like a text that tells me that the piece's fit perfectly.

I've searched online a lot but I can't find how to do it. I know there's the "Select item" command, but it opens the inventory after interacting with something and I don't want that. I want the player to try out on their own, so they don't know where to use items unless they think well.
I haven't found a plugin that works with MV or any other solution. Anyone has any idea how those games did it?

Sorry for my English, I hope everything's clear!
I haven't played these games, but you can connect a common event to your shape item. In that common event you control variable 3 variables and set them to the player's map ID, X and Y coordinates. Additionally you can create a conditional branch to check that the player is facing the right direction. Then you make 3 conditional branches to check if the map ID, X and Y variables align with where the player needs to use it. If so, do whatever needs to be done.
1762731247264.png


You can find the stuff for map ID as well as the X and Y coordinates in the "Game Data" section of the control variable command.
1762731290355.png
While the process described abo is very good for specific keys to one-use puzzles, there are a few additional commands and facts that you should keep in mind for other types of puzzles:

1) events don't use items, but they can pretend to use them by reducing the player inventory and using the other commands to simulate the effe3ct of an item.

2) "get location info" can be used with coordinates like described above to get specific information about the coordinates given - for example if there is an event there, if that position is marked by a region code or other options. It can be used for cases where you have to identify a position to an item that is usable on many different positions throughout many maps.

3) if you haven't done so already, make sure to work through the build-in tutorial and read the help file itself. Both will give you valuable informations.
I wonder if there's a plugin that would do this? I know Galv had one for VX Ace (https://galvs-scripts.com/2012/12/07/use-item-on-event/), but don't know if it was ever ported to MV.
I haven't played these games, but you can connect a common event to your shape item. In that common event you control variable 3 variables and set them to the player's map ID, X and Y coordinates. Additionally you can create a conditional branch to check that the player is facing the right direction. Then you make 3 conditional branches to check if the map ID, X and Y variables align with where the player needs to use it. If so, do whatever needs to be done.
View attachment 352791

You can find the stuff for map ID as well as the X and Y coordinates in the "Game Data" section of the control variable command.
View attachment 352792
thank you so much! Tried this with my little experience and I think I did it!
While the process described abo is very good for specific keys to one-use puzzles, there are a few additional commands and facts that you should keep in mind for other types of puzzles:

1) events don't use items, but they can pretend to use them by reducing the player inventory and using the other commands to simulate the effe3ct of an item.

2) "get location info" can be used with coordinates like described above to get specific information about the coordinates given - for example if there is an event there, if that position is marked by a region code or other options. It can be used for cases where you have to identify a position to an item that is usable on many different positions throughout many maps.

3) if you haven't done so already, make sure to work through the build-in tutorial and read the help file itself. Both will give you valuable informations.
thank you so much for the tips! I'm doing the build-in tutorial and it's helping a lot 🙂
I wonder if there's a plugin that would do this? I know Galv had one for VX Ace (https://galvs-scripts.com/2012/12/07/use-item-on-event/), but don't know if it was ever ported to MV.
I think there isn't an MV version but thank you for the link!
RPG Maker itself offers tools to create any type of puzzle that the developer can imagine. No additional plugins are necessary.
(The colors in the images might look strange; I converted them to 256 colors so they would load faster.)

First, create an item of type "Key Item" that cannot be consumed or sold. This way it will only appear in the menu as inaccessible:
ObjectPuzzle1.png


Now, on the map where you can find this item, create an event that represents it...
Add the item to the inventory and activate a Self Switch so that we can make the event disappear in the next step.
(I included the option for the player to choose whether to pick up the item)
ObjectPuzzle2.png


Create a new page in this same event, which should be activated by the Self Switch chosen previously:
ObjectPuzzle3.png

Before proceeding, test it in the game to make sure you haven't made any mistakes...


In this next step, create the door that will be opened by the item. On the first page, define the graphic and enable the option that makes the graphic static:
ObjectPuzzle4.png

Create a new page for this event; this page should be activated by a switch that is not a Self Switch, known as a Global Switch. Choose a name of your preference so you can find it later:
ObjectPuzzle5.png

Inside the event, specify what it will do when the key has worked.

Finally, let's move on to the most complex part of this: Create a new event on the map where the key should be inserted. In this example, it will be on the same map as the door. I set the event, even without a graphic, to have the same level as the player so that they can interact without having to climb to the same spot as the event.

Within the event, call the command to select items, and choose the "Key Item" option. Define a variable of your choice, as this system works with the numerical ID of the selected item.

Immediately afterwards, create a Conditional Branch that checks if the variable's value is equal to the item that should be placed in this location, in my case, it's 8, as you can see in the first image of the first step. Activate the Else option:
Code:
◆If:Item in Puzzle = 8
  ◆
:Else
  ◆
:End

Inside the Else block, place another Conditional Branch that checks if the variable is greater than ZERO, because if the player doesn't select any item and simply exits the selection menu, this condition will not occur:
Code:
  ◆If:Item in Puzzle > 0
    ◆Text:None, Window, Bottom
    :    :This item doesn't fit here...
    ◆
  :End

Inside the Conditional Branch, place the effects of your choice that will occur when the player uses the correct item. In the example, I only included a sound effect and an animation to open the door. Finally, activate the Global Switch which activates the port:
ObjectPuzzle6.png


Now create a new page that will always display the item in this location, changing the graphic for this event to the same one as the first event in step 2:
ObjectPuzzle7.png
RPG Maker itself offers tools to create any type of puzzle that the developer can imagine. No additional plugins are necessary.
(The colors in the images might look strange; I converted them to 256 colors so they would load faster.)

First, create an item of type "Key Item" that cannot be consumed or sold. This way it will only appear in the menu as inaccessible:
View attachment 352909

Now, on the map where you can find this item, create an event that represents it...
Add the item to the inventory and activate a Self Switch so that we can make the event disappear in the next step.
(I included the option for the player to choose whether to pick up the item)
View attachment 352910

Create a new page in this same event, which should be activated by the Self Switch chosen previously:
View attachment 352911
Before proceeding, test it in the game to make sure you haven't made any mistakes...


In this next step, create the door that will be opened by the item. On the first page, define the graphic and enable the option that makes the graphic static:
View attachment 352912
Create a new page for this event; this page should be activated by a switch that is not a Self Switch, known as a Global Switch. Choose a name of your preference so you can find it later:
View attachment 352913
Inside the event, specify what it will do when the key has worked.

Finally, let's move on to the most complex part of this: Create a new event on the map where the key should be inserted. In this example, it will be on the same map as the door. I set the event, even without a graphic, to have the same level as the player so that they can interact without having to climb to the same spot as the event.

Within the event, call the command to select items, and choose the "Key Item" option. Define a variable of your choice, as this system works with the numerical ID of the selected item.

Immediately afterwards, create a Conditional Branch that checks if the variable's value is equal to the item that should be placed in this location, in my case, it's 8, as you can see in the first image of the first step. Activate the Else option:
Code:
◆If:Item in Puzzle = 8
  ◆
:Else
  ◆
:End

Inside the Else block, place another Conditional Branch that checks if the variable is greater than ZERO, because if the player doesn't select any item and simply exits the selection menu, this condition will not occur:
Code:
  ◆If:Item in Puzzle > 0
    ◆Text:None, Window, Bottom
    :    :This item doesn't fit here...
    ◆
  :End

Inside the Conditional Branch, place the effects of your choice that will occur when the player uses the correct item. In the example, I only included a sound effect and an animation to open the door. Finally, activate the Global Switch which activates the port:
View attachment 352914

Now create a new page that will always display the item in this location, changing the graphic for this event to the same one as the first event in step 2:
View attachment 352915
thank you for the in-depth explanation! This will help me a lot! I'm afraid it still isn't what I was looking for though because I don't want to use "select item", but I want the player to open the inventory autonomously and try to use items where they think it's correct.
I think I found a way to do it with common events and item effects but I have to make more tests with it 🙂
but I want the player to open the inventory autonomously and try to use items where they think it's correct
I didn't understand, this is basically opening the inventory, just much more practical and separated by category. There is a command that directly opens the item menu, skipping the player menu, but it doesn't return to the map when you press the back or cancel key...

The idea is to create a plugin that modifies the menu's functionality by calling a plugin command using a boolean value to check this, but it would need to be developed.

Original thread: https://forums.rpgmakerweb.com/threads/asking-for-help-im-a-newbie-using-items-on-events.180945/