Name Input

Tigersong

Furry Fellow
Veteran
Joined
Oct 22, 2012
Messages
452
Reaction score
44
First Language
English
Primarily Uses
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 
Last edited by a moderator:

Baka-chan

☆*:.。. o(≧▽≦)o .。.:*☆
Veteran
Joined
Dec 19, 2012
Messages
490
Reaction score
148
First Language
German
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.
 

Tigersong

Furry Fellow
Veteran
Joined
Oct 22, 2012
Messages
452
Reaction score
44
First Language
English
Primarily Uses
Thanks, guys. This thread can now be closed.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
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.
 

Fomar0153

Arkz
Restaff
Joined
Mar 13, 2012
Messages
1,327
Reaction score
473
First Language
English
Primarily Uses
RMMZ
Re-opened at OP's request.
 

Tigersong

Furry Fellow
Veteran
Joined
Oct 22, 2012
Messages
452
Reaction score
44
First Language
English
Primarily Uses
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 

Baka-chan

☆*:.。. o(≧▽≦)o .。.:*☆
Veteran
Joined
Dec 19, 2012
Messages
490
Reaction score
148
First Language
German
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:



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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top