Yanfly learn skill engine

Zero0018

Apprentice
Member
Joined
Dec 24, 2014
Messages
133
Reaction score
1
First Language
English
Primarily Uses
Using this script I have all the skills to be able to be learned by JP through the menu. I have another system that upgrades spells based on usage. Each spell has a variable tied to it and each cast calls a common event that adds +1 to that variable. When said variable hits a constant # the common event makes the actor forget the rank I spell and learns the rank II spell. 

Now the problem I am having is when the rank I spell is forgotten, it becomes available to purchase again with JP. How can I make it so rank I spells (after they've been purchased with JP) won't show up as an item to be learned OR show status as "learned" in the JP menu?
 
Last edited by a moderator:

Zero0018

Apprentice
Member
Joined
Dec 24, 2014
Messages
133
Reaction score
1
First Language
English
Primarily Uses
Really need some help with this. As it stands, my game won't work the way I want it to.
 

FeaR616

Veteran
Veteran
Joined
Nov 22, 2014
Messages
277
Reaction score
52
First Language
german
Primarily Uses
as I look on the linked site, one of the instructions says you can set up a switch to be required to learn the skill.

<learn require switch: x>why don't you use it the other way? if your character learns the rank II skill, toggle the switch OFF for the rank I skill, so it is not available in the learn skill menu.

I didn't test that, but I would try this.
 

Zero0018

Apprentice
Member
Joined
Dec 24, 2014
Messages
133
Reaction score
1
First Language
English
Primarily Uses
Wouldn't this require an individual switch for each spell? Is there another way to do it?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Wouldn't this require an individual switch for each spell? Is there another way to do it?
Probably. I'd just use switches 4001 to 4999 for that purpose then.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
Couldn't you use the <learn require eval> tag to specify the condition for not showing the skills?

Edit: Turns out you can!

Put this in the notetag for level 1 of the skill (the one you can learn from the menu):

<learn require eval>

!@actor.skills.include?($data_skills[id of level 2]) && !@actor.skills.include?($data_skills[id of level 3])

</learn require eval>

 

This assumes a 3-level skill. If you have fewer, you only need the first bit. If you have more, just add more && conditions.
 
Last edited by a moderator:

Zero0018

Apprentice
Member
Joined
Dec 24, 2014
Messages
133
Reaction score
1
First Language
English
Primarily Uses
Couldn't you use the <learn require eval> tag to specify the condition for not showing the skills?

Edit: Turns out you can!

Put this in the notetag for level 1 of the skill (the one you can learn from the menu):

<learn require eval>

!@actor.skills.include?($data_skills[id of level 2]) && !@actor.skills.include?($data_skills[id of level 3])

</learn require eval>

 

This assumes a 3-level skill. If you have fewer, you only need the first bit. If you have more, just add more && conditions.
!! That's awesome. Thanks. There are 5 ranks of each skill. Rank 1 can only be bought from the menu with JP. Using that tag is that all I need to do?

Update:

When I add that notetag to any rank 1 skill I get the error attached.

1.png
 
Last edited by a moderator:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,959
First Language
English
Primarily Uses
RMMV
What are you actually putting in the square brackets? I only put "id of level X" as a helpful message to you; it should only contain the number for the skill's ID.
 

Zero0018

Apprentice
Member
Joined
Dec 24, 2014
Messages
133
Reaction score
1
First Language
English
Primarily Uses
/facepalm duh. lol. Thanks!
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

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,862
Messages
1,017,049
Members
137,569
Latest member
Shtelsky
Top