MV Is it possible to override Yanfly's passive state with a skill or immunity?

Dumb question but is this possible to be done? I've used default immunity to state (state resist), plugin immunity to state, and this
overideskill.jpg

which doesn't work.

What I'm trying to do is making armor have both dex penalty and to hit penalty. Dex penalty can be passed by having enough str which the plugin supports. To hit penalty should be overcome with a passive skill to remove the penalty, but no state nor commands seems to be able to override the passive state.

I think it's possible to make default armor have -20 to hit trait then have the skill to give a state that improves +20 to hit, but I really don't want it this way since the state would make a character "normal" which shouldn't be shown in classic rpgs. Can this be done in other way? Thanks
Perhaps try

Code:
user.hasSkill(22)

or

Code:
user.isStateAffected(24)

There needs to be a '.' after the 'user'.
I'm not sure where you got any of that, but it's completely wrong syntax. Aside from the period, hasSkill doesn't exist as a method of Game_Actor.

The function to see if an actor knows a skill is user.isLearnedSkill(24)

So your notetag would be:
Code:
<Custom Passive Condition>
condition=!user.isLearnedSkill(24);
</Custom Passive Condition>

Perhaps try
Code:
user.hasSkill(22)
or
Code:
user.isStateAffected(24)
Those check two very different things, and the first is still not a function in MV.
I mean, you could have a skill that grants a passive state, and then check if that passive state is on the battler. Sorry if it wasn't clear enough.
I mean, you could have a skill that grants a passive state, and then check if that passive state is on the battler.
You absolutely can, but there's not really a reason to grant a passive state whose only purpose is to toggle another passive state 😉
Moved to: Plugin Support
Hi, thank you for the replies.

The reason I'm using userhasSkill was because when I used both Yanfly passive state and frogboy's talent plugin, conditions for passives cannot find the existance skills if they are gained through the later talent plugin.

I think did a mistake testing userhasskill though, so I thought it worked. Actually it did not make up as a condition so only equipping type 2 weapon (sword) was the condition.

Have tried user.hasSkill and user.isLearnedSkill. Both cannot identify frogboys talent, but the first can get it through trait, event, and level up.

For example,

<Custom Passive Condition>

if (user.isWtypeEquipped(2) && user.hasSkill(21)) {

condition = true;

} else {

<type 2 is sword, Skill 21 is sword focus>

This one would trigger the condition casuing state to happen if the character gains Skill 21 through event, has it on character trait or regular level up(which does not carry skill nor ability to another class when changing classes. I want to make multiclass that stacks like BOF3, not FFV), but do not trigger as condition if Skill 21 is gained through Frogboy's talent plugin.

user.isLearnedSkill cannot trigger the condition if the character gains skill 21 from default trait or the talent plugins, but can recognize the character having Skill 21 gained if it's given through event or default level up.

I did the same tests with armor and the results seem to vary.

Using user.hasSkill, even without the skill, the condition would still be set false.

Like this

if (user.HasSkill(22)) {

condition = false;

This would automatically put the condition to false, so even without the armor proficiency the character still don't get the penalty.

user.isLearnedSkill acts the same.

Whether putting the <passive condition: 16> under the character or under equipment note, he cannot use given default trait as condition when using user.islearnedskill either way.

Sorry I tried to be brief but the situtations just seem to vary a lot.

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-override-yanflys-passive-state-with-a-skill-or-immunity.140942/