need help with locking a skill when specific weapon isnt equipped

Hello all, I'm using a few different Yanfly plug-ins in this situation.

Mainly the extensions ChangeBattleEquip and EquipBattleSkills.


I was wondering if a skill is learned through equipping a weapon and selected for a Battle Skill.
Then during battle switching out of that weapon into a different same type weapon, will grey-out or lock that certain skill that was learned from equipping the initial weapon?

Upon re-equipping the specific weapon in battle the skill would unlock again. Is this possible?
So in skills you got "Required weapon" types

You can set up 1 of 2 weapons to be required to use it.

For the Actor, I let's assume his using swords.

Give him 2 traits. One to equip swords and the 2nd to equip that weapon with the skill, let's call it "Special Skill"

Make the sword with the skill, make the weapon type "Special Skill"

then go into skills and make that skill "Required Weapon" => "Special Skill"
Make the sword with the skill, make the weapon type "Special Skill"

then go into skills and make that skill "Required Weapon" => "Special Skill"
since theyre using yanfly's equip battle skills plugin, the circumstance is different i think. i never looked to see what happens when you have a skill via trait, but as a baseline, the plugin makes it so that skills cannot be used in battle unless theyre equipped via its own menu, creates its own "skill type" that only includes equipped ones, and stops all the regular skill types from showing up in the actor menu in combat.

I was wondering if a skill is learned through equipping a weapon and selected for a Battle Skill.
Then during battle switching out of that weapon into a different same type weapon, will grey-out or lock that certain skill that was learned from equipping the initial weapon?

Upon re-equipping the specific weapon in battle the skill would unlock again. Is this possible?

OP seems to be asking what happens when a weapon that grants a skill is equipped with the plugin, and also how it handles weapons changing, to which id say... if you already have the plugins, then try it out and see what happens?

I dont remember exactly how the plugin works, but skills gained by traits arent "learned" and might not be visible in that menu because of that. if they do, i know the plugin when it refreshes battlers removes skills that are no longer equippable, but i never looked at what exactly that entailed.

you havent really highlighted a problem that needs to be looked at yet. if you didnt have the plugins and were asking how it works itd be one thing, but you have the plugins and can see for yourself, no? If it doesnt work the way you want it to, then say what it does and how you'd like it to work thats different from what its already doing
Sorry if i didn't explain it in enough detail. Say I have two swords, Sword 1 and Sword 2. When equipping Sword 1, through the traits I Add Skill - Slanted Strike. It automatically shows up when equipped.

With the BattleEquipSkills plug-in I can select Slanted Strike out of a skill pool. While in Battle with Sword 1 equipped I may use Slanted Strike.

During Battle I can also switch weapons mid fight. Now say I switch into Sword 2 mid fight. Slanted Strike is still in the move pool(which I want) and I'm able to use it with Sword 2(which i don't want.)

I was wondering if there is a way to lock Slanted Strike basically with any Sword that isn't Sword 1.
During Battle I can also switch weapons mid fight. Now say I switch into Sword 2 mid fight. Slanted Strike is still in the move pool(which I want) and I'm able to use it with Sword 2(which i don't want.)
To me, that's a bug due to an unexpected use of those two plugins combined. If you lose access to a skill via a trait being removed, it should be removed from your equipped skills.

I was wondering if there is a way to lock Slanted Strike basically with any Sword that isn't Sword 1.
Use Skill Core requirement notetags.

Code:
<Custom Requirement>
value = user.weapons().includes($dataWeapons[ID]);
</Custom Requirements>

Where ID is the ID of your Sword 1 (no leading zeros).

Edit: The patch notes for Equip Battle Skills 1.10 says this was addressed. What version of the plugin are you using?
That custom requirement didn't work. Though i got the idea of greying out the skill with a passive state and using another custom requirement.


<Custom Requirement>
if (user.isStateAffected(X)===true) {
value = true;
} else {
value = false;
}
</Custom Requirement>



It works now as I intended.

I'm using BattleSkillEquip v1.09 to make this work.
That custom requirement didn't work.
It should - it works for me.

I'm using BattleSkillEquip v1.09 to make this work.
That's why you're having the issue in the first place. That's a severely outdated version of the plugin - it doesn't even have the updated code to be compatible with MV version 1.5.

If all of your Yanfly plugins are that old, you are likely to run into more issues. And if your MV project itself is running an obsolete version, you have bugs in the game engine itself that were later fixed.

You can check your project version by opening rpg_core in a text editor and looking at the top. The current version is 1.6.2.

It's strongly recommended that you update your project code and all plugins to their latest versions so that everything is working correctly.
I have archived most the plug ins, all of Yanfly plug-ins are up too date except Battleskillequip. I originally was using 1.10 though I didn't want the skills to be removed from the Battle Skill list when switching weapons just incase the player decides to switch back mid fight.

Not all of my weapons have added skills attached to them, only a few.

Every small adjustment I make sure everything still works as intended.

If I run into any other issues I'll come back to the forums.

I thank you very much for your replies and help. Hope you have an awesome day. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-locking-a-skill-when-specific-weapon-isnt-equipped.170573/