Password Input using Actor Names

in Tutorials

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. :)

About the author: Jason “despain” Perry has been using RPG Maker for over a decade, and in that time his articles, tutorials, and graphical resources have helped countless RPG Maker users on community forums. He currently runs the website finalbossblues.com, where he co-hosts an RPG Maker podcast and regularly posts new articles and tutorials.

9 comments… add one

  • CT_Bolt March 11, 2013, 2:49 pm

    Wow, nicely done. Way to think outside the box. ‘◡’

  • Tsunero March 12, 2013, 3:34 am

    This is… Incredibly creative o.o Out of curiosity, Do you need more then one actor if you intend to have more then one password area, or will the name for the actor not stick? Cause if the name stuck, it’d look odd next time it was used. Maybe an event at the bottom that set the actors name to nothing?

    • Despain March 12, 2013, 4:40 am

      You can use the “Change Name” event command to make an actor’s name blank, essentially “resetting” the password each time you use it. Good luck. :)

  • Dure-Maknun March 26, 2013, 11:17 am

    Nice!!! cool!

  • light487 March 26, 2013, 6:55 pm

    Just wondering if there is anyway for the input to be done with the keyboard rather than the in-game character (letters) selection? if I wanted to be a little more creative with the parsing of a password or something, then the ability to have a string entered via the keyboard would be advantageous..

    • Roderich May 29, 2013, 5:06 pm

      It’s possible, but it would require a script.

  • Daniel September 11, 2013, 9:54 pm

    Here’s an idea: Upon starting a new game, have the player enter his own password(aka change actor-name to his password). Now whenever the player tries to load his game, have an event run to ask him the password. Match the password, play the game. No match, game get booted back to title(or asked to retry). This way, when your friend comes to play your game, he can’t mess with your save. Like selling all of your ultra-rare weapons to the local shop for 1 gold each, and then save so they’re gone forever. lol

  • Damián May 17, 2014, 2:30 am

    Hi, this might be a little or not just little, but a late reply, but I didn’t find another plae to comment.
    My question is how to erase the Password we chose after we answer wrong.
    I mean, I give the wrong answer and then try again and the name input look empty, not with the letter from before.
    Anyway, thanks… great idea, indeed.

    • des May 21, 2014, 3:54 pm

      You should be able to reset it by using the “Change Name” command. It’s under the “Actor” category on the first page of event commands.

Leave a Comment