- Joined
- Nov 18, 2018
- Messages
- 13
- Reaction score
- 1
- First Language
- English
- Primarily Uses
- RMMV
Hello again. I'm here with another JS question. This time using Yanfly's EquipRequirements Plugin.
I have armors 2-15 that equip to armor slot 2.
I have armors 77-91 that equip to armor slot 7.
I am trying to set a requirement on armors 77-91 that is dependent on 2-15.
E.g. Armor 77 requires the actor has armor 2 equip in slot 2.
Armor 78 requires the actor has armor 3 equip in slot 2.
etc. It follow this pattern.
This is what I have right now. It does not work because my JS/coding knowledge is next to nothing, but key, I'm trying! This is what I have come up with so far.
<Custom Equip Requirement Condition>
var actor = $gameActors.actor(1); // Is there a way for this to grab the ID of actors 1 through 3, depending on who I'm trying to equip? All 3 of my actors can equip these armors.
var equipment = actor.equips()[2]; // Does this check slot or armor ID? I need it to check the armor ID.
if ($gameActors.actor(1).equips()[2] == 2) {
condition = true;
} else {
condition = false;
}
</Custom Equip Requirement Condition>
Once the above code is complete, I can put it into item slots 77-91 and adjust the necessary numbers.
Thank you in advance!
I have armors 2-15 that equip to armor slot 2.
I have armors 77-91 that equip to armor slot 7.
I am trying to set a requirement on armors 77-91 that is dependent on 2-15.
E.g. Armor 77 requires the actor has armor 2 equip in slot 2.
Armor 78 requires the actor has armor 3 equip in slot 2.
etc. It follow this pattern.
This is what I have right now. It does not work because my JS/coding knowledge is next to nothing, but key, I'm trying! This is what I have come up with so far.
<Custom Equip Requirement Condition>
var actor = $gameActors.actor(1); // Is there a way for this to grab the ID of actors 1 through 3, depending on who I'm trying to equip? All 3 of my actors can equip these armors.
var equipment = actor.equips()[2]; // Does this check slot or armor ID? I need it to check the armor ID.
if ($gameActors.actor(1).equips()[2] == 2) {
condition = true;
} else {
condition = false;
}
</Custom Equip Requirement Condition>
Once the above code is complete, I can put it into item slots 77-91 and adjust the necessary numbers.
Thank you in advance!

