Stance weapon

Hello! Think i'm posting a bit too much lately, sorry about that, the battle system is proving to be very difficult to tweak to my liking, tough i'm beginning to get a hang of it thanks to everyone, 🙂
I'm trying to do a "stance" weapon, basically a weapon that can be switched between a Fast and a heavy stance, like bloodborne, to "translate" this function in a turn based rpg maker game, i want to make it like this:
When you have this weapon, you start the battle in "Fast stance" where you do low damage, but can do it every time it's your turn (default system essentialy) and you have two skills, one is "change to fast stance" wich is the one you'll start with so it needs to be greyed out for now, and "change to heavy stance" wich you can choose to use to switch the weapon to this heavy stance, the heavy stance grants more damage, but you can only attack once every two of your turns, wich means you get a turn, in that turn every option is greyed out except for the one to switch back to fast stance, then the next is a normal turn, then again everything greyed out and so on
So far iv'e tried this:
I have 2 skills, fast and heavy stance, both have the scope on the user and 2 effects, fast stance calls a state to seal the "change to fast stance" skill, that makes it greyed out, the second effects instead removes the heavy stance state,
Heavy stance is almost the same, calls a state to seal everything except "change to fast stance" and removes the fast stance effect,
the "switching" part works, the problems are:
1: i don't know how to set the heavy stance to activate once every two turns,
2: i don't know how to make the deafult stance the fast one, right now you start with none and you can only switch between the two, i've tried yanfly's auto passive states, by assigning everything with note tags to weapons but that makes it so the state is unremovable once you start with it, i'm sure there's a vanilla way of doing this with switches, but i've been trying for a while and can't manage to figure something out
Thank you in advance 🙂
You can use yanfly's skill core plugin to add a custom skill requirement notetag to add a condition to a skill to be available. That way the skill will automatically be greyed out whenever your actor doesn't have the heavy stance state on it.

The notetag should be something like:
Code:
<Custom Requirement>
value = user.isStateAffected(YourHeavyStanceStateID);
</Custom Requirement>

At the same time, you can add a tag to your light stance skills to make it so they're only available when the user is NOT affected by the heavy stance state, effectively making it so that having no state equates to being in light stance as far as the player will know:
Code:
<Custom Requirement>
value = !user.isStateAffected(YourHeavyStanceStateID);
</Custom Requirement>

1: i don't know how to set the heavy stance to activate once every two turns,
What does this mean? Assuming you mean all the skills being greyed out after having a used a heavy stance attack, simply have all heavy stance skills apply a state to the user that seals all skills except the "Switch to fast stance" skill and lasts 1 turn. (Tho keep in mind you will then also need a "Wait" skill because otherwise there is no point in having this, if the only option after using a heavy stance skill is to switch back.)

If you only have one actor who's using this stance mechanic, this can be easily done by calling a common event in the skill effects.

Alternatively, a more elegant solution would be using Yanfly's skill Cooldown plugin to apply a global cooldown 1 turn to all heavy stance skills when one was used.

Both plugins are part of Yanfly's free starter bundle on itch, although I don't know if they are as up do date as the paid bundle. Overall I would recommend getting the full bundle, because more than likely you'll encounter future issues which Yanfly has plenty of solutions.
You can use yanfly's skill core plugin to add a custom skill requirement notetag to add a condition to a skill to be available. That way the skill will automatically be greyed out whenever your actor doesn't have the heavy stance state on it.

The notetag should be something like:
Code:
<Custom Requirement>
value = user.isStateAffected(YourHeavyStanceStateID);
</Custom Requirement>

At the same time, you can add a tag to your light stance skills to make it so they're only available when the user is NOT affected by the heavy stance state, effectively making it so that having no state equates to being in light stance as far as the player will know:
Code:
<Custom Requirement>
value = !user.isStateAffected(YourHeavyStanceStateID);
</Custom Requirement>


What does this mean? Assuming you mean all the skills being greyed out after having a used a heavy stance attack, simply have all heavy stance skills apply a state to the user that seals all skills except the "Switch to fast stance" skill and lasts 1 turn. (Tho keep in mind you will then also need a "Wait" skill because otherwise there is no point in having this, if the only option after using a heavy stance skill is to switch back.)

If you only have one actor who's using this stance mechanic, this can be easily done by calling a common event in the skill effects.

Alternatively, a more elegant solution would be using Yanfly's skill Cooldown plugin to apply a global cooldown 1 turn to all heavy stance skills when one was used.

Both plugins are part of Yanfly's free starter bundle on itch, although I don't know if they are as up do date as the paid bundle. Overall I would recommend getting the full bundle, because more than likely you'll encounter future issues which Yanfly has plenty of solutions.
Thank you very much, and yes i forgot to mention about the wait skill, i'v set up the skill core plugin and it works perfectly, what i meant to say in the first issue is that yes, both the first time that you switch to heavy, and all the times you'll attack with the heavy, the next turn is going to have everything greyed out except for wait and switch to fast stance, only issue with this is that there's not going to be heavy specific skills, it's going to be the same skills and the only thing that changes is you do way more damage with any of them, this is an issue because i wouldn't be able to make them seal everything for a turn, nor to have them cooldown, since it would also happen when in fast stance (also yes i only have one actor)
Thank you very much, and yes i forgot to mention about the wait skill, i'v set up the skill core plugin and it works perfectly, what i meant to say in the first issue is that yes, both the first time that you switch to heavy, and all the times you'll attack with the heavy, the next turn is going to have everything greyed out except for wait and switch to fast stance, only issue with this is that there's not going to be heavy specific skills, it's going to be the same skills and the only thing that changes is you do way more damage with any of them, this is an issue because i wouldn't be able to make them seal everything for a turn, nor to have them cooldown, since it would also happen when in fast stance (also yes i only have one actor)
If the skills are identical but just deal different damage values, you can simply incorporate that in the damage formula and skip all this nonsense with identical skills and sealing.

Code:
a.isStateAffected(YourHeavyStanceStateID) ? a.atk * 3 : a.atk
                                    Heavy formula^      ^Formula if not heavy

You'd then just use the cooldown plugin to put all skills except wait and switch to light on a 1 turn cooldown if used when under the heavy state.

something like this perhaps if I'm not mistaken:
Code:
<Cooldown Eval>
if (user.isStateAffected(YourHeavyStanceStateID)) {
  SType "SkillType" Cooldown: "Turns"
}
</Cooldown Eval>

It will depend on your setup of skills. This notetag should put all skills of a certain type on cooldown if the skill with the tag was used. You would put that in all your skills except for swap and wait.

In this case, you'd need to make sure swap and wait are not the same skill type as the regular ones, but there are other tags available if you'd like to put each skill on the same cooldown individually. https://www.yanfly.moe/wiki/Skill_Cooldowns_(YEP)
If the skills are identical but just deal different damage values, you can simply incorporate that in the damage formula and skip all this nonsense with identical skills and sealing.

Code:
a.isStateAffected(YourHeavyStanceStateID) ? a.atk * 3 : a.atk
                                    Heavy formula^      ^Formula if not heavy

You'd then just use the cooldown plugin to put all skills except wait and switch to light on a 1 turn cooldown if used when under the heavy state.

something like this perhaps if I'm not mistaken:
Code:
<Cooldown Eval>
if (user.isStateAffected(YourHeavyStanceStateID)) {
  SType "SkillType" Cooldown: "Turns"
}
</Cooldown Eval>

It will depend on your setup of skills. This notetag should put all skills of a certain type on cooldown if the skill with the tag was used. You would put that in all your skills except for swap and wait.

In this case, you'd need to make sure swap and wait are not the same skill type as the regular ones, but there are other tags available if you'd like to put each skill on the same cooldown individually. https://www.yanfly.moe/wiki/Skill_Cooldowns_(YEP)
Thank you, the formula works, but i can't seem to get the note tag to, i've tried tweaking it a bit on the base attack but no luck
1772049966234.png
Quotation marks are not typed out, they are to tell you that you need to put the ID of the thing in. Skill type 1, 2, 3 or whatever.

Reading the plugin instructions also helps.

Nice skill description btw.
forgot that was there :popcorn:

I tweaked it a bit and now it kinda of works,

Code:
<Cooldown Eval>
if (user.isStateAffected(12)) {
  cooldown = 5;
} else {
  cooldown = 0;
}
</Cooldown Eval>

It's skil specific so i'll just put it in every skill, it works but there are two main issues, for some reason it doesn't work on the attack skill (actually no cooldown works on that, i tried with the default one and it doesen't work, also removed it from the bypass list) the plugin help file does say
"<Bypass Cooldown>
This causes the skill to bypass cooldowns, no matter what. This should be
used for skills like Attack, Guard, Escape, etc. that should not have a
cooldown assigned to them"
tough i tought since it's just a skill like any other it should,
and altough the else branch makes it so the skill doesen't have a cooldown if you're note in heavy stance, if you want to switch back to light stance the cooldown will remain, tough i guess it's not a problem for now since i planned it to only last one turn, so it will go away regardless
forgot that was there :popcorn:

I tweaked it a bit and now it kinda of works,

Code:
<Cooldown Eval>
if (user.isStateAffected(12)) {
  cooldown = 5;
} else {
  cooldown = 0;
}
</Cooldown Eval>

It's skil specific so i'll just put it in every skill, it works but there are two main issues, for some reason it doesn't work on the attack skill (actually no cooldown works on that, i tried with the default one and it doesen't work, also removed it from the bypass list) the plugin help file does say
"<Bypass Cooldown>
This causes the skill to bypass cooldowns, no matter what. This should be
used for skills like Attack, Guard, Escape, etc. that should not have a
cooldown assigned to them"
tough i tought since it's just a skill like any other it should,
and altough the else branch makes it so the skill doesen't have a cooldown if you're note in heavy stance, if you want to switch back to light stance the cooldown will remain, tough i guess it's not a problem for now since i planned it to only last one turn, so it will go away regardless
nevermind, forgot the battle test option isn't updated by the plugin paramaters until i test the whole game, everything works! thank you kindly for your patience :popcorn:

Original thread: https://forums.rpgmakerweb.com/threads/stance-weapon.182611/