Lowell

The Walking Atelier
Veteran
Joined
Apr 21, 2012
Messages
292
Reaction score
69
First Language
English
Primarily Uses
Similar to games such as Etrian Odyssey or Romancing SaGa 3, this small snippet allows you to equip armors in armor slot with a shared name, but prevents you from wearing two armors of the same type. For example if you equipped an armor labeled as Head Gear, you're be prevented from equipping any other armors with that armor type.

Requirements:

YEP_EquipCore
YEP_X_EquipRequirements
Code:
<Custom Equip Requirement Condition>
if (user.equips()[4] && user.equips()[4].atypeId == 3) {
     condition = false;
   } else if (user.equips()[5] && user.equips()[5].atypeId == 3) {
     condition = false;
   } else if (user.equips()[6] && user.equips()[6].atypeId == 3) {
     condition = false;
   } else if (user.equips()[7] && user.equips()[7].atypeId == 3) {
     condition = false;
   } else {
     condition = true;
   }
</Custom Equip Requirement Condition>

While the code can more than likely be reduced in size, I've still a novice in javascript. The above example utilizes the Custom Equip Requirements Lunatic code in Equip Requirements.
To explain whats happening
Code:
user.equips()[x]
refers to the Armor Slot ID.
Code:
.atypeId == x
refers to the Armor Type ID
The rest is basically a set of if and else statements that runs a check for each armor slot.
The End Results in this...
958dd498d180eb60edd89380407c3934.png
and this for the fourth, empty slot
74ee672d88b2c88d3cc2fa277f519e5f.png

Hope you have as much fun using it as I had making it!
 

Latest Threads

Latest Profile Posts

I couldn't help myself, so I edited the tiles a bit and made a birdhouse :LZSsmile: I hope I will finish the town today!Screenshot 2021-09-17 134349.png
How do I find the threads I have watched? It's been so long I've forgotten :kaoswt:
So far, this is how the wall tileset its looking in-editor. :kaoswt2:
1631863283853.png
Still thinking on details to add.
Added a plugin to RMMV Plugin Releases with all relevant info but it looks like the topic wasn't approved for whatever reason. Cool.
Working in the IT industry:
- "How long does it take?".
- "It takes 1 month".
- "What if we add more people to the project?".
- "It would take 2 months".

Forum statistics

Threads
115,129
Messages
1,087,449
Members
149,630
Latest member
Unit435
Top