Healing skills, and only selected skills, no longer silent/sealed when accessory equipped.

Discussion in 'Javascript/Plugin Support' started by atoms, Sep 13, 2018.

  1. atoms

    atoms Veteran Veteran

    Messages:
    444
    Likes Received:
    270
    Location:
    United Kingdom, England
    First Language:
    English
    Primarily Uses:
    RMMV
    Is there an easy way to change a state effect through equipment?

    What I'm thinking is that by default a Silent state would seal certain skills, including Heal, Refresh and Restore.

    Then, through a piece of equipment, even with the Silent state those skills, and only those three, are no longer silent. Heal, Refresh, Restore.

    Let's say Silent state would also seal Fire, Thunder, Ice and Earth.

    Then that piece of equipment would not change the Fire, Thunder, Ice and Earth sealed state effects, but would remove the seal state effects for the Heal, Refresh and Restore skills.

    Is this easily possible?

    I'm using Yanfly plugins mainly, the the states and equipment ones, so it would have to be compatible with that. It may be able to be done through Lunatic mode with one of Yanfly scripts? Hope that helps.

    I'm guessing it'd require a plugin or a script/plugin command, so I'm putting it in here instead of MV support.

    I thought of having two Silent states to do this, but then if I give an enemy a skill with 50% random chance to inflict both Silent states, it would effect both of them and not treat them as one.

    Thanks. :)
     
    #1
  2. mmgfrcs

    mmgfrcs The Programmer Member

    Messages:
    29
    Likes Received:
    26
    First Language:
    Indonesia
    Primarily Uses:
    RMMV
    Well, there's no easy way to do so without making another plugin. Why? Because by default, there's no such thing as unsealing. However, there IS a tedious way that can get the job done.
    Requirements: Yanfly - Auto Passive State, Skill Core
    Behold, the very useful notetag of Yanfly's Skill Core: <Custom Requirement>. Really, whenever a skill can only be used under some condition, think about this notetag first.
    Code:
    <Custom Requirement>
    if(!user.isStateAffected(silentStateId) || user.isStateAffected(unsealStateId)) value = true;
    else value = false;
    </Custom Requirement>
    Replace silentStateId with the ID of your Silent state, and unsealStateId with the ID of the state that will unseal.
    Put this notetag on all skills that can be unsealed by equipment (i.e Heal, Refresh and Restore in your example), and
    Code:
    <Custom Requirement>
    if(!user.isStateAffected(silentStateId)) value = true;
    else value = false;
    </Custom Requirement>
    Put this one on all skills that cannot be unsealed (i.e Fire, Ice, Thunder, Earth in your example). Replace silentStateId accordingly.

    If you noticed, there's an Unseal state on that code, so add that state to your database if you haven't added it.
    In all equipment that's going to unseal, put the notetag <Passive State: x>, where x = unsealStateId above.

    This should work. However, you can see that it's quite tedious to do and maintain. I can imagine your game having a lot of skills that needs this, and you'll have to put the notetag on all of them, one by one. If you need a simpler solution or a catch-all <Unseal Skill: > notetag on equipments, you'll need a plugin.
     
    #2
    atoms likes this.
  3. atoms

    atoms Veteran Veteran

    Messages:
    444
    Likes Received:
    270
    Location:
    United Kingdom, England
    First Language:
    English
    Primarily Uses:
    RMMV
    Many thanks for all the help. I was hoping you could do it with a lot of states and such easily as well, but at the same time that can do. Healing skills were mainly what I was planning to do from the start.

    Thank you very much for taking the time to explain this solution to me.
     
    #3

Share This Page