MV Request for a JS tag in Yanfly's Skill Learn plugin.

I'm using Yanfly's Skill Learn plugin and am looking to change a condition to be able to learn an ability. There is a Javascript tag you can add to make it so that the code inside must be true to unlock this skill
<Learn Require Eval>
value = true;
value = false;
</Learn Require Eval>
For those who wish to use their own custom requirements using code. This
must return value as true in order for the skill to appear to be
learnable. Avoid using comments that may potentially block out further
code.

I'm looking to make it so an actor must have unlocked X amount of skills in that class before being able to unlock this skill.

Thanks for your consideration in helping me~
You'll need to word the requirement in a way that means something in the context of MV's engine.

1 - There's no such thing as "unlocking" a skill. Do you mean that the actor must have learned X number of skills?

2 - There isn't any inherent association between a skill and a class, so "amount of skills in that class" doesn't mean anything by itself.

You can look at skills that belong to a skill type, or if you're using notetags to define which skills can be learned by a class, you can share that notetag.
1 - With this plugin it allows you to set skills that a class can learn, and then you can spend Job Points or gold to learn them. By unlocking I meant learning, just the wrong syntax.

2 - With this plugin you assign skills that are able to be learned with note tags in the class section of the database. You can then add a note tag <Learn Require Skill: x> which will make the skill with this tag, also require skill X to be learned. What I am attempting to do is to make it so that instead of having a specific skill required, it instead requires the player to have learned X amount of the available skills that are learnable by that class to learn it.

So for example, if you are in the Fighter class, say you have the skills Attack 1, Attack 2, Attack 3, and Attack 4 that can be learned. With the default note tags I could have it so that to learn Attack 4, you must have previously learned Attack 2 with the notetag inside attack 4: <Learn Require Skill: Attack 2>. Instead of this however, I'd like it to require you to have learned 2 of any of the skills that class is able to learn. With the previous way, you'd have to define which skills specifically to have learned before hand. With the way I'd like though, it would only require that you have learned any 2. This way it doesn't matter which skills you learn specifically, only that you've learned a certain amount of the skills all together. There is no notetag for this specifically, but there is a note tag that allows you to add Javascript that when true, the skill will be available to be learned.

So using
<Learn Require Eval>
value = true;
value = false;
</Learn Require Eval>
With the true value = to having X amount of the available skills to X class learned, should allow you to learn the skill.
Yes - all of the stuff with you explaining how the plugin works is not useful. I'm familiar with how it works, anyone who wants to help you can read the documentation. 😉

Instead of all of that extra stuff, you might have done:
if you're using notetags to define which skills can be learned by a class, you can share that notetag.

But you didn't, so I can't give you the exact code that you're asking for 😛

But the general syntax will be this:
Code:
<Learn Require Eval>
value = [4, 10, 22, 69].filter(skillId => user.isLearnedSkill(skillId)).length >= 2;
</Learn Require Eval>

Replace the numbers listed in brackets with all of the skills that class can learn. Change the number at the end of the line to how many you want the actor to have learned for this skill to be available.
Code:
<Learn Require Eval>
value = [4, 10, 22, 69].filter(skillId => user.isLearnedSkill(skillId)).length >= 2;
</Learn Require Eval>
This works perfectly, thanks for the help @ATT_Turan !

Original thread: https://forums.rpgmakerweb.com/threads/request-for-a-js-tag-in-yanflys-skill-learn-plugin.168493/