Using the Visustella Core <JS xparam Plus: code> notetag I want to make a state that increases the user's EVA by a percentage of their AGI, but i cant seem to figure out the JS code necessary to make this work, I tried <JS EVA Plus: 0.02 * target.agi> but it says target isn't defined. Is there a way to get the stats of battler effected by a state to use in this notetag?
MZ Trying to make a passive state that gives a bonus to one stat scaling off another.
Javascript/Plugin SupportParameters aren't being calculated as a part of battle, so no one is the target of anything.
Try
userconsole also says user is not defined, more specifically:
Code:
ReferenceError: user is not defined
at eval (eval at JOAzy (VisuMZ_0_CoreEngine.js:1), <anonymous>:1:8)
at eval (<anonymous>)
at Object.JOAzy (VisuMZ_0_CoreEngine.js:9363)
at _0x125e73 (VisuMZ_0_CoreEngine.js:9363)
at Array.reduce (<anonymous>)
at Game_Actor.Game_BattlerBase.<computed>.<computed> (VisuMZ_0_CoreEngine.js:9363)
at Game_Actor.Imported.<computed>.Game_BattlerBase.<computed>.xparamPlus (VisuMZ_1_ElementStatusCore.js:3556)
at Game_Actor.Game_BattlerBase.<computed>.xparamPlus (VisuMZ_2_EquipSetBonuses.js:1498)
at Game_Actor.eval (eval at VisuMZ.<computed> (VisuMZ_0_CoreEngine.js:1), <anonymous>:6:17)
at Game_Actor.Game_BattlerBase.xparam (VisuMZ_0_CoreEngine.js:9363)
In my experience, after updating Core Engine to 1.83, the game seems to think "this", "target" or "user" no longer exist when used with JS params (haven't confirmed this in a blank project yet, though). Normally, however, you'd use "this". 😅
When using "this" it doesnt display an error, but when viewing the eva param in the status scene it says "NaN%" and in combat enemies bug out when trying to attack.
Original thread: https://forums.rpgmakerweb.com/threads/trying-to-make-a-passive-state-that-gives-a-bonus-to-one-stat-scaling-off-another.169884/