MV Showing variables linked to an item in the description (YEP Item Core)

Hi everyone, I'm using this script to show evals in the weapons and armor descriptions.

The weapons and armors I'm using have a randomly generated weaponDamage variable attached to them during the item creation process utilizing Yanfly's Item Core.
What I'm trying to do is show the generated item's variables in the eval, so when the player hovers over the item (not equip it) using the arrow keys, it'll show the called variables on creation.

As an example, utilizing a random formula I made up:

JavaScript:
<On Creation Eval>
item.ilvl = 5;
item.weaponDamage = 20 + Math.floor((item.ilvl * Math.random()*5)**1.02);
</On Creation Eval>

If say, item.weaponDamage spat out 32, I would like to display it in the description without having the player actually equip the weapon somehow, basically making the value based on the weapon/armor instead of actor.
Something like
JavaScript:
+#{item.weaponDamage} weapon damage
I get a "item is undefined" error so I'm not sure how to exactly do this.

Sorry if this sounds confusing.
Hmm, this might not be very straightforward; independent weapons basically add themselves as a new element in $dataWeapons; at the point of the code where the eval happens "item" doesn't exist because it's an addition to the function that converts escape characters, so you need to reference the item directly. But you don't know its ID at runtime because it's generated when the item is created. I'll have to think about this one.

Original thread: https://forums.rpgmakerweb.com/threads/showing-variables-linked-to-an-item-in-the-description-yep-item-core.135516/