The Select Item command (and also Labels)
Now that we've explored both items and variables to a degree, it's probably a good time to step back and look at one of the event commands in the message section: Select Item.
So what does this do and why is it under Message with things like Show Text?
It may not be intuitive from the way the tooltip describes it, but calling a Select Item command allows the player to select an item from their inventory to be checked against whatever other event commands you're using, allowing things like letting the player choose a gift for an NPC or pick an item based on a description to solve a riddle.
It's probably easiest to show with an example so I made an NPC who wants an apple. When talking to the NPC while in possession of at least one apple (how to check that is described in variables) I want the player's inventory to open so they can select an apple and give it to the NPC. I also want them to not be able to give a different item to this NPC.
Once I've set up the initial conditional branch to see if the player has an apple it's time to make the Select Item part of the event.
I'll just call the Variable it asks me to pick Check Item ID since all I need it to do is check what the item the player selects is. Once the player actually clicks on an item from their menu this variable will be set to equal the Item ID of whatever they selected. The variable is then stored so the game can compare it against the rest of the event.
You can select what part of the inventory the player is prompted to select an item from next. The options are Key Items, Regular Items, and two Hidden Item categories. These are the same categories in the dropdown when creating an item in the database. I made the apple I want to give the NPC a regular item so I'll pick that one.
Now if the player interacts with the NPC they'll encounter a point where the regular item section of the inventory opens and they can pick any item from within.
At this point the player can click on whichever item they want and... nothing else happens. The item menu will just close. The item ID of whichever item they picked is now stored in the variable, but that's not really part of the game the player sees.
So now I make a new conditional branch where I check Variable "0003 Check Item ID". The variable is currently set to the item the player picks, so I need to check if the item they picked is the apple.
Every item made in the database has a number. I made an apple item in the 36th item slot, so the apple's Item ID is 36.
That means that in my conditional branch I need to check how the variable the player sets Check Item ID to when they pick an item compares to 36.
Now the game can actually check if the item the player selected is the apple or something else. All I have to do now is fill in the rest of the event after it with the follow up to actually give the NPC the item.
I can also put whatever I want in the else branch for if the player picks the potion instead. But what if I want to make it so nothing happens upon picking the potion?
It's Label time!
As it is now, if the player picks an item other than the apple the select item menu just closes and they have to restart the conversation to pick the apple next time. That's... inconvenient. If I want the select item command to just come up again right away after the wrong item is selected I can make a mini-loop using the Label command (not the Loop command, I'm not touching that just yet and I don't need it for something this small).
Labels are really two commands at once: Label and Jump to Label. Unlike Switches and Variables, Labels don't have a list where they're stored so you have to type in the name for the label in both the label and jump to label commands. This also means they're not "global" like Switches and Variables so they only act within the event rather than being accessed from any map or any event. I believe this means you don't have to worry about whether you've reused a name elsewhere.
I'll call this label "TryAgain" and put it above the initial Select Item command. This means this is where the second event Jump to Label will go to when it's called, opening the item menu for the player again immediately if they trigger the Else branch by picking the Potion.
If I put it above the Show Text for her asking for an item it'll replay from there instead so her question will remain visible, which may look nicer if I decide to pretty this up. It just has to go before Select Item or the player won't be able to choose a new item to fill the variable the conditional branch is checking.
Picking an inventory item like this can be a neat way to make puzzles that require the player to determine what item is needed from clues. If I wanted to have, say, a buzzer sound or a monster attack, I could have evented that instead of the Label/Jump to Label commands. But I figured exploring the Label commands was a good exercise as well so I combined the two here.













