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

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.

Spoiler
The skill
0yTGFWV
0yTGFWV.png

The state
Moa89tp.png

Moa89tp

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!
@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.
@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.
Edited.
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.
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.
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?

Original thread: https://forums.rpgmakerweb.com/threads/auto-passive-states-cant-tell-what-i-am-doing-wrong.111651/