Change an enemy name to a variable

I'm looking for a way to change an enemy's name to that of something that can be input by the player. For example, if the player inputs a name for Actor 3, then later I want the player to fight that actor as an enemy, I want the enemy to still have the same name.

I believe I can call an actor's name as "b.name" or "game_actors[x].name," but I'm not sure how to alter an enemy's name mid-game. I did find a script by Shadowmaster to change an enemy's name mid-game (found here: http://www.rpgmakervxace.net/topic/19412-change-enemy-stats-mid-play/), but it looked like I had to input a definite string. When I tried putting in a variable, it didn't take.
Use this Edited version of Tsukihime's Simple Text input Script

then call this to allow the player set the enemy's name

enter_text(name, variable, max_chars)#The "variable" will be the variable the name is stored in. Default is 1So the enemy's name is now stored in 'variable'

Now call this from http://www.rpgmakervxace.net/topic/19412-change-enemy-stats-mid-play/

change_en_name(enemy id, variable)for example:

enter_text("What is the enemy's name?", 1, 12)then I would call

change_en_name(5, $game_variables[1])Whereas 5 is the enemy id

and 1 is the variable from above
Yanfly has a doppleganger script, which lets you fight someone with the same name, stats, and everything of an actor. Maybe that will work for what you need?
I've moved this thread to RGSS3 Script Request. Please be sure to post your threads in the correct forum next time. Thank you.
Just found out I was doing something wrong with the script I mentioned earlier and it actually did all I needed it to do. The script instructions stated that you had to have quotes around the person's name, so when I tried to do this script call:

change_en_name(1, '$game_actors[5].name')it would just show up as "$game_actors[5] A", so I was under the impression the script couldn't handle variables and you had to input a specific string. However, if I just remove the quotes and make the script call:

change_en_name(1, $game_actors[5].name)then everything works fine. No need for any additional scripts or anything - I just misread the instructions about the name having to have quotes around it.

Original thread: https://forums.rpgmakerweb.com/threads/change-an-enemy-name-to-a-variable.41428/