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:
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
I get a "item is undefined" error so I'm not sure how to exactly do this.
Sorry if this sounds confusing.
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
Sorry if this sounds confusing.