MiddleMang

Villager
Member
Joined
Jan 24, 2019
Messages
26
Reaction score
2
First Language
English
Primarily Uses
RMMV
Hello! Is there a way to use states to check for misses in MV? Ideally I want to check and apply a state counter for each miss, but "if (b.result().missed){" doesn't seem to work w/Custom Action Effects such as <Custom Initiate Effect> or
<Custom Conclude Effect>, likely due to how misses/evasion are calculated. I'm using all of yanfly's plugins and Buffs & States Core.

I tried this as well just in case but it's a lot less specific than i was hoping:

Code:
<Custom Confirm Effect>

if (value < 0 && this.isHpEffect()){

user.addStateCounter(538, 1);

user.clampStateCounter(538, 0, 3);

}

</Custom Confirm Effect>

my original attempt:

Code:
<Custom Confirm Effect>
if (b.result().missed){
user.addStateCounter(538, 1);
user.clampStateCounter(538, 0, 3);
}
</Custom Confirm Effect>
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,158
Reaction score
9,109
First Language
English
Primarily Uses
RMMV
You're missing a part of Yanfly's instructions in the Buffs & States Core.

At the beginning of the Custom Action Effects section, it lists which notetags only run when the action successfully hits and which ones run regardless.

So there's no point in checking for a miss inside of a Confirm effect, because that notetag won't be getting executed if the skill missed.

What you have should work inside of a Custom Conclude Effect.

If not - how are you using the notetag? I presume it's on the attacker via a passive state?
 

MiddleMang

Villager
Member
Joined
Jan 24, 2019
Messages
26
Reaction score
2
First Language
English
Primarily Uses
RMMV
You're missing a part of Yanfly's instructions in the Buffs & States Core.

At the beginning of the Custom Action Effects section, it lists which notetags only run when the action successfully hits and which ones run regardless.

So there's no point in checking for a miss inside of a Confirm effect, because that notetag won't be getting executed if the skill missed.

What you have should work inside of a Custom Conclude Effect.

If not - how are you using the notetag? I presume it's on the attacker via a passive state?

I did read that but I wasn't sure if a successful evasion on the target's part was the same as a miss on the user's part when I checked b.result().evaded, sometimes brute forcing things has led me to find a lot of solutions haha (not so much this time). The conclude effect worked perfectly, thanks for the quick fix!
 

Latest Threads

Latest Profile Posts

I'm just gonna remove the Dark Spells from my game. They wouldn't be fighting Gods or Angels. So why have it?
Every day I'm getting rough-outs of another sprite sheet or two. Getting real close to just needing to make new original stuff and editing my tables and chairs to look correct for the taller sprites is among the top of the revisions list.
Eye_Guys.gif
Some eyew guys! One is absent for... reasons of taste
Eeee! X3 Ever since I started doing 3d Art ,my Pixel Art got sooo much better! I cant wait till im done with the tileset!
Crystal Shock Devlog #5 yay!



This week was super fun as I got to work on my favorite thing: Combat! A new boss has been added and some new mechanics on top of that. I also made some improvements to the first town.

Forum statistics

Threads
134,916
Messages
1,251,899
Members
177,754
Latest member
thelankystank
Top