MV Trying to make a Skill Description display its user's stats. Using YEP_X_MessageEvalText.

(I'm using Yanfly plugins, but most importantly I'm using YEP_X_MessageEvalText.)

So, I have made a Skill which will deal damage anywhere between the user's ATK and MAT. I already have the damage formula working just fine, and do not need help on that. What I don't know how to do is to make the Skill's Description write out those stats for the actor who's currently using the skill.

So, right now the skill's description reads:

"Attack for \evalText<<$gameActors.actor(1).atk>>-\evalText<<$gameActors.actor(1).mat>> damage."

So, as an example, if Actor 1 has an ATK of 25 and an MAT of 50, this will read:

"Attack for 25-50 damage."

All this works totally fine! But, this only shows Actor 1's stats. Any Actor can learn this skill, though. I need to get the ATK and MAT of the Actor who knows this skill and the game is currently selecting, inside of combat or outside of combat, not just Actor 1.

I don't know if there is a way to do this. I sure hope there is a way! I don't care if the skill description needs to be comically long. As long as it works it is fine by me.
thats one of the reasons i use waynee95's eval text plugin myself. it has an "a" variable that corresponds to the current actor in focus in scenes that have them. so in your case, you'd use
Code:
"Attack for ${a.atk}-${a.mat} damage."

using the yanfly one, you'd have to check the current scene and use different code for each. from the skill scene, itd be $gameParty.menuActor(), but within battle scene it wouldnt work and youd want to use BattleManager.actor() instead.

theres a possibility that you can use the display eval notetag from the skill core to save the actor's parameters into a variable and then use yanfly's message eval to display those variables, but i dont know if the display eval is ran before the help window's contents are drawn. its intended use is to set up display costs in the command menu
Okay, so I made a quick little function:

Code:
Titan_SkillActor = function() {
    if($gameParty.inBattle())
        return BattleManager.actor();
    
    return $gameParty.menuActor();
};

Now, the Skill Description reads:

"Attack for \evalText<<Titan_SkillActor().atk>>-\evalText<<Titan_SkillActor().mat>> damage."

It seems to work! I'm not sure if this is the most elegant solution, but as of now it works.

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-make-a-skill-description-display-its-users-stats-using-yep_x_messageevaltext.172601/