[Solved]Variable to Character Name

Hello community.


Just got back into the game making mind set and I'm working with RPG Maker MV now have upgraded from RPG Maker VC/Ace/XP. It's interesting seeing the maker using JS plugins instead of Ruby scripts. For the game I'm working on now, I'm stuck at changing a game characters name to the value of a game variable. The plugin I'm using to set the variable first is, Darkkitten's plugin CmdInp.


This works great for setting a Variable to text, but now I want that text to be used as a character name. I tried doing a script of "$gameActors.actor(1).setName(n, $gameVariables(2))" , "$gameVariables(2) = $gameActors.actor(1)", and a few other ways with no success. What script formula would I need to use to get it so that "Variable(2) becomes Actors(1)'s name". Thanks in advance for any advice, or guidance.
By setting "a game characters name to the value of a game variable" would the game character end up being named "1" or "42" or something? In that case, it may not work because the integer might need to be converted to a string first.
With Darkkitten's plugin it allows for a game variable to be set to a sting and not a number so gameVariable(2) can be "Thomas" and not "42". I can then just call the variable back later in a textbox \v[2] and it returns "Thomas" with no problems.
With Darkkitten's plugin it allows for a game variable to be set to a sting and not a number so gameVariable(2) can be "Thomas" and not "42". I can then just call the variable back later in a textbox \v[2] and it returns "Thomas" with no problems.

You don't need the plugin to do that. Just do set variable ## to:


Script = "Text"
What my end goal is I'm making a character select system where the player chooses Male, or Female, then from there they can choose one of eleven classes to be with a different Face, Sprite, and Battler depending on the sex and class they choose. I've made a different character to reflect all twenty-two options (eleven male, eleven female) and that's how they choose what their character looks like. So as it is the questions that are asked of the player before they ask are in this order, " Are you male, or female?" "What is your name?" "What class would you like to be?"


Now granted I can swap the second and third question but in my head they doesn't make sense. So I'm using Darkkitten's CmdInp plugin to handle making a call window for the player to input the name they want their character to be that is outside of the default "Name Input Process" as the "character" that will be named will be determined after question three (What class would you like to be?).  So to have the name stored to a variable and then applied to the chosen character is what I'm looking for.


Example:

Spoiler
KEY - "What the player sees.  Pre-player interaction. Player interaction. Post Player Interaction. "


"Are you male or female? (Multi-choice pops up with Male/Female options. Player selects Female)


Female

  • (Game jumps to the conditional branch for the Female selection after turning switch[3] on to signal the gender of Female has been selected)

What is your name? (CmdInp pops up text input screen simular to Name Input screen. Player inputs "name".)


DOTCreeper

  • (Game stores DOTCreeper as variable[2])

What is your class DOTCreeper? (Game has pulled the name from variable[2] and processes Soulpour777's Character_Select.js plugin pulling up the eleven characters to choose from for Female. Player chooses Spellthief.)


Spellthief

  • (Game sets actor[39] as party leader then applies variable[2] to the Name of actor[39])



I know there was a way to set the player's name to that of the string value of a variable in RMVX/Ace and I think XP too. But can't figure out the way to do it in RMMV.
Couldn't the text code for calling a name work?


\n[x]


x = actor id
I'm not using the same Name Processor as your would normally so that won't work.
bump
Hi, @taco_god, i've solved with this code:


$gameActors.actor(3).setName($gameVariables.value(5))


Hope it helps 🙂
There we go, that solved it. Thank you Raystorm7. 😀

Original thread: https://forums.rpgmakerweb.com/threads/solved-variable-to-character-name.55561/