Skill creation help.

Hello friends.

I want to attack a target then debuff myself. In this instance the character attacking is supposed to die. But any state I attach to the attack applies itself to the enemy.

Ty in advance.
You can call a common event in the skill effects and apply knockout to that specific actor like that.
If you happen to use Yanfly's Skill Core, you can also use a notetag to achieve the effect as well.
JavaScript:
 <Post-Damage Eval>
  a.addState(1)
 </Post-Damage Eval>
If you happen to use Yanfly's Skill Core, you can also use a notetag to achieve the effect as well.
JavaScript:
<Post-Damage Eval>
a.addState(1)
</Post-Damage Eval>
This is great. Tyvm!
Hay, could I use this to apply, say, an attack buff before I attack? By using pre-damage? or something like that?
Hay, could I use this to apply, say, an attack buff before I attack? By using pre-damage? or something like that?
An attack buff to the user?
An attack buff to the user?
Yes, precisely. Boost attack, then attack.
Yes, precisely. Boost attack, then attack.
Did a quick test to make sure, and yes, you can. Just use the following notetag:
Code:
<Before Eval>
 a.addBuff(x, y)
</Before Eval>

Replace the x with the ID of the stat you're buffing (you would use 2 in this case, as you're buffing Attack) and replace the y with the number of turns the buff will last for. No point in using anything other than 1 since the user dies right after.

EDIT: Forgot to mention that you won't see the buff symbol appear on your character, but I did make sure to verify that the buff took effect when I tested it.
Replace the x with the ID of the stat you're buffing (you would use 2 in this case, as you're buffing Attack) and replace the y with the number of turns the buff will last for. No point in using anything other than 1 since the user dies right after
These will actually be two different abilities. lol Ty though! You're the best!
These will actually be two different abilities. lol Ty though! You're the best!
Ah, my bad. However, I do have something else to add. Turns out adding a buff/debuff this way doesn't seem to place the relevant icon over your character to let you know the buff or debuff is active. This can be sorted out by creating a blank state that lasts however long the buff or debuff will last, only having whatever icon you need to display selected, while adding the following notetag to the skill:

Code:
<Post-Damage Eval>
a.addState(x)
</Post-Damage Eval>

The x would be the number of the dummy state you're using.
Turns out adding a buff/debuff this way doesn't seem to place the relevant icon over your character to let you know the buff or debuff is active. This can be sorted out by creating a blank state
No need - you just need to refresh the battle scene.

In the state notetag, add
Code:
SceneManager._scene.refreshStatus();

Original thread: https://forums.rpgmakerweb.com/threads/skill-creation-help.160251/