Paper Mario "Tattle" Skill?

Is there a way I can make a skill like the tattle skill from Paper Mario?
You have a couple options, but you'll likely need plugins.

The first option is to use the skill to call a common event. When I tried this, I used Yanfly's Skill Core to set a variable to the enemy ID of the target. From there, I'd set up the common event to check that variable using an If/Else and show the appropriate text. But depending on the number of enemies in the game, the common event can wind up being massively long to contain the info for every enemy.

A second option is to create a plugin for this. This route is more difficult, but if it's done well, it won't require a huge common event that could potentially cause lag spikes. To do this, the plugin should be set up so that:

The Tattle Skill has a notetag that triggers the Tattle effect;
Each enemy has a notetag that shows the Tattle text;

Or a plugin for this may already exist, although I don't know of one.
Sorry to bother you, but can you post the command that sets the variable to the enemy ID? I'm a noob at RPG Maker...
Well, first, make certain that you have the Yanfly Skill Core plugin to make this work. Here's the link:

http://yanfly.moe/2015/10/13/yep-8-skill-core/

Then, in the notebox of the Tattle skill, add this tag:

<Before Eval>
if (target.isEnemy()) {
$gameVariables.setValue(variableID, target.enemyId);
}
</Before Eval>

Replace variableID with the Variable ID that you want to use for the effect.

Next, attach a common event to the skill. In that common event is where the Tattle text will go.

Side note: if you're new at RPGMaker, it may be more useful to just experiment with the engine for a while before attempting anything major with it. Learn the system and try different things to see what works.
So I tried for awhile to get it to work, and it doesn't. I did some testing and I don't think the note tag is affecting anything, but it does call the common event. In the common event I put a text box that says the number of the variable with \V[4] and got this back when I called the common event:
eMVRQN1.png

Is there anything that you think I might've gotten wrong?

(Also I did have the plugin installed and thank you for your help so far)
<Before Eval>
if (target.isEnemy()) {
$gameVariables.setValue(4, target._enemyId);
}
</Before Eval>

I forgot to include the underscore before enemyId. Try adding the underscore and see if that fixes it.

Original thread: https://forums.rpgmakerweb.com/threads/paper-mario-tattle-skill.103713/