Is there a way to override states in any of Yanfly's plugin when making stronger states? Or at least a way to remove a passive state when another is added? Ive tried using the following to do this, but it doesnt seem to work:
<Custom Apply Effect>
user.removeState(n);
user.refresh();
</Custom Apply Effect>
n = State ID
Passive states can't be removed that way but what you can do is make a custom passive condition that when you have a certain state then that passive won't be there.
<Custom Passive Condition>
if (!user.isStateAffected(X)) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>
That works when I am adding the states from an on use skill. What I need is for it to be a passive state that the skill adds that way I can control what level the class gets the buff at.
<Custom Passive Condition>
if (!user.isStateAffected(X)) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>
This from what I read the code as "If the user has state X, then apply the state. Else, do not apply the state." This means I would have to reverse the true/false conditions and use them over again in order to make it so it removes itself when another state is applied right?
! is for not affected by state x
for skill learn you can use user.isLearnedSkill(x)
<Custom Passive Condition>
if (!user.isStateAffected(X))
if (user.isLearnedSkill(Y)) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>
This is the correct way to have it yes? This way it makes sure they are not effected by State X and they do have Skill Y learned for the condition to be true.
No, it's
<Custom Passive Condition>
if (!user.isStateAffected(X) && user.isLearnedSkill(Y)) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>
Again, works only on a state basis. Im trying to add this by putting the tag in the Skill's Notetag box.