Dynamic Enemy Battler Names (from Variables)

Hi RPG Maker community.

Does anyone know if you can make an enemy name "dynamic"? In other words, I would like to name an enemy from a variable, so I would have variable 51 be "JimBob" and then I would name enemy battler "\v[51]". This actually works when it says the enemy attacks "JimBob attacks!" in the battle description text, but the battler itself says "\v[51]".

Any suggestions would be most welcome! Thanks.
I'm guessing that somehow the game interpreter doesn't evaluate the text for in-game codes, but I figure there has to be someway of forcing it.

Or maybe renaming it somehow when the battle starts? Is anyone aware of a way to do that? Open to using a plugin, or javascript if necessary.
If you want to rename a specific enemy (meaning one from the Enemy database tab), then you could do something like this:

Code:
$dataEnemies[20].name = 'Evil';


This would rename the enemy with Id 20 to Evil. If you add this script call right before the battle starts, the enemy will have his new name right away and it will show in the "Enemy Emerged" text without a problem.

Adding the script call to the troop event at turn 0 instead of before the battle is triggered will only change the name after the "Enemy Emerged" text, so the old name will display at first unless you change something.

You can, of course, use this script call in the troop event itself to keep changing the name of the enemy, if you need it.

Keep in mind, this changes the enemy's name, not a specific troop member's name, so if you have more than one copy of this specific enemy in the troop, they will all share the new name.

If you want to change the enemy's name specifically to the value of a variable, than use something like this, just change the 20 to the enemy's Id and the 1 to the Variable's Id.

Code:
$dataEnemies[20].name = $gameVariables.value(1);


As for changing a specific troop member's name, those are stored in a const array (so, they aren't able to be redeclared), so I guess that would most likely require some code changes via a plugin. Shouldn't be hard though.
Hello, this Plugin I made allows to use text escape codes anywhere in the database:

What a great community! Thank you @TSR and @Beregon you both have solved my problem (and added some new possibilities to my game) in record time!

Original thread: https://forums.rpgmakerweb.com/threads/dynamic-enemy-battler-names-from-variables.129904/