MV Using a 'Super Effective' Move on a foe gives the user a status effect?

Hey all! I'm back once mooore! :-3
So, in my latest project, I want to be able to give a status effect to a skill user when they exploit an enemy's elemental weakness!

This would only work IF the user exploits the enemy's weakness, and the formula would calculate that if the [character A] has a element weakness of over 101%, it will give the attacker, [character B], a status effect if [character B] uses a skill that 'exploits' [character A]'s weakness.

I made a diagram here for help. (Sorry, not the best with wording and terms ^^😉

1704058140471.png




Preferably I would appreciate no paid plugins (e.g. yanfly, olivia, ect.)... I don't have that kind of money! 🙁
Here's also what I'm trying to replicate; gameplay footage of Shin Megami Tensei IV's "Smirk" mechanic.
You could do it like in Digital devil saga too. In that game, if you strike an enemy weakness, the enemy becomes "afraid". In that state, the enemy is very susceptible to hunt skills, a type of skill in that game. Maybe you could translate it in a state that reduce their defense and evasion.
You could do it like in Digital devil saga too. In that game, if you strike an enemy weakness, the enemy becomes "afraid". In that state, the enemy is very susceptible to hunt skills, a type of skill in that game. Maybe you could translate it in a state that reduce their defense and evasion.
I think that'd be an interesting spin! Getting an advantage through the enemy's suffering as opposed to your own benefit.. Interesting! I think I might just do that!
Thank you!

What I did find is Galv's critical state plugin ( ) which has the desired effect, but focuses on the critical hit condition as opposed to the element exploit condition.
Preferably I would appreciate no paid plugins (e.g. yanfly, olivia, ect.)
yanfly buffs & states and passives lets you do it. both are free.
once you make the state, the state's notetag would include something like this

Code:
<Custom Confirm Effect>
if (this.isDamage() && this.isForOpponent())
  if (target.elementRate(this.item().damage.elementId) > 1)
    user.addState(x);
</Custom Confirm Effect>

then you make it a global passive in the plugin parameters so that everything has it
yanfly buffs & states and passives lets you do it. both are free. once you make the state, the state's notetag would include something like this

Code:
<Custom Confirm Effect>
if (this.isDamage() && this.isForOpponent())
  if (target.elementRate(this.item().damage.elementId) > 1)
    user.addState(x);
</Custom Confirm Effect>

I installed/activated both plugins, and inserted the code into the desired state, but it seems to not be applying, I have made sure to set the enemy's element weakness aswell.
i didint mention it, so my bad on that. did you replace the x in the user.addstate(x) line with the id of the state you want the user to get on hitting a weakness?
and youve ensured that your battlers actually have the state?
i didint mention it, so my bad on that. did you replace the x in the user.addstate(x) line with the id of the state you want the user to get on hitting a weakness?
and youve ensured that your battlers actually have the state?
Yeah, I've changed it to "user.addstate(11)" (11 being the ID of my state) and when I tried it out in battle, it didn't apply the state.
Yeah, I've changed it to "user.addstate(11)" (11 being the ID of my state) and when I tried it out in battle, it didn't apply the state.
I believe it has to be "user.addState(11)". That capitalization matters.
I believe it has to be "user.addState(11)". That capitalization matters.
changed it and tried it once more, still no dice..
I have both plugins installed and active, and I even put in the Yanfly Battle Engine core to see if that would fix the issue, still nothing..
i kinda just assumed you had the prereq plugins as well.
youll need the yanfly core engine, the battle engine core, buffs and states, and passives
Just to make sure that there's no confusion, you're putting that notetag in a passive state, not the state you want to add, right?
Just to make sure that there's no confusion, you're putting that notetag in a passive state, not the state you want to add, right?
I've... been putting it in the state I want to add ;-;

I really don't know how to work this plugin so how do I make a 'passive state'?
Okay, so I scrolled back up, and made it a global passive (since it seems I forgot to do that) but this doesn't solve my initial issue;

I want that state to be added when the user uses a skill that exploits an enemy's elemental vulnerability.

So let's say I use Fire (that does fire-type damage), and the enemy has a Element Rate of 101% or higher for the Fire element, using Fire on that foe should give me a status effect because I exploited that weakness.

In more digestable terms (since I tend to blabber on, sorry about that ;-; )
Harold casts fire (skill, has Fire element)
Bat A has a fire Element Rate of 101%
Because of using a fire attribute skill on an enemy that has a fire element rate above 100%, Harold gets inflicted with Smirk.
I want that state to be added when the user uses a skill that exploits an enemy's elemental vulnerability.
what did you make the global passive? when i said that, i meant for the skill that that tag goes into to be the passive. theres 2 separate states here. the global passive that everyone will have, and the state that gets added to the user via the passive for hitting a weakness.

if youve done that, when any battler exploits a weakness, they gain the state within the addstate()
what did you make the global passive? when i said that, i meant for the skill that that tag goes into to be the passive. theres 2 separate states here. the global passive that everyone will have, and the state that gets added to the user via the passive that they gain for hitting a weakness.

if youve done that, when any battler exploits a weakness, they gain the state within the addstate()
OH MY GOD THERE WERE 2 STATES???

Okay, so I did exactly that and NOW it works!!!

Thank you so much- I'm so sorry for all the trouble... thank you!!!!!!!!
This thread is being closed due to being solved. If you need it reopened, report it to let us know why. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/using-a-super-effective-move-on-a-foe-gives-the-user-a-status-effect.164324/