Require Script to Prevent Accessory Stacking

Discussion in 'Javascript/Plugin Support' started by jcmtexas01, Oct 7, 2019.

  1. jcmtexas01

    jcmtexas01 Unbreakable Bond Member

    Messages:
    13
    Likes Received:
    0
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    All Concerned,

    In my game my characters can equip x2 Accessories. That being said, I have made a "Gauntlet" Accessory similar to the one in FFVI which increases the character's attack power, and seals their ability to use a shield. My end state would be a character only being allowed to equip x1 "Gaunlet", but currently they can use x2. I am utilizing "Equipment Requirements (YEP)", with the following script in the ".jpg" below which isn't working. Maybe I'm just misunderstanding Yanfly's script? I have not been able to find anything online, example scripts, etc. Any assistance would be appreciated. Thank you.

    Plugin Link:
    http://www.yanfly.moe/wiki/Equip_Requirements_(YEP)
     

    Attached Files:

    Last edited: Oct 7, 2019
    #1
  2. Silva

    Silva Scoobityboo Veteran

    Messages:
    302
    Likes Received:
    151
    First Language:
    English
    Primarily Uses:
    RMMV
    You could use a custom eval to try and circumvent the issue like so

    Code:
    <CUSTOM EQUIP REQUIREMENT CONDITION>
    condition = !user.equips().contains(item)
    </CUSTOM EQUIP REQUIREMENT CONDITION>
    Though it looks to me like there's something not working with the plugin so it's anyone's guess whether the above will work. Are you getting any error messages in the console? Does the plugin work as intended if you disable all other plugins not required for equip requirements to run?
     
    #2
  3. jcmtexas01

    jcmtexas01 Unbreakable Bond Member

    Messages:
    13
    Likes Received:
    0
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    No error message in the console. I didn't try disabling all of the plugins yet. Script didn't work either.
     
    #3

Share This Page