Script Call for Changing an Enemy's Name?

Does anyone here know what the script call for changing an enemy's name would be? I'm trying to have a battle in my game where the party fights an evil version of one of the party members, but I need the enemy name display to match the actor name, as my game allows the player to rename the actors.

I tried using modern algebra's Global Text Codes plugin to accomplish this, but that unfortunately did not work as that plugin doesn't seem to play nice with Yanfly's Battle Engine Core. After a decent amount of searching, I couldn't seem to find a solution to this problem, so my next idea was to have a battle event run a script call that would change the enemy's name to the actor's name. However, I'm not quite sure what the script call for that would be, as I couldn't find anyone else trying to do it and the Master Script Call list doesn't list anything like it.

Many thanks to whoever answers! 😀
please confirm which maker you're using, as you're mixing different things here.
Master Script list is for Ace, but Ace uses scripts and not plugins (and a completely different script language as that)

The solution will require either a plugin or a script, it cannot be done with a script call at all because the database is read-only for the game.
But for details, we need to know which maker (and you might want to set that in your profile as well)
If you're asking for MV, what Andar said isn't true. This is on the condition you want the name to change in one battle only.
If you want it to last for more than one battle you're going to want a plugin or execute the script call at battle start each time.

Code:
$gameTroop.members()[0].name = function() {return $gameActors.actor(1).name()}

This script call will make the first troop member's (enemy) name be the same as actor 1.

If you're asking for ace I don't know the script calls, but I think you can do the same thing.

Edit: This is because, although the database is indeed read only, each enemy object has a name method, which you can change at will. Enemy objects are created at battle start IIRC and do not persist, so the effects will not last for more than that battle.
Oh! I'm sorry, I guess it just didn't occur to me to specify which Maker I was using. My bad. 😛

I'm using RPG Maker MV, and I was referring to the Master Script Call List for MV when talking about a master script list. Sorry for the confusion.
The ol' name the Earthbound Pokey character. Good times.
If you're asking for MV, what Andar said isn't true. This is on the condition you want the name to change in one battle only.
If you want it to last for more than one battle you're going to want a plugin or execute the script call at battle start each time.

Code:
$gameTroop.members()[0].name = function() {return $gameActors.actor(1).name()}

This script call will make the first troop member's (enemy) name be the same as actor 1.

If you're asking for ace I don't know the script calls, but I think you can do the same thing.

Edit: This is because, although the database is indeed read only, each enemy object has a name method, which you can change at will. Enemy objects are created at battle start IIRC and do not persist, so the effects will not last for more than that battle.

Seeing as how the boss is only fought once in my game, this works perfectly! Thanks a bunch! 😀

For future projects though, I'll have to look around for a plugin that allows text codes to be used in Database entries that also plays nice with Yanfly. If not, I'll look into making my own after I learn some more advanced JS. 😛

Original thread: https://forums.rpgmakerweb.com/threads/script-call-for-changing-an-enemys-name.77711/