Name Input

Hi. I'd like to know a little more about the "Name Input Processing" command. Is it only used for naming actors, or could I, for instance, store the player's input in a variable? I want players to be able to name their farm, the way you can in Harvest Moon.
Sure you can 🙂


Set up a "dummy" actor that you'll never use AS an actor.


In event commands, set that actor's name to blank (or whatever you want the 'default' input to be).


Then do the Name Input processing for that actor.


Then do a Script command like this: $game_variables[var_id] = $game_actors[dummy_actor_id].name


(obviously putting in the appropriate variable and actor id where I have var_id and dummy_actor_id).


Then you can use \v[id] in a text box, like on a sign or something, to display what's in that variable. You'll only get an error if you try to do mathematic operations using it.
Sure you can 🙂

Set up a "dummy" actor that you'll never use AS an actor.

In event commands, set that actor's name to blank (or whatever you want the 'default' input to be).

Then do the Name Input processing for that actor.

Then do a Script command like this: $game_variables[var_id] = $game_actors[dummy_actor_id].name

(obviously putting in the appropriate variable and actor id where I have var_id and dummy_actor_id).

Then you can use \v[id] in a text box, like on a sign or something, to display what's in that variable. You'll only get an error if you try to do mathematic operations using it.
Or you can just use \N[id] to display the actor name without using an extra variable.
Thanks, guys. This thread can now be closed.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Re-opened at OP's request.
I just have a follow-up question, one that might be commonsense, but oh well. How do I actually store the name in a variable? What I'm trying to do is let the player choose a first and last name, with the latter being added to the "Nickname" field in the database.
you need scripts to do that, as the original purpose of the variables is only for numbers.


Shaz told you how to do that a few posts above:

Then do a Script command like this: $game_variables[var_id] = $game_actors[dummy_actor_id].name


(obviously putting in the appropriate variable and actor id where I have var_id and dummy_actor_id).
The script command is one of the event commands, and you have to type in the italic part of her answer in the script command box.
But Baka-chan already told you an easier way to do it, which means you don't need to use variables at all (unless you're going to use that actor for several names of different things)

Or you can just use \N[id] to display the actor name without using an extra variable.
If you want to store the first name in the name field of a dummy actor, the last name in the nickname field of a dummy actor and a combination of both inside a single variable you could do the following:

8GW0THa.png


hero_second_name = $game_actors[2].name.to_shero_first_name = $game_actors[2].nickname.to_s$game_actors[2].name = hero_first_name.to_s$game_actors[2].nickname = hero_second_name.to_s$game_variables[107] = $game_actors[2].name + " " + $game_actors[2].nicknameIn my example I'm using the actor with the id 2 as a dummy and store the full name inside variable 107.

Original thread: https://forums.rpgmakerweb.com/threads/name-input.24010/