StatAllocation patch


Greetings all.

I have uploaded a small patch will make projects using the YEP_StatAllocation plugin no longer crash when block chance is being calculated. This would happen on the status screen (if the exparamfix or the menu extension were being used), or when an actor is subject to an attack that could be blocked, and they're able to block.

The cause of the compatibility issue is that the Yanfly plugins dealing with xparams all assume that there will always be 10 xparams, and my block chance plugin adds an eleventh one. Because they assume there are only 10, a lot of their functions, for example the one that checks how many times a given actor has allocated points into an xparam, the default value of 0 is never applied to the 11th xparam, meaning when that function goes to look it up, instead of getting zero, it gets null, or undefined, causing the crash later in the calculation.

For this patch, I simply made the problem function return 0 if it is asked for the value for xparam(11). If you want functionality to add stats to block chance, this will not do it, though.

That's all for now.

~Ramza

Files

statallocationfix.js 522 bytes
May 05, 2022

Get MV - Shield Block

Buy Now$12.99 USD or more

Leave a comment

Log in with itch.io to leave a comment.