Skill dialogue

I want to make it so that, when a skill is used, there is a short dialogue between the character and the enemy before the effect activates. The main roadblock so far is that I can't figure out how to determine which actor used the skill, which enemy is the target, and what type of enemy they are within the common event so that I can display the correct names and faces. What would be the simplest way to do this?
What approach are you using to make the common event play before the skill effect? Force action? Plugin(s)?
Yeah, that's been another problem. I've been trying to use the Yanfly Skill Core plugin to add a pre-damage effect phase, but I've been having trouble getting that to work right. It seems like no matter what I do, it always runs after the skill effect or not at all. Ideally, I'd like to be able to run the skill effect within the common event too because I wanted to try making it so that it would show a choice that would affect the skill effect, but then I run into the same problem where I'd need to know which enemy is being targeted.
Pre-damage only means right before damage, thats probably why it doesnt work..

You probably need to use Yanfly's Action Sequence to have effects that run before even the animation starts.

Or make the skill do almost nothing but save the actor and target in variables so that you can use them in the common event.

Like it should have no animation, make it run the common event via the effects box and do this on the damage formula

Code:
$gameVariables.set(ID,a.actorId());$gameVariables.set(ID,$gameTroop.index(b));0

Only downside though is it will show 0 damage first. Take note that Im not sure if those are the right calls to get the ID and index of the actor and target.
In the damage formula you can use this notation for setting variables (as mentioned, though, this'll show a damage popup):
Code:
v[1] = a.actorId(); v[2] = b.index(); 0
In other battle-related contexts (e.g. a Skill Core notetag like you mention) you can use this instead:
Code:
$gameVariables.setValue(1, user.actorId());
$gameVariables.setValue(2, target.index());
By default, though, the common event will always play after the damage formula has been evaluated and applied. One workaround is to make two skills: the first does nothing more than set the variables based on the selected target and call a common event. In that common event you can do the talking then branch based on those variables to apply an appropriate Force Action with the second skill, which will actually do the damage etc. This can be very clunky, since the Force Action event command does not offer a "target by variables" thing, meaning it's often easier to resort to scripting... 😔

Like Engr. Adiktuzmiko, I would also suggest Yanfly's action sequences, though that approach needs Battle Engine Core and, preferably, Action Sequence Pack 1. You can then put something like this in your skill's notebox:
Spoiler: <target action>
Code:
<target action>
change variable 1 = user.actorId()
change variable 2 = target.index()
common event: 5
perform action
motion wait: user
action animation
wait for animation
</target action>
This says "set game variable 1 to the user's actor ID, set variable 2 to the target's index in their unit (0 = first enemy in the troop), play common event 5, then do the normal action stuff on the target". The common event is then just the chit-chat or whatever, and will occur before the main action. Change the numbers as needed for your game. 😤

Oh, and if you use the latter approach and aren't already using Battle Engine Core, be aware it adds "casting animations" that occur immediately before the main action stuff. If you want to disable these in general, you can set the plugin's Physical Animation and/or Magical Animation parameters to 0 in the Plugin Manager~ 😮‍💨

Original thread: https://forums.rpgmakerweb.com/threads/skill-dialogue.110875/