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

DarrelOdin

Warper
Member
Joined
Mar 24, 2023
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMVXA
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.
 

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
45,990
Reaction score
16,776
First Language
English
Primarily Uses
RMMV
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.
 

DarrelOdin

Warper
Member
Joined
Mar 24, 2023
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMVXA
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!
 

Latest Threads

Latest Profile Posts

It's Sunday. Stop working and take a break. Relax a little.
Ooops ended up trying out making my own A2 tile page instead of testing doors everywhere. Went well so far I think.
I guess I'm done making a blue squirrel's life difficult for posting new threads on different forums.
That's just for today so don't get used to this, squirrel-ish friend! :p
Got new hard drive, now trying to install the softwares I lost to the dead drive, and more than half of them won't install because they're already installed on the dead drive, and uninstallers won't run because they can't find where their programs are installed. So I take it having a drive die on you screws you in more ways than just data loss. >:\
PC got fixed finally. Back online again. Turns out I have no business trying to self repair pcs because it was getting to like 176F / 80C. Shop installed a totally new cooling system and now it runs fine and is super quiet.

Forum statistics

Threads
131,487
Messages
1,220,217
Members
173,225
Latest member
ZecaVn
Top