Seeking to Show/Hide Skills Based on Equipment

Hello fellow builders.

I am looking for something specific.

I am looking for a way for the Battle Menu to only display skills that the actor can actually use (based on weapon type).

For example, in my project, one character functions very much like a Blue Mage from Final Fantasy. He learns special skills by seeing the enemy use them. Specifically, weapon skills. So this actor develops a library of skills corresponding to a wide range of weapons. Now, in the field menu, all of those skills should be displayed as usual. But, ideally, in battle, it would only show the skills he can use, based on the weapon he has equipped.

I've been looking around for a way to do this, but haven't come up with anything.
I'm somebody out there may know a way to make this possible.
You can do it using Yanfly's skill core, and the following notetag, but it impacts both the field and battle menu:

Where X = weapon type required for the skill
Y = slot (0 for Main hand, 1 for off hand when dual wielding, 2 for shield (I think))


Code:
<custom show eval>
console.log(user.actorId())
var wepTypeId = X;
var equipMainhand = user._equips[Y];
var mainhandId = equipMainhand._itemId;
var MainWeaponType = $dataWeapons[mainhandId].wtypeId;
if (MainWeaponType == wepTypeId){
visible = true;
} else {
visible = false;
}
</custom show eval>
Hm.
Is there a way I could have the script deactivate when I open up the main menu? And activate again when the main menu is closed?
That would be totally perfect.
I don't think so - it goes in the skill's notetag, which is read by the engine upon game start.

Original thread: https://forums.rpgmakerweb.com/threads/seeking-to-show-hide-skills-based-on-equipment.85097/