Guard and Special Guard RMMV

Alright guys... this may seem simple, but what i'm trying to do is this:

A character uses what i'll call parry, and when that character is attacked they counterattack 100%.
As somewhat of a counter to this if a character uses a skill that breaks that, and deals normal dmg.

What I've come up with is close, but alas no cigar.

I have an addition state called Parry and a skill that gives said state.
Parry will give the same thing as guard as well as counterattack +100%.

I've created a skill that removes the parry state, i think, but the downside is that the counterattack still occurs...... and this is what I don't want.

Any and all help is appreciated thanks guys.
please show the screenshots of your skills and your states.
Most likely this is because the timing options went wrong somewhere, because if the player no longer has a counterattack value that should not happen. So either it's the timing on when the state is removed, or something else gives counterattack as well, or a plugin changed the engine.

especially state if you're using yanflys action sequence plugins - those are the prime example of plugins that change the timing.
A skill's Effects list is processed after the skill formula. One way around this is to remove the state in the damage formula itself, e.g.:
Code:
b.removeState(123); a.atk * 4 - b.def * 2
Replace 123 with the ID of your Parry state, and atk * 4 - b.def * 2 with the skill's damage formula. ^_^

Edit: I tested this without plugins, but if this doesn't work for you then, like @Andar suggests, list which plugins you're using. =)

Edit2: oops, this is wrong, counter state removal works fine from the skill effects list. Sorry for the confusion. 😢
A skill's Effects list is processed after the skill formula. One way around this is to remove the state in the damage formula itself, e.g.:
Code:
b.removeState(123); a.atk * 4 - b.def * 2
Replace 123 with the ID of your Parry state, and atk * 4 - b.def * 2 with the skill's damage formula. ^_^

Edit: I tested this without plugins, but if this doesn't work for you then, like @Andar suggests, list which plugins you're using. =)

1. So i tried the above but it still it didn't work as intended.

Code:
b.removeState(3); (2 * (a.atk * 4.5) + ((1.3 * a.mat) + (a.luk * 1.1))) - b.def

see Parry1.jpg

2. State(3) is the parry state

see ParryState1.jpg

and the list of plugins i am using on this project alone is kinda.....scary.
but here u go.

see Plugin List 1-3
and yes yanfly action sequence 1-3 is on, but i'm confused on what that changes. In this case specifically.
Try:
a.removeState(3); (2 * (a.atk * 4.5) + ((1.3 * a.mat) + (a.luk * 1.1))) - b.def
Try:
a.removeState(3); (2 * (a.atk * 4.5) + ((1.3 * a.mat) + (a.luk * 1.1))) - b.def

isnt that "a" in
Code:
a.removestate(3)
suppose to be "b"
Code:
b.removestate(3)

also neither worked unfortuneatly
for this case, it shouldn't really matter if the effect is removed by damage formula or by effect list. That's why trying the different formula never made a difference, the timing problem is elsewhere.

@Nevarus you forgot the skill that gives the parry state to the target.
But even with the current incomplete screenshots I can see a few things where problems are.

1) state duration 1-1 means the current turn only, because the state counter is reduced at the end of the turn.
So basically the parry state is active from the (unkown) moment when the skill applies the state to the end of the current turn, and removed before the next turn.
2) the skill that removes the state has a very high speed, usually making it the first in a battleturn
that would have been a good idea if parry would be a multi-turn state because it would remove the parry state before the other attacks come in.
Unfortunately since the parry-state is single turn, that has the risk of it being applied before the parry state is effective.

3) it now depends on the speed of the skill that applies parry - if parry is applied after the fast skill tried to remove parry, then of course the parry remains effective for the rest of the turn.
It can only be removed by that skill if the enemy skill that applies parry is even faster than this one.

4) and because of all of this, I think that you messed up the turn length of the parry state.
Your entire description gives the impression that you want the parry and the parry-removal to be used tactically, which means that if the player sees the parry in the previous turn then he could use the counter to shorten its length.
But in your current configuration, the anti-parry skill would only be effective if it is used in the same turn as the short-duration parry, making it a guess on the player to use this skill only if the enemy uses his parry-introducing skill in the same turn.
and yes yanfly action sequence 1-3 is on, but i'm confused on what that changes. In this case specifically.
By default, all actions are contained in a single step of the battle turn. With its plugins Yanfly has completely reprogrammed this, splitting it into several steps where parts of the action sequences are executed sequentially. This goes to the point that the action sequences have commands to tell the engine in which of the different timesteps the effect of a skill should be applied.
There have been cases of devellopers experimenting with their own action sequences where they forgot to include the command to apply the effects in any of the parts, resulting in the skill effect to never come into play.
The defaults of the action sequence contain this of course, but if you add your own notetag to override those defaults you need to include the correct tags - and without the screenshots I couldn't know before if your skills had their own, custom action sequences that might have gone wrong.

If this all doesn't help, we really need the screenshot of the skill that applies the parry state.
and please, next time do not crop away parts of the window - like the list with the skill IDs in the case of the screenshot above. In this case it probably made no difference, but there are some cases where knowing the skill ID is important.
Alright I figured it out now i just need the animations to play how i want them to.

1. Andar thanks for the help, but the one turn only thing was intentional. I might bring it up to 2 or maybe 3 at most, but this will also lock out their turns for the duration of the ability.

2. I will hopefully find a way to work in Instant turns rather than a series of actions being played out eventually and thats what this is supposed to work for. and the skill speeds are going to change due to tweaks i'll do later.

3. Also heres that parry skill.

4. I may just start from scratch with the plugin list and only put in what i need at the time of development, idk... good idea?
@Nevarus the skill speed of 2000 might be critical here.

Turn order is determined by (agi + speed) * random modifier, then ordered highest to lowest for going first.
Depending on the agi of the actor and the enemy, that can still result in the anti-parry being used before the parry is set.
And it is still a problem for the player guessing if the enemy uses parry this turn or not, because otherwise the antiparry will be useless.

Before going through the plugins that way, I strongly suggest you make another test:
Increast parry state to last 4-4 turns, use the anti-parry skill on the second turn and then check if the counter still works on the third turn.
That way you can check if it is the result of the timing or if there is something else that causes the counter.
so speaking of cases where skill IDs are useful/needed lol.
sorry i forgot that i cropped that one photo

1. so the parry1 Picture is the picture of the skill that breaks the parry, but its not as pretty to look at so.........................
heres a new one
Parry Breaker.jpg

It works just fine and removes the parry state, i know because i have other party members attacking in the same turn right after and theres no counter at all.

2. I also tried increasing the parry state duration, atm i have an enemy that only does that so i can test it easy.
So i had to change parry to 1900 speed while having another skill be at 2000 to test whether it was just hiding the state, but that didnt change whether it was removed or not. in addition allies that attacked after parry was re-entered caused it to work as intended.

3. It works, but i've noticed a little hiccup in the design that cause it to remove the parry state even if you miss that attack, which is...........................not good lol.

I just used
Code:
<setup action>
REMOVE STATE 2, 3: target
</setup action>
State 2 and 3 are guard and parry respectively in my case.

Original thread: https://forums.rpgmakerweb.com/threads/guard-and-special-guard-rmmv.96186/