- Jul 26, 2016
- Reaction score
- First Language
- Primarily Uses
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.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:
This will add atk based on lost HP when the actor starts an action, and remove the added atk afterwards.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>