Self-Inflicting Status Effects

Long story short: I've made a weapon that attacks three times but then disable movement for the next turn, but since I don't know rpg maker scripting and there's no self-inflicting states in the weapon options I've made it something like this:


Weapon causing state x foe-> common event causing state y to actor if foe has state x -> state paralyse actor for 1 turn.


but it doesn't cause any status effects.


The only scripting involved is this line "if : script :$gameParty.inBattle()" but it also doesn't work if I remove it so...


Please tell me of a better way to do this that actually works but please also tell me what I did wrong.
Add this in your formula:  a.add_state(x);


Then after that add your damage formula. This will inflict the state after the damage is done.
Add this in your formula:  a.add_state(x);


Then after that add your damage formula. This will inflict the state after the damage is done.

It's a weapon, not a skill.


Where do I put damage formula?
Then please give us a screenshot on how you managed to make that weapon, especially the common event.


Because by default, only skills do damage and all equipment (no matter if weapon or armor) only apply bonuses to values that are then used by skills.


There are several ways around this, but to decide which one would be usable here we need more info about how you plan to do that weapon (especially as calling a common event is not possible as a trait, only as an effect, by default)
It's a weapon, not a skill.



Then your gonna need a plugin to change the default attack for that weapon. I believe MV already comes with WeaponSkill plugin by default. 

Where do I put damage formula?



In the database skill tab there is a box labeled damage formula. Put that in before other numbers and the state will be added. 
Then your gonna need a plugin to change the default attack for that weapon. I believe MV already comes with WeaponSkill plugin by default. 


In the database skill tab there is a box labeled damage formula. Put that in before other numbers and the state will be added. 

That's more complex than you made it out to be at first, but thanks, it worked.


BTW, appearantly It's "a.addState()" in RPGmakerMV.
Add this in your formula: a.add_state(x);


Then after that add your damage formula. This will inflict the state after the damage is done.
will this work in MZ?
Necro-post notice: @Oddball

You could just try it 😉

add_state is a VX/VX Ace command, not MV/MZ. The MV/MZ equivalent is in the post right before yours.

Original thread: https://forums.rpgmakerweb.com/threads/self-inflicting-status-effects.61328/