Hi~~
I want to have a learned skill "enabled" when equip a weapon/armor,
otherwise the skill will be showed but "disable"
I had searched for many plugins, but just cannot figure out
Any recommend or hint?
Thanks
In database chose weapon > add traits > tap skill > add skill
yanfly skill core
put this in its notetags
<Custom Requirement>
value = false;
for (i = ; i < user._equips.length; i++) {
if (user._equips._dataClass == 'armor' && user._equips._itemId == 1) value = true;
}
</Custom Requirement>
you can change 'armor' to weapon.
you can change the item id to its Id.
In the skill tab of the database, at the bottom you can set equipment type requirements for each skill.
you can do it with weapons require but not armors
database > skills > required weapon
you need try yanfly skill core 😉
<Custom Requirement>
value = false;
for (i = 0; i < user._equips.length; i++) {
if (user._equips._dataClass == 'weapon' && user._equips._itemId == 1) value = true;
}
</Custom Requirement>
my bad, this is the right one.
did the user have the weapon id 1 equip?
<Custom Requirement>
value = false;
for (i = 0; i < user._equips.length; i++) {
if (user._equips._dataClass == 'weapon' && user._equips._itemId == 1) value = true;
}
</Custom Requirement>
try this one