Hiding Skills - Yanfly plugin

Sarah_yt

Veteran
Veteran
Joined
Oct 25, 2015
Messages
75
Reaction score
90
First Language
English
Hi guys,

I'm trying to set up a skill tree system where you start with a base skill, with several chances to upgrade as the game progresses. Each time you upgrade, you get two choices on how to upgrade it but choosing one will block off the other path.

E.g.
Skill 20 = base
Skill 21 = 1st upgrade available choice(a)
Skill 22 = 1st upgrade available choice(b)
...

Learning skill 20 will cause that to disappear from the list, making skills 21 and 22 appear as choices (already got that bit down pat). But when I go to choose either 21 or 22, the other doesn't disappear.

I'm using Yanfly's Skill Learn plug in and have read similar posts, but I can't figure it out. Here's the code I've been using:
<Learn Show Eval>
if(!this._actor.isLearnedSkill(20) || this._actor.isLearnedSkill(21) || this._actor.isLearnedSkill(22) { value = false; }
else value = true;
</Learn Show Eval>

And here's the error that pops up.
SkillLearnerror.PNG

EDIT: Whoops, forgot to ask - I think it could be fixed by including a check in Skill 21 to see if the actor has not learned skill 22 (and visa versa) but I don't know how to get the program to run that check.

Many thanks for your help!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,789
Reaction score
14,016
First Language
English
Primarily Uses
RMMV
There's a missing ) after checking for skill 22. That's why it's telling you the { is unexpected - you haven't finished the condition yet.

I see you have some different versions of the formula showing up there. All of those need an extra ) after skill 22. Some of them have 2 and need 3, some of them have 1 and need 2.
 

Sarah_yt

Veteran
Veteran
Joined
Oct 25, 2015
Messages
75
Reaction score
90
First Language
English
XD Thank you so much! I added the ) and it works perfectly :D gotta love a second pair of eyes.

EDIT: It solved the issue of appearing in the 'Learn Skill' section, but it didn't hide it from the battle or skill menu screen.

I've gone back to experimenting with Yanfly's basic Skill Core plugin, but the 'Hide if Learned Skill: ...' note never seems to work. Here's a picture:
YanflySkillCore.png

PS: I changed the title of the thread to better reflect the issue I was having. Sorry if this caused any confusion.
 
Last edited:

Sarah_yt

Veteran
Veteran
Joined
Oct 25, 2015
Messages
75
Reaction score
90
First Language
English
I think I figured it out - the issue was with <Hide if Learned Skill: x to y>. If I just used <Hide if Learned Skill: x>, it works perfectly - even with the <Learn Show Eval> note tag too. Woot!

Thanks again for your help Shaz!

If anyone is interested in seeing more, I can upload some screenshots demonstrating what I mean.
 

ncoleman05

Warper
Member
Joined
Apr 24, 2020
Messages
3
Reaction score
0
First Language
English
Primarily Uses
RMMV
I think I figured it out - the issue was with <Hide if Learned Skill: x to y>. If I just used <Hide if Learned Skill: x>, it works perfectly - even with the <Learn Show Eval> note tag too. Woot!

Thanks again for your help Shaz!

If anyone is interested in seeing more, I can upload some screenshots demonstrating what I mean.

Hey man,

I know this thread is old, but I'm learning the YanFly plugin system and am going for skills that get better when you learn the upgraded version (Slash 2.0 vs. Slash 1), but cannot get the Skill Learn to hide the old skill when it is upgraded. Any thoughts? I can send screen shots, but am interested in what you had found for your game as well.
 

Latest Threads

Latest Posts

Latest Profile Posts

Making Houses and Outside on the same map with RPG Maker MV!
Do people actually use buff/debuff function?
Ami


Imagine you (as Miner) Sleep in the Cave,the other side is a Bunch of Golds,how d'you feel?
finally got footage of my main character running around his corrupted street...
I finally got the ships and water to flow like I wanted to~ the canals are a success. Now to loop the animation for the kites. So many kites.

Forum statistics

Threads
107,700
Messages
1,031,523
Members
139,834
Latest member
harukazu
Top