MV Calculating damage potential on item description with Yanfly Item Core

Hey all,

Something I thought might be useful is if my items straight up showed their damage in their tooltip. Right now I just say stuff like "40 damage, increased by user level." But I realized with Yanfly's item core I could get fancy and actually show the final number by storing the info in a variable. It looks like this:

<Info Eval>
var damage = 40 * (1 + (($gameActors.actor(1).level - 1) * 0.1));
var dvar = 15;
$gameVariables.setValue(dvar, damage);
</Info Eval>

Then I simply shove the variable into the item's description. At level 1 it shows 40 damage, and at level 10 it's 76. The problem is this number simply shows "0" until I equip the item. Then when I go back and look at it, it will update the number properly.

I tried the "mid-note parsing" option but that didn't do anything. Is there some kind of way to get this to update as the player is scrolling through items (both in equip and in shop)?
I don't think there's a way unless you wanna show all actors at once. Cause how will it know which damage number to show if you're just scrolling through the shop?

So Ideally you can just put the info box like this:
User casts fire dealing "40 * Level" as fire damage. (dmg = X)
and X is the variable.
@ArcaneEli Only Actor 1 is ever going to be considered in these tooltips with how my game is designed. Does that change the situation at all?

And yeah, I can write out the formula. In my experience, a disparagingly large percentage of gamers absolutely hate dealing with even the most basic of math.
Hey all,

Something I thought might be useful is if my items straight up showed their damage in their tooltip. Right now I just say stuff like "40 damage, increased by user level." But I realized with Yanfly's item core I could get fancy and actually show the final number by storing the info in a variable. It looks like this:

<Info Eval>
var damage = 40 * (1 + (($gameActors.actor(1).level - 1) * 0.1));
var dvar = 15;
$gameVariables.setValue(dvar, damage);
</Info Eval>

Then I simply shove the variable into the item's description. At level 1 it shows 40 damage, and at level 10 it's 76. The problem is this number simply shows "0" until I equip the item. Then when I go back and look at it, it will update the number properly.

I tried the "mid-note parsing" option but that didn't do anything. Is there some kind of way to get this to update as the player is scrolling through items (both in equip and in shop)?
I avoided that problem long time ago by using WAY_Core and WAY_EvalText below Yanfly plugins. Plus waynee95 eval text for descriptions is simple. You only need to use ${} and eval text in between {}.
UseWaynePluginsInstead.png

WAY_EvalTextWorks.png

TestList.png

Edit: By the way WAY_EvalText works in all description or message boxes.
Yanfly also has a Message Eval plugin, that also works in item descriptions. That's what I used for this usecase.
@eomereolsson Oh, derp! I was looking at the wrong plugins for this functionality. This works much better. And no variables needed!

@Zeireth Thanks for the suggestion. Since I already have a bunch of Yanfly plugins, I think I'll stick with his version.

Original thread: https://forums.rpgmakerweb.com/threads/calculating-damage-potential-on-item-description-with-yanfly-item-core.148835/