Check if leader have a specific skill

Status
Not open for further replies.

XGuarden

Veteran
Veteran
Joined
May 10, 2016
Messages
446
Reaction score
17
First Language
French
Primarily Uses
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
$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 :)
 

XGuarden

Veteran
Veteran
Joined
May 10, 2016
Messages
446
Reaction score
17
First Language
French
Primarily Uses
$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?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
[closed]IgnoreMe[/closed]
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top