Prevent Sealing Of Skill If Passive Skill Is Equipped When Silent

Discussion in 'Javascript/Plugin Support' started by atoms, Feb 24, 2019.

Thread Status:
Not open for further replies.
  1. atoms

    atoms Veteran Veteran

    Messages:
    463
    Likes Received:
    277
    Location:
    United Kingdom, England
    First Language:
    English
    Primarily Uses:
    RMMV
    I'm making a game with a lot of skills and classes, I was wondering if there was a way to create a passive skill on let's say a Healer class, so if that passive skill is equip then it would prevent sealing Healing, Restore and Revive skills as examples.

    I am using many of Yanfly's Plugins including Auto Passive States, Passive Aura Effects, Equip Skill Tiers and Class Change Core, Subclass. Link to Yanfly Plugins below.
    http://yanfly.moe/yep/

    So let's say the Healer has a Magi Subclass as well.

    Then the Healer would have skills such as Fire, Ice, Thunder, Heal, Restore, Revivie. Now if they equip a Passive Skill called Silent Remedy then anytime they are have the Silent State added to them in battle, they will have Fire, Ice, Thunder sealed, but no longer Heal, Restore Revivie sealed.

    Now if they remove that Passive Skill, then get the Silent State in battle, then it would seal all skills. Fire, Ice, Thunder, Heal, Restore, Revive. But the moment the they equip the Silent Remedy skill as a Passive Skill again, go into battle and get the Silent state on themselves, they unseal Heal, Restore and Revive in battle.

    Does anyone know an easy way to accomplish this? Thank you.
     
    Last edited: Feb 24, 2019
    #1
  2. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,800
    Likes Received:
    829
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    group them under a different skill type, and seal by skill type.
    that's one way of doing it, without plugins.

    the other way, is manually, with specific seals.
     
    #2
    atoms likes this.
  3. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    4,457
    Likes Received:
    3,728
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    I'm thinking that the best way to do this would be to create two States - one, a visible seal state that seals the elemental skills; the other, a non-visible (Priority 0, no icon) state that seals the healing skills. On the Elemental skill seal state, give it a Custom Apply Effect using Yanfly's Buffs & States Core. The Custom Apply Effect should evaluate whether the battler has the Silent Remedy passive (not sure how you're implementing this passive in the first place, so implementation will vary based on that), and if the battler does not have this passive, it will also add the Healing skill seal state to this battler.
     
    #3
    atoms likes this.
  4. ramza

    ramza Lunatic Coder Veteran

    Messages:
    550
    Likes Received:
    304
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    To build upon this suggestion, rather than use a custom apply effect, you could also just make any silence skill apply both the elemental silence, and the healing silence, and make the passive skill/state that is equipped on the healer class make the actor immune to the healing sealing state.
     
    #4
    atoms likes this.
  5. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    4,457
    Likes Received:
    3,728
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    I thought about this solution too, but the problem is that it only works if the Silence state is always applied at 100% (with nothing in the game that gives a % chance to resist it, and no LUK-based calculations). If it applies at less than a 100% chance - for example, a spell that has a 60% chance to silence an enemy - then the two States would be calculated and applied (or not applied) separately, which is not the desired behavior.
     
    #5
    ramza and atoms like this.
  6. atoms

    atoms Veteran Veteran

    Messages:
    463
    Likes Received:
    277
    Location:
    United Kingdom, England
    First Language:
    English
    Primarily Uses:
    RMMV
    @gstv87
    @Wavelength
    @ramza

    I am planning to have a Skill Type called Passives, and add them through Yanfly's Equip Skill Tiers Plugin. Link below.
    http://yanfly.moe/2016/04/10/yep-91-equip-skill-tiers-rpg-maker-mv/

    My thoughts on the manual way is I may be able to do that because I need different Skill Types for each Class anyway, so there may be a way to bypass that, but I'm clueless as to what to write in the description boxes for the Lunatic Mode of Yanfly plugins way.
     
    #6
  7. ramza

    ramza Lunatic Coder Veteran

    Messages:
    550
    Likes Received:
    304
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    That is indeed an issue I hadn't considered. And now that you've brought it to my attention, I need to change something in my own project. Thanks. XD

    @atoms As wavelength said, you'd use a <custom apply effect> on your main silence state which would check if the target of the state is also affected by the passive state that allows him to cast healing spells while silenced, and if found not to have that state, apply that silence as well.

    Code:
    <custom apply effect>
    if (!target.isStateAffected(X)){
    target.addState(X)
    }
    </custom apply effect>
    Obviously replace the X with the stateId of your healer passive state.
     
    #7
    Wavelength and atoms like this.
  8. atoms

    atoms Veteran Veteran

    Messages:
    463
    Likes Received:
    277
    Location:
    United Kingdom, England
    First Language:
    English
    Primarily Uses:
    RMMV
    @Wavelength
    @ramza

    Thank you both very much! That is great. It seems I just keep needing to know these bits of lunatic mode codes, and then after what I want to be done can easily happen. In this case, seems simple enough, but you just need to know the java code on how to add states and things.
     
    #8
  9. Sharm

    Sharm Pixel Tile Artist Veteran

    Messages:
    12,615
    Likes Received:
    10,302
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #9
Thread Status:
Not open for further replies.

Share This Page