How to make conflicting equipment

ZhiHuan

Villager
Member
Joined
Nov 26, 2018
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMV
For example, actor A can equip C or D, but he can not equip C and D at one time?

or, First, actor A can equip one of sword(weapon), shield(shield), bow(weapon) but arrow(shield) independently.
Then he can equip sword and shield at one time.
Then he can equip arrow when bow is equipped.
And he can not equip shield when bow is equipped.

i try to find some way from YEP-EquipRequirements, but i cannot find other key word about equip,
'user.weapon()' , 'user.wtype()' or '$dataWeapons[$gameActors.actor(user.id())._equips[0]._itemId].etypeId()'
but no one is useful.

<Custom Equip Requirement Condition>
if (user.name() === 'Harold') {
condition = true;
} else {
condition = false;
}
</Custom Equip Requirement Condition>
 

NinjaKittyProductions

Professional Murder Hobos
Veteran
Joined
Jul 9, 2013
Messages
446
Reaction score
414
First Language
English
Primarily Uses
RMMV
Another way to perform the bow and arrow is as follows:
Make 'Arrow' an armor equipment. On all your bows, add the traits Equip Armor (Arrow) and Seal Equip (shield). This makes sure that when bows are equipped, you can equip arrows but not shields.
 

ZhiHuan

Villager
Member
Joined
Nov 26, 2018
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMV
But how to hide Arrow or Shield when it is sealed?
Another way to perform the bow and arrow is as follows:
Make 'Arrow' an armor equipment. On all your bows, add the traits Equip Armor (Arrow) and Seal Equip (shield). This makes sure that when bows are equipped, you can equip arrows but not shields.
 

Weremole

Veteran
Veteran
Joined
Jan 22, 2016
Messages
228
Reaction score
201
First Language
Swedish
Primarily Uses
A simple solution would be instead of Weapon and Shield use Right and Left hand and have Shield and Arrow be Left Hand equip slot armor types. A not so simple solution would require a plugin that can do that sort of wizardry with the equip slots.
 

ZhiHuan

Villager
Member
Joined
Nov 26, 2018
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMMV
I got it!!

Need to rewrite YEP_X_EquipRequirements line 560 to:
if (!this.hasSkill(skillId)) return false;

First create a new skill type "Equipped" and do not have to add it to any actor or class.
Then add a skill "Bow is equipped" to the skill type and all "bow" weapon (you can add seal skill "Can equip shield" to bow weapon).
final add a equip requirement : "skill : Bow is equipped" to arrow.

Follow these you can realize the equip system of DIABLO II.
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I'm not sure if I should be happy for MZ, or sad for MV.
Not going to lie.... The update's cool and all, but I immediately ran to Mog's site and was like, "Update! Update! Update!" while breathing on the page of his Star Ocean Battle System plugin. :kaoswt:
Ho boi. I can already see the storm of ugly actor faces RTP customizable facesets from MZ are gonna flood. XD
<-- Meet Seith. He begins the story as an apprentice druid, learning to survive in the wilderness by communing with nature and honing his herbalism. Seith has a deep desire to understand the world around him. When wells of chaotic energy begin erupting from the land,corrupting plant, animal and man alike, Seith finds himself on a journey to discover just what this means for the fate of his home, the land of Myarr.
I installed a ledge for my cat.

Forum statistics

Threads
99,460
Messages
965,627
Members
131,070
Latest member
Sethlon
Top