Yanfly Skill Learn System, Lunatic Mode Help

Hey guys, I was wondering if anyone with Javascript knowledge could lend a hand.


Using Yanfly's Skill Learn System you can set a skill to require another skill through the tag <Learn Require Skill: x>. What I am looking for is the ability to learn a skill if one or more skills have been learned. Something like <Learn Require Skill: x or y>. 


Would someone mind telling me what I need to put in the section shown below? Thanks! (Any suggestions on where to learn Java would be nice too, I had just started learning rgss before we moved to java.)


<Learn Require Eval>
value = true;
value = false;
</Learn Require Eval>
That would look something like this:


<Learn Require Eval>
if (user.isLearnedSkill(ID1) || user.isLearnedSkill(ID2) ) {
value = true;
} else {
value = false;
}
</Learn Require Eval>


Replace ID1 and ID2 with the IDs of required skills.


The double pipe "||" means of OR.


If wou want to check more skills, just add "|| user.isLearnedSkill(ID)" right before the last closing parenthesis ")"


This is JavaScript, not Java. Those two are different languages.


For learning, you should take a look through the Learning Javascript section of this forum.
Kiriseo, thank you so much for the reply. This will help me out a lot. I found a decent page to teach me Javascript (I had time last night to research and found the difference between the two, and learned that || is the or operand, but that was about it). I was a work study for BASIC programming, so I am hoping to pick up Javascript. Thanks for pointing out a good starting point!
Hi,


I'm trying to make each skill appear only when the pre-requisite has been met and then disappear when the skill is learned.


I've been toying around with bits of code trying to get this to work, sadly to no avail.


Now I can make the skills disappear after they are learned with this code:


<Learn Show Eval>
if(!this._actor.isLearnedSkill(7)) value = true;
else value = false;
</Learn Show Eval>


And I can make the next skill appear once skill 7 is learnt by swapping the true and false around.


So I'm sure at the point I have everything I need but I just can't seem to make the second skill (skill 8) vanish from the list after it's learnt. I've been trying it like this:


<Learn Show Eval>
if(!this._actor.isLearnedSkill(7)) { value = false; }
else value = true;
if(!this._actor.isLearnedSkill(8)) { value = true; }
else value = false;
</Learn Show Eval>


and many variations of that. I'm pretty sure I'm close but just need someone to tell me where I'm going wrong, which { } am I missing? Is there an "else if" supposed to be in there? or am i just spouting gibberish? lol.


Hope someone can help me out. I'd love you eternally!
So I'm sure at the point I have everything I need but I just can't seem to make the second skill (skill 8) vanish from the list after it's learnt. I've been trying it like this:



<Learn Show Eval>
if(!this._actor.isLearnedSkill(7)) { value = false; }
else value = true;
if(!this._actor.isLearnedSkill(8)) { value = true; }
else value = false;
</Learn Show Eval>



try this


<Learn Show Eval>
if(!this._actor.isLearnedSkill(7) || this._actor.isLearnedSkill(8)) { value = false; }
else value = true;
</Learn Show Eval>


With that, the skill should only be shown when the actor has learned skill 7, but not skill 8.
@kiriseo Congratulations you just won my eternal love! lol


Thank you SOOOOOOOO Much, that works!

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-skill-learn-system-lunatic-mode-help.55695/