How do you reference a Skill Name in the "Show Choices" Message Event & Teach a Skill with a Script?

As an overview, I am attempting to make a sorta-rogue-like upgrade system. When a foe is defeated, a common event is called to check if the player can upgrade, ascend or learn skills, and offer them a choice of any that are true.

I focused on the Upgrading first, and have successfully gotten the random choices done. However, I am experiencing issues regarding the following:
  • Displaying the randomly selected skill name in the "Show Choices" Message Event

1679618459446.png

I could not find documentation on how to display a skill name in the Choice list, with the skill chosen based on the id stored in the set variable. My thought is it should be \S.name[\V[id]] or something similar, but I keep getting only the # held in the variable displayed instead.
  • Writing the script that teaches the chosen skill to the actor
I must be missing some basic understanding of using a script in RPGMVXA, because from checking out https://forums.rpgmakerweb.com/index.php?threads/how-to-teach-an-actor-a-skill.27887/, this should function to make sure the actor learns the set skill: $game_party.members[1].learn_skill($game_variables[126])

Instead I get an error of "undefined method learn_skill for nil:NilClass" which clearly means something isn't right.

Are there any suggestions, or pointers on what documentation to look for? I sincerely appreciate any help.
By default, you can't do this with Show Choices. That sort of thing is only for messages, and depending on what it is, you might even need a script to enable it.

So, are you using a script to change your choice options?

The leader is $game_party.members[0] not [1] so you will get that error if you only have one person in your party.
Oh! I was unaware of that - in which case, no, I have not set a script up to change the choice options. I shall look into that.

And thank you, I'll correct that too!

Original thread: https://forums.rpgmakerweb.com/threads/how-do-you-reference-a-skill-name-in-the-show-choices-message-event-teach-a-skill-with-a-script.156091/