So, I'm not quite sure how to do this, and I need help. When my game starts, I want the player to be able to type in their name, and I know how to do this. But, I want to add something to the end of the inputted name. For example, say the player wanted their character to be named "Sarah". But, if the game was about you being, lets say, a dog, your name would automatically end up being "Sarah the Dog". I'd like to know how to make the game automatically add words to the end of an inputted name, or in this case, how to add on "the Dog".
Help with Naming Characters
RPG Maker MV SupportYou could work with variables.
var1 = inputted name
var2 = the Dog
Then you change the name of the character to var1+var2. Or you could use the Nickname field.
var1 = inputted name
var2 = the Dog
Then you change the name of the character to var1+var2. Or you could use the Nickname field.
Hm, that seems like it'd work, but I'm a bit confused as to how I'd do it. I tried, and it gave me an error message. Also, I don't think the nickname field would be that useful in my situation. Do you mind explaining how I'd do it?
You would need a little knowledge in JS to get the name and do the trick. Unfortunately I'm no savvy on JS, so can't help you with more than the idea. The implementation will need additional help.
Hm, I'll look into it. Thanks anyways, though!
Can you show us an image of the event that you used and the error message?
Sure!

This is the event. First I put the Name Input Processing. Then I did control variables, and set the variable called "inputname" to <n\[1]>, thinking it might work due to the fact that "<n\[1]>" is what you use when inserting a player's name in a text box. Then I tried setting a variable called the cat to " the cat", set a variable to add them together, but it didn't work.

This is the error. As soon as I put in a name and hit OK, this appeared.
I'm thinking I could do it by storing the inputted name into a variable, storing the words "the cat" into a variable, and adding them together. But, I don't know how to do that.
\N (and so are the other text escape codes) only works inside of Message Box so it will not work...
Your command should be
inputname = $gameActors.actor(1).name
I think
Also, there shouldn't be any <> in there... Even the escape codes when used on text should just be \N[index] and not <\N[index]>
It should only look like
Control Variables: # 0002 inputname = $gameActors.actor(1).name
Control Variables: # 0001 the cat = "the cat"
Your command should be
inputname = $gameActors.actor(1).name
I think
Also, there shouldn't be any <> in there... Even the escape codes when used on text should just be \N[index] and not <\N[index]>
It should only look like
Control Variables: # 0002 inputname = $gameActors.actor(1).name
Control Variables: # 0001 the cat = "the cat"
Yea, I replaced \N with that and changed the cat to "the cat", but this time I don't get the error message, but there's no "The cat" afterwards. It's probably due to "the cat". So, I need to be able to store the words "the cat" into a variable. Geez, this stuff is confusing. But I've seen a game made in XP do this, so it's not impossible...
I tried it and I don't get any errors, can you post your new event? Are you sure you removed the < > ?
EDIT: Oh wait, using just .name will save the function not the returned value.. weird
EDIT: Oh wait, using just .name will save the function not the returned value.. weird
Yeah, when you right click it just shows the name you put in, without anything after it.
Here's a working event, it shows Harold the cat in the text box..
I just did
Variable 2 = $gameActors.actor(1).name()
Variable 1 = " the cat" (not <"the cat">)
Variable 2 += Variable 1
EDIT: Realized you dont even need two variables lol
Take note though that this doesn't actually change player's name to Name + the cat. If you want to do that, use this script call instead
$gameActors.actor(1).setName($gameActors.actor(1).name() + " the cat")
That way, Player 1's name will be changed to whatever his name currently is plus the cat

I just did
Variable 2 = $gameActors.actor(1).name()
Variable 1 = " the cat" (not <"the cat">)
Variable 2 += Variable 1
EDIT: Realized you dont even need two variables lol
Take note though that this doesn't actually change player's name to Name + the cat. If you want to do that, use this script call instead
$gameActors.actor(1).setName($gameActors.actor(1).name() + " the cat")
That way, Player 1's name will be changed to whatever his name currently is plus the cat

Yea, that worked! Thanks a ton!
All you need to do to change the name is put this { $gameActors.actor(1).setName($gameActors.actor(1).name() + " the cat") String of coding. Again, thanks!!!
All you need to do to change the name is put this { $gameActors.actor(1).setName($gameActors.actor(1).name() + " the cat") String of coding. Again, thanks!!!
You probably saw the older version of my reply, read it again.. The new code is now working fine
Original thread: https://forums.rpgmakerweb.com/threads/help-with-naming-characters.70908/