MZ Learn Skills from Equipment

In the game I'm working on, I wanted to be able to make it so that characters could learn the skills off of equipped weapons/armor and then know them permanently (kind of how Tales of Vesperia's weapon skill system works), but all of plugins I've been able to find that allow this are either for MV or don't cooperate with Visustella.

Current flow I want to implement:
1. Character does not know skill(s)
2. Character equips weapon, accessory, etc.
3. Character now knows skill(s), but does not know it permanently
4. Character performs a certain action, or kills a number of enemies, or participates in a number of battles, or gains some resource (sp, etc.)
5. Character meets the requirements and learns the skill(s) on the equipment
6. Character removes equipment and still knows the skill(s)

Any help is appreciated, thank you in advance.
I think you can do this vanilla, just adding the skills to the equipment pieces directly.
Í think you can do this vanilla, just adding the skills to the equipment pieces directly.
That is the OP's step 3. It does nothing to address the entire rest of the process.

@LurkatonHammer If you have VisuStella plugins, you can do this pretty simply. Give each skill-teaching item its own passive state. In that passive state, put a notetag for...whatever you decide you want your condition to be.

If you want it to be a certain number of actions in battle, use JS Post-End Action. Inside the notetag just increment a variable on the actor. When it hits whatever you want, make it teach them the skill.

For example:
Code:
<JS Post-End Action>
user.learnFireball=user.learnFireball || 0;

user.learnFireball++;

if (user.learnFireball==25)
    user.learnSkill(id_of_fireball_skill_here);
</JS Post-End Action>

If you want to add stuff like a pop up message about learning the skill, do so. You could put it directly in that notetag or you could have an autorun event on your maps that checks for actors to know any different skills after each fight.

The only part of this you might need to consider requesting from anyone is if you want to see a display of the learned progress when you're looking at items - the way Final Fantasy 6/9/etc. have a little gauge attached to equipment.

But there are some generic plugins that allow you to display things like custom variables that might work for that, too.

Edit: Have you already considered this plugin?
I took a look at that plugin, but it looks like it's incompatible with Visustella and hasn't been updated in over a year. I tried it anyway and couldn't get it to work at all, which is a shame since it greatly resembles what I'm looking for.
I wanted to try that visustella code but I'm getting a 'syntax unexpected number' error while using that on a state, I'm gonna trouble shoot that later cause it looks like a pretty straightforward way to implement it.
That is the OP's step 3. It does nothing to address the entire rest of the process.

@LurkatonHammer If you have VisuStella plugins, you can do this pretty simply. Give each skill-teaching item its own passive state. In that passive state, put a notetag for...whatever you decide you want your condition to be.

If you want it to be a certain number of actions in battle, use JS Post-End Action. Inside the notetag just increment a variable on the actor. When it hits whatever you want, make it teach them the skill.

For example:
Code:
<JS Post-End Action>
user.learnFireball=user.learnFireball || 0;

user.learnFireball++;

if (user.learnFireball==25)
    user.learnSkill(id_of_fireball_skill_here);
</JS Post-End Action>

If you want to add stuff like a pop up message about learning the skill, do so. You could put it directly in that notetag or you could have an autorun event on your maps that checks for actors to know any different skills after each fight.

The only part of this you might need to consider requesting from anyone is if you want to see a display of the learned progress when you're looking at items - the way Final Fantasy 6/9/etc. have a little gauge attached to equipment.

But there are some generic plugins that allow you to display things like custom variables that might work for that, too.

Edit: Have you already considered this plugin?
I wanted to try that visustella code but I'm getting a 'syntax unexpected number' error while using that on a state
When you're reporting errors, please post screenshots of the actual error message. Make sure to press F8 and go to the Console tab to get the full error trace.

Also post a screenshot of how you have the notetag entered - that's a weird error, and usually means you've mistyped something.

Original thread: https://forums.rpgmakerweb.com/threads/learn-skills-from-equipment.149784/