v20.1 How do I change the player's name to a variable?

This thread pertains to v20.1 of Pokémon Essentials.

Mr. SU

Eternal Meanderer
Sep 17, 2023
Hi! I'm still very new to rpg maker xp and pokemon essentials but I've been testing ideas on coding events and I've been having trouble with one specific thing. There's a character that I want the player to be able to name in the intro that I want the player to be able to play as for a brief section. I know you store the names of npcs as variables however I'm not quite sure how you could call the variable in regards to changing the name of the protagonist with either $Trainer.Name (which I haven't been able to get working) or pbTrainerName("X") (I'm aware this script is destructive but it's right at the start of the game so I don't think it will be an issue).


How do I call a player-inputted text variable to change the protagonist's name to?