Yanfly Skill Learn System - Question (about Lunatic code?)

Hello everyone !

I have a little question about a functionnality I would like to add to my game.
I am using the Yanfly's Skill learn system plugin.

I have created three skills, that are three versions of the fire spell. Each version is a bit better than the others.
(it's in fact like : Fire I, Fire II, Fire III)

I have no knowledge in javascript at all, that's why I am asking here : how could I make the Fire I disappear when you've learned Fire II, because you don't need Fire I anymore ?

It would be nice if the Fire I skill could disappear both in the skill learn scene and in combat when you choose your skills.
I guess it won't be too hard to do this. Let's mark Fire 1 as ID 1, Fire 2 as ID 2 and Fire 3 as ID 3 (Skill IDs in database, for example).
So for Fire 1, i think this note tag should help:
Spoiler
<Learn Show Eval>
if (user.hasSkill(2) || user.hasSkill(3)){
value = false;}
else{
value = true;}
</Learn Show Eval>
This will make Fire 1 disappear from Skill Learn window when you have Fire 2 or 3.
If you want to remove lower level skill when you are learning a higher level skill, for example you learn Fire 2 and want Fire 1 to disappear, put this note tag on Fire 2:
Spoiler
<Learn Cost Eval>
user.forgetSkill(1);
</Learn Cost Eval>

or you can simply use this note tag on Fire 1 if you have Yanfly's Skill Core plugin and don't want to play with Javascript:
<Hide if Learned Skill: 2>
This should remove Fire 1 from your skill list, and with that <Learn Show Eval> above, Fire 1 won't appear in your Skill Learn window again. For an easier way to erase a skill from Skill List,

The problem is we are checking user's skills manually, so if you have Fire 10, that "If" would be very long, but i can only help you this much.
Remember to change skills' IDs to fit your purpose.
^ Assuming that you have to learn them in order, then you can just keep using the <hide if learned skill: x> for each skill. It'll remain learnt, but hidden from the menu, so you just need to check whether the skill above is learnt and if so to hide it.

Should work OK with minimal effort?
It works perfectly ! Thank you you both !
I guess it won't be too hard to do this. Let's mark Fire 1 as ID 1, Fire 2 as ID 2 and Fire 3 as ID 3 (Skill IDs in database, for example).
So for Fire 1, i think this note tag should help:
Spoiler
<Learn Show Eval>
if (user.hasSkill(2) || user.hasSkill(3)){
value = false;}
else{
value = true;}
</Learn Show Eval>
This will make Fire 1 disappear from Skill Learn window when you have Fire 2 or 3.
If you want to remove lower level skill when you are learning a higher level skill, for example you learn Fire 2 and want Fire 1 to disappear, put this note tag on Fire 2:
Spoiler
<Learn Cost Eval>
user.forgetSkill(1);
</Learn Cost Eval>

or you can simply use this note tag on Fire 1 if you have Yanfly's Skill Core plugin and don't want to play with Javascript:
<Hide if Learned Skill: 2>
This should remove Fire 1 from your skill list, and with that <Learn Show Eval> above, Fire 1 won't appear in your Skill Learn window again. For an easier way to erase a skill from Skill List,

The problem is we are checking user's skills manually, so if you have Fire 10, that "If" would be very long, but i can only help you this much.
Remember to change skills' IDs to fit your purpose.
good good but this ignoring level for learn skill we can see for learn skill for 10 level.


this best
<Learn Cost Eval>
user.refresh();
$gameActors.actor(x).forgetSkill(y);
</Learn Cost Eval>
this best

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-skill-learn-system-question-about-lunatic-code.79336/