Auto passive states.. Cant tell what I am doing wrong.

Discussion in 'Javascript/Plugin Support' started by Jragonking, Jul 31, 2019.

  1. Jragonking

    Jragonking Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    enflish
    Primarily Uses:
    RMMV
    So i am trying to get a skill to give me a state passively once i learn the skill.
    This skill is spear mastery.
    give 50% increase to all damage when a spear is equipped.

    I am using yanfly's AutoPassiveStates plugin.
    http://www.yanfly.moe/wiki/Auto_Passive_States_(YEP)

    Here is what i have.

    The skill
    [​IMG] [​IMG]
    The state
    [​IMG]
    [​IMG]
    The Code for the state

    <Custom Passive Condition>

    condition = false;

    if ($gameParty.inBattle()) {

    if (user.isActor()) {

    var swordTypeId = 2;

    var weapons = user.weapons();

    for (var i = 0; i < weapons.length; ++i) {

    var weapon = weapons;

    if (weapon && weapon.wtypeId === swordTypeId) {

    condition = true;

    }

    }

    }

    }

    </Custom Passive Condition>



    <Custom Confirm Effect>

    if (this.isHpEffect() && value > 0) {

    var bonus = Math.ceil(value * 2);

    value += bonus;

    }

    </Custom Confirm Effect>

    I havent been able to get any passive state to work so i dont know if its just the plugin that i cant get working.
    I havent found much info as of help on the auto states plugin and dont know if im suppose to be changin anything in the plugin parameters or anything.

    All help is appreciated. thank you!
     
    Last edited: Aug 1, 2019
    #1
  2. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,605
    Likes Received:
    10,512
    First Language:
    English
    Primarily Uses:
    RMVXA
    @Jragonking At the end of your post you mention that you are using an auto states plugin. However, you don't tell us which one, nor do you give a link to the web page where you got it. Without those details it is very hard for people to help you. Please edit your post to include that information.
     
    #2
  3. Jragonking

    Jragonking Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    enflish
    Primarily Uses:
    RMMV
    Edited.
     
    #3
  4. ramza

    ramza Lunatic Coder Veteran

    Messages:
    538
    Likes Received:
    294
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    I'd be interested to see what happens if you take the condition = false statement out of the mix entirely. The condition is false by default, and by setting it to false at the beginning, it might be returning false before it has a chance to see if any of that other stuff is true.

    I see that the passive state also has an icon, so one other thing you could do is to remove all of the custom condition code and just have it as a passive state on the skill itself to verify that it activates at all.

    Keep in mind that if you're using a skill equip system, the skill won't be 'learned' unless it is equipped, meaning the passive will never be active.
     
    #4
  5. Jragonking

    Jragonking Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    enflish
    Primarily Uses:
    RMMV
    Tried removing the false statement. Same result, Nothing happens.
    Tried removing the custom condition code completely to see if icon showed when purchasing skill. Same result, Nothing.
    Does passive auto states require set up of some kind other than the simple <passive State: x> notetag?
     
    #5

Share This Page