Yami Skill Equip: unequip through script call

Hello. I have this character in my game that gains an additional skill based on the weapon he has equipped. For example: if he has fire rod equipped, he will have Fire Ball skill available. If he removes fire rod, then he loses Fire Ball.

The problem is that I am having problems with this mechanic, because I also use Yami Skill Equip. Suppose the following process:

1) Eric equips Fire Rod and now he has Fire Ball available.
2) Eric equips Fire Ball through Yami Skill menu
3) Eric unequips Fire Rod and Fire Ball isn't available anymore.

If things were to occur accordingly, this would automatically unequips Fire Ball too, since the skill is not available. But this is not what happens, Eric keeps the Fire ball equipped although the skill isn't available anymore.

Is there a way to forcibly unequip a skill using Yami's script?
Is there a way to forcibly unequip a skill using Yami's script?
It does that by default.
If the Fire Rod is unequipped, then the skill is removed.
Not sure if it's the script or the default process.
Unless you have something that is giving the skill to the actor that is not the normal process.
Equip item -> feature says add skill -> skill available.
Unequip item -> actor refreshed -> skill removed.
It does that by default.
If the Fire Rod is unequipped, then the skill is removed.
Not sure if it's the script or the default process.
Unless you have something that is giving the skill to the actor that is not the normal process.
Equip item -> feature says add skill -> skill available.
Unequip item -> actor refreshed -> skill removed.
Humm... It did not work here. But I realized I was overcomplicated this. In the context of my game, I can just have my character learn all weapon related skills a priori, but make each ability to require a certain weapon type in the database. I'm such a dumb dumb

Original thread: https://forums.rpgmakerweb.com/threads/yami-skill-equip-unequip-through-script-call.162691/