Check if leader have a specific skill

Hi, I want to put a conditional brench that check if the current team leader have a specific skill.
Idealy that will be a script condition, but im hoppen to all suggestion.

It's for us inside HIME custum page condition.
Thanks.
$gameParty.leader().hasSkill(id)

where id is the skill id with no leading zeros.


You will learn a lot by checking the rpg_objects.js file. Search for Game_Interpreter.prototype and then anything after that is what sits behind the event commands. So if you can do something with an event command, search for the command name in that file, and you will see the code that it runs. For example, there is a check in the conditional branch to see if a certain actor has learned a certain skill. So you find the Conditional Branch code, then read through it to see where it checks for the actor having the skill. You don't want to use a specific actor, but the party leader, so where the script has actor you just substitute $gameParty.leader() instead.

You ask a lot of questions where I go to that part of the script to find the answer, so I'm sure you'll gain a lot by taking a look through it - doesn't matter if you don't understand it all - just seeing what's there, and going back to it each time, will help you understand it bit by bit 🙂
$gameParty.leader().hasSkill(id)

where id is the skill id with no leading zeros.


You will learn a lot by checking the rpg_objects.js file. Search for Game_Interpreter.prototype and then anything after that is what sits behind the event commands. So if you can do something with an event command, search for the command name in that file, and you will see the code that it runs. For example, there is a check in the conditional branch to see if a certain actor has learned a certain skill. So you find the Conditional Branch code, then read through it to see where it checks for the actor having the skill. You don't want to use a specific actor, but the party leader, so where the script has actor you just substitute $gameParty.leader() instead.

You ask a lot of questions where I go to that part of the script to find the answer, so I'm sure you'll gain a lot by taking a look through it - doesn't matter if you don't understand it all - just seeing what's there, and going back to it each time, will help you understand it bit by bit 🙂
Thans for the info, I will look this file too now. You answer my question thanks.
By the way, I did't find the option "solved" after then new forum update, where I need to go for mark as solved?
To have a thread closed, you need to report the first post and ask the mods to close it. That was the process that was meant to be followed on the old forums too. The 'mark as solved' button was a pain as it changed the sequence of posts and threads no longer made sense.
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/check-if-leader-have-a-specific-skill.74527/