[SOLVED] Armor Database/Index for Armor Skills and Passives

I'm a bit of a stranger to Java and programming in general, but I plan on having both weapon and armor skills for certain actors which can be learned or upgraded, such as being highly skilled with Bows but not Crossbows and that sort. Currently, I've utilized some of Yanfly's plugins such as Passive States, which is what I needed to replicate the Weapon Passives which can be found here: http://www.yanfly.moe/wiki/Weapon_Mastery_Passive_(MV_Plugin_Tips_&_Tricks)
What I'm requesting is information on which of these variables or places in the code I need to change and what to change them to in order to have a similar effect with Armor Passives which trigger whenever the user equips a specific type of armor. Thanks for the help!

To clarify, the script Yanfly made for weapon passives is:
<Custom Passive Condition>
// Get all currently equipped weapons for the user.
var weapons = user.weapons();
// Set the swords variable.
var swords = 2;
// Set the initial condition to be false.
condition = false;
// Loop through each of the weapons.
for (var i = 0; i < weapons.length; ++i) {
// Get the currently looped weapon.
var weapon = weapons;
// Check if the weapon exists and if the weapon type ID matches the sword ID.
if (weapon && weapon.wtypeId === swords) {
// Set the condition to be true.
condition = true;
// Break the loop.
break;
}
}
</Custom Passive Condition>

And the script I tried to use was:

<Custom Passive Condition>
var armors = user.armors();
var lightarmor= 1;
condition = false;
for (var i = 0; i < armors.length; ++i) {
var armors = armors;
if (armor && armor.atypeId === lightarmor) {
condition = true;
break;
}
}
</Custom Passive Condition>
I figured it out! For those of you who might find this later, the code I've inserted into the state notebox for, in this example, Light Armor Mastery goes as such:

<Custom Passive Condition>
var armors = user.armors();
var light = 3;
condition = false;
for (var i = 0; i < armors.length; ++i) {
var armor = armors;
if (armor && armor.atypeId === light) {
condition = true;
break;
}
}
</Custom Passive Condition>


---
As it turns out, I forgot to include the "" stitch in the above examples I gave, as well as a few other issues I discovered after I found an index site:
which seriously helped me out. To anyone who plans on using a similar system for your game, I hope this
post helped!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-armor-database-index-for-armor-skills-and-passives.126084/