Yo, Despain here with my latest RPG Maker VX Ace tutorial. Today I’m going to show you how to create a password—and I’m not talking about the Input Number type of password. We’re going to be creating an event where the player can enter an actual text password, and we can do that by using the Name Input Processing event command.
The Name Input Processing command will call up a screen where the player can create a name for an actor. It’s mostly used to give the player the chance to make up new names for the heroes. But like most all event commands in RPG Maker VX Ace, it can be used for more than that.
The first thing you want to do is create a dummy actor in the database. This actor shouldn’t be used anywhere else in the game—he can’t join the party. Don’t worry about his graphics, class, features—the only thing we care about is his name.
Now that your dummy actor has been made, you can create your event. You’ll find the Name Input Processing command on page 3 of the event commands, under the Scene Control category.
Choose the dummy actor. For the sake of this example, I’ve named him PASSWORD. Note that the name of the actor will be displayed by default when the Name Input Processing screen appears in-game, so you might want to give this actor a blank name.
The max characters field should be easy to understand. When I use this command to create a password functionality, I always make sure that the amount of characters is equal to the length of the password. That way, it avoids potentially confusing the player.
The Name Input Processing command will change the selected actor’s name to whatever the player enters. Now, if we use a conditional branch, we can check that actor’s name. In this way, we are able to simulate a password function.
You’ll find the Conditional Branch event command on page 1 of the event commands, under the Flow Control category.
On page 2 of the Conditional Branch box, you’ll be able to check an actor, and you can check to see is he has a specific name. All you need to do is type the password into this box. The conditional branch will essentially read “if the player entered whatever as the password”.
Here’s something worth noting: the name field of the conditional branch is case-sensitive. That means that it cares if the player enters the proper capital letters. You can avoid this by using additional conditional branches in the “else” space, and check other instances of the password (for example, Hello, hello and HELLO). For the sake of the example, we’re going to keep it simple. The player will have to enter Hello in order to continue.
This is what my event looks like.
If the player enters the password correctly, the guard will tell the player that he can pass. Otherwise, he’ll tell the player to turn back.
This example doesn’t really do anything after the player enters the correct password. The guard might move out of the way, or it might transfer the player immediately. You might even want to add a cutscene. This event also doesn’t use a switch or a self switch—yet. You would normally use a switch of some kind to prevent the player from entering the password multiple times. If you want to learn about how to use switches, check out my tutorial here.
This is what the Name Input Processing screen looks like in-game.
The face is the face of the selected actor—the actor whose name we are changing. You might want to leave the face blank. In this case, the face is a guard, because the guard is asking the player to enter the password. You might create a graphic of a locked door. Use your imagination.
Hopefully this tutorial has shown you a cool new trick. Have fun with it. Thanks for reading, and happy game making.