YEP_EquipCore Returning NaN in Equipment Formula

Sketchward

Veteran
Veteran
Joined
Jul 26, 2016
Messages
111
Reaction score
8
First Language
English
Primarily Uses
RMMV
Seems to be an issue with using that particular eval for the plugin notetag.

Just confirmed with a console.log that custom parameters notetags are evaluated every frame while on the equipment screen, so yeah. Trying to use any stat of the equipped character causes the call stack to be exceeded.

After some playing around, I realised some of the slowdown was being caused by a per-frame console.log I was running as a debug elsewhere; removing that did make an improvement, but it's still reaaaaaaaaaally slow. Takes about 20 seconds to show the stat change.

@Sketchward I've found a way to implement this; the only thing is that you don't see the increase when equipping it.

Give the weapon 10 base ATK, then create a passive state for the weapon with the following notetag:

Code:
<Custom Initiate Effect>
a._hpMod = Math.floor(10 * (1 - a.hp / a.mhp));
a.addParam(2, a._hpMod);
</Custom Initiate Effect>
<Custom Conclude Effect>
a.addParam(2, -a._hpMod);
delete a._hpMod;
</Custom Conclude Effect>
This will add atk based on lost HP when the actor starts an action, and remove the added atk afterwards.
Thanks so much for your time, I'm too tired to mess with it tonight but I'll try it first thing tomorrow and let you know if I run into any problems.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,786
Reaction score
5,332
First Language
English
Primarily Uses
RMVXA

@Sketchward , please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.

I've merged some of your double-posts in this thread together.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

for who interested in a example boilerplate pixijs with snowpack , i made a branch with pixijs .
Web and Desktop, nwjs is not required.
https://github.com/nwutils/SnowPack-nw/tree/PixiJs
I definitely give up Parcel bundler !
I wonder how many amazing games from the Completed Game/Games In Development forums that I just passed only because of an uninteresting title.


Doing more paralaxing. It isn't much, but it looks a lot less blocky now :)
aww these times when you feel alone, abandonned and lack the self awareness you don't even read anymore your favorite of all forum. Sorry all!
Oh wow, just got word the police are looking for an armed suspect within a 2 block radius of my office. Super glad I'm not there right now. :kaoswt:

Forum statistics

Threads
107,382
Messages
1,029,238
Members
139,477
Latest member
segit
Top