Making Skills Invisible With A State

Is there a way to make certain skills invisible while the player is afflicted with a state? Not just seal its use, but make it appear as though the skill is gone until the state is removed? Perhaps with Lunatic Notebox coding, or perhaps a referral toward a plugin I haven't spotted? Any help would be much appreciated, even if the answer is that it's not possible 😛
Yes it is possible. You can use YEP Skill Core to do: http://yanfly.moe/2015/10/13/yep-8-skill-core/
All you need is to add this piece of codes to your skill note box:
Code:
<Custom Requirement>
//Check if user is affected by state X. Change X to your state ID
if (user.isStateAffected(x)) {
value = true;
} else {
value = false;
}
</Custom Requirement>
It is not really invisible, but unusable.

If you want it to be completely invisible, use this instead:
Code:
<Custom Show Eval>
if (user.isStateAffected(x)) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>

I prefer the first method to the second one, as it only grays out the skill and do not allow user to use, but it still can be seen.
the 1st 1 is completly un-needed. since u can grey out skills without plugins from the state's trait section.
Yes it is possible. You can use YEP Skill Core to do: http://yanfly.moe/2015/10/13/yep-8-skill-core/

If you want it to be completely invisible, use this instead:
Code:
<Custom Show Eval>
if (user.isStateAffected(x)) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>

I prefer the first method to the second one, as it only grays out the skill and do not allow user to use, but it still can be seen.

Thank you for showing how that works, and now I have a question about something a bit more complicated.

I have difference "Stances" that allow the use of certain skills/combo chains, and that's why I asked about hiding skills that aren't associated with one or more states - my "Stance States". The problem I'm having now is that only the bottom most Custom Show Evaluation is considered if I have more than one, so the skill isn't showing up while any other Stance States are active. So, for example, if I have 4 stances (Stance 1, Stance 2, etc.) and, say, Hammer Bash is only usable while in Stance 1 or 3, if I have multiple Evals in the notebox only the last Eval is applied in battle. So Hammer Bash is showing up while Stance 3 is active, but it's not showing up when Stance 1 is active.

TL;DR - Is there a way to use any one of multiple state requirements (but not all) with the Custom Show Eval code above?
I think you can use OR statement instead of having two note tags.
Code:
if (user.isStateAffected(x) || user.isStateAffected(y))
with x and y is the state ID of your Stance 1 and 3

the 1st 1 is completly un-needed. since u can grey out skills without plugins from the state's trait section.
Yeah i just forgot about that simple way. I think i have been relying too much on plugins.
I think you can use OR statement instead of having two note tags.
Code:
if (user.isStateAffected(x) || user.isStateAffected(y))
with x and y is the state ID of your Stance 1 and 3


Yeah i just forgot about that simple way. I think i have been relying too much on plugins.

Thank you, especially for the quick reply, but for also helping me realize that || is an "or" statement; that's going to make things so much simpler in the future! ^^ thanks so much for your help!

EDIT: Okay, so I'm getting an error when trying to place this into the code, so there must still be something I don't understand about its application. Here is the code I attempted to test:

<Custom Show Eval>

if (user.isStateAffected(61)) || (user.isStateAffected(62) || user.isStateAffected(64)) {

visible = true;

} else {

visible = false;

}

</Custom Show Eval>

What did I do incorrectly, and how do I fix it? This will also affect a Custom Cost evaluation I intend on using, so seeing how to apply this correctly would be a huge boon!

EDIT #2: Okay, I figured out where I got lost in the code and fixed it (didn't notice the placement of the parentheses and how important they were!) - it's working beautifully! Thanks again for the help, and have a wonderful day!! ^_^
There is an odd ")" after your: (61)) ☺️ It should be:
Code:
if (user.isStateAffected(61) || (user.isStateAffected(62) || user.isStateAffected(64)) {
You know you can simplify it to 1 line code:
<Custom Show Eval>
visible = (user.isStateAffected(61) || user.isStateAffected(62) || user.isStateAffected(64));
</Custom Show Eval>

Original thread: https://forums.rpgmakerweb.com/threads/making-skills-invisible-with-a-state.96035/