YEP_SkillLearnSystem

Hello.

I am using RPG Maker MV and using Yanfly's Skill Learn System plugin.

I am trying to make a skill on available to be learned after casting a spell x amount of times.
(For example, Fire II and only be learned if Fire is cast 10 times)

I am new to RPG Maker and do not know how to do much, yet.



I made a common event called "Using Fire"which uses control variables. It adds one to the variable I created, called "Fire Used."
In the skill "Fire," I added an event which I selected common event "Using Fire."

I created an event, that is basically a quest (I did this as a verification that the switch was on).
The guy asks you if you wanna do a quest; saying yes trigger Control Switch 1, called "Fire Accept." He then says cast Fire twice (kept it low for testing).
He then asks if you have, saying yes has a conditional branch checking if the variable "Fire Used" is greater than or equal to 2.
If the check is met, it turns on Control Switch 2, called "Fire Fin."
I have another page which has the condition of switch 2, "Fire Fin" and he just says Good Job.

So If I go through all that, and see that last page then that means that Switch 2 is on as well as Switch 1.

I can make Fire II available to be learned using switch 1 or 2 in this way.



However, I want the spell to be able to learn the skill without doing a quest.
So, I created another event that just has a conditional branch checking if the variable "Fire Used" is greater than or equal to 2 which turns on Switch 3, called "Fiirree."
If I make this autorun or parallel, then I cannot move on that map. If I move it to another map, or chose one of the other 3 triggers, then I cannot learn Fire II after casting 2 Fire skills.


Sorry for the long winded post, but I wanted to describe my efforts so far to show what I have done. Although I may be going in the completely wrong direction..
I guess my question is, how do I make a switch that will count how many times a skill is used without needing player interaction?
This sort of thing is very challenging in RPG Maker by default. If you're new, it's extremely difficult. Eventing may not help you, especially if you're planning on using more than 1 actor, since you'll need a different variable to monitor each one. I have a few ideas to make this work, but you'll need a few other Yanfly plugins, specifically these 3:

http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/
http://yanfly.moe/2015/10/13/yep-8-skill-core/
http://yanfly.moe/2015/10/17/yep-13-auto-passive-states/

A lot of this will be done in the state (but in all honesty, a custom plugin would probably be a better option). In a passive state, which will be given to all actors through the Auto Passive States plugin (set in the plugin parameters, NOT through notetags), you'll set a bunch of variables when the state is applied. The state notebox should look something like this:

<Custom Apply Effect>
user._fireUses = user._fireUses || 0;
user._iceUses = user._iceUses || 0;
</Custom Apply Effect>

Repeat for each skill you want to do this way. In each skill notebox, add this:

<After Eval>
if (user.isActor()) {
user._fireUses += 1;
}
</After Eval>

Finally, in the skill notebox for the skill to learn, add this:

<Learn Require Eval>
value = user._fireUses >= 10;
</Learn Require Eval>

But like I said before, it's a very tricky thing to do in RPG Maker by default. If you're inexperienced, I wouldn't even attempt this.
Thanks!

I downloaded the other plugins and installed them. And I added those notetags into the places suggested and added the state I created as an auto passive state.

In game, I have the state on my characters, although I am not sure if the count is working when I cast fire. I don't know if there's a way to verify the count is working?

But adding that last notetag to the skill to be learned is not working. The skill to be learned is already learnable as soon as I enter the game. Any suggestions on that part on my issue?
Thanks!

I downloaded the other plugins and installed them. And I added those notetags into the places suggested and added the state I created as an auto passive state.

In game, I have the state on my characters, although I am not sure if the count is working when I cast fire. I don't know if there's a way to verify the count is working?

But adding that last notetag to the skill to be learned is not working. The skill to be learned is already learnable as soon as I enter the game. Any suggestions on that part on my issue?

If you want to monitor the number of times an actor has used a skill, you'd be better off making a custom plugin and adding a function that checks that. In that case, rather than using the state method, you can actually add the necessary code directly in the plugin so that it can do anything you want it to. It's a lot of work, but that's the best, most organized way to do this.

As for the learning issue, I only made it so that it requires that statistic to learn the effect; it will show in the menu even if you can't learn it. If you don't want it to show, add this to the skill:

<Learn Show Eval>
value = user._fireUses >= 10;
</Learn Show Eval>

Honestly, I wouldn't even attempt the system you're trying to make unless you're experienced in programming. If you're not, you should either learn more programming skills or scrap the system and use a new one. Don't wind up shooting yourself in the foot with a system you can't effectively implement.

Original thread: https://forums.rpgmakerweb.com/threads/yep_skilllearnsystem.86174/