How to make conflicting equipment

Discussion in 'RPG Maker MV' started by ZhiHuan, Nov 27, 2018.

  1. ZhiHuan

    ZhiHuan Villager Member

    Messages:
    7
    Likes Received:
    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>
     
    #1
  2. NinjaKittyProductions

    NinjaKittyProductions Professional Murder Hobos Veteran

    Messages:
    220
    Likes Received:
    149
    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.
     
    #2
  3. ZhiHuan

    ZhiHuan Villager Member

    Messages:
    7
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    But how to hide Arrow or Shield when it is sealed?
     
    #3
  4. Weremole

    Weremole Veteran Veteran

    Messages:
    224
    Likes Received:
    199
    First Language:
    Swedish
    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.
     
    #4
  5. ZhiHuan

    ZhiHuan Villager Member

    Messages:
    7
    Likes Received:
    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: Nov 29, 2018
    #5

Share This Page