I'm working with Yanfly's "skill core" plugin. I need to make sure that for a skill to be cast by the character, the character must have armor. I saw that in the guide there is the following code to insert in the notes:
<Custom requirement>
if ($ gameParty.gold ()> 1000) {
value = true;
} else {
value = false;
}
</ Custom requirement>
Well, instead of "$ game.Party.gold", how do I write that that armor is needed?
I have already asked something similar, a user replied but unfortunately the code he wrote me does not work. I can't tell him because a moderator has closed the thread.
The code he recommended to me is:
<Custom requirement>
value = user.isEquipped ($ dataArmors [1]);
</ Custom requirement>
By "it doesn't work" I mean that regardless of whether the character is equipped with this armor or not, he can still cast the ability.
I then tried to rewrite the original code by replacing "$ game.Party.gold" with "$ gameParty.numItems ($ dataArmors [1])", but that doesn't work either. That is, instead of "param1" I wrote 1, that is "the indicator" of the necessary armature (in the database this armature corresponds to the first row). As expected, if the character doesn't equip it, he can't cast the ability, but, even when he wears it, the ability can't be cast. So what is the right code to enter?
<Custom requirement>
if ($ gameParty.gold ()> 1000) {
value = true;
} else {
value = false;
}
</ Custom requirement>
Well, instead of "$ game.Party.gold", how do I write that that armor is needed?
I have already asked something similar, a user replied but unfortunately the code he wrote me does not work. I can't tell him because a moderator has closed the thread.
The code he recommended to me is:
<Custom requirement>
value = user.isEquipped ($ dataArmors [1]);
</ Custom requirement>
By "it doesn't work" I mean that regardless of whether the character is equipped with this armor or not, he can still cast the ability.
I then tried to rewrite the original code by replacing "$ game.Party.gold" with "$ gameParty.numItems ($ dataArmors [1])", but that doesn't work either. That is, instead of "param1" I wrote 1, that is "the indicator" of the necessary armature (in the database this armature corresponds to the first row). As expected, if the character doesn't equip it, he can't cast the ability, but, even when he wears it, the ability can't be cast. So what is the right code to enter?