Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

Greetings.

I still can't reproduce this on my test project, and it looks like the version of the stat allocation plugin I'm using is not the same as the one you have, as the functions throwing the error are on different lines on my version.

With that being said, I suspect the problem is the below function:

Yanfly.StatAlc.Game_BattlerBase_xparam = Game_BattlerBase.prototype.xparam;
Game_BattlerBase.prototype.xparam = function(xparamId) {
  var value = Yanfly.StatAlc.Game_BattlerBase_xparam.call(this, xparamId);
  value += this.xparamAllocationBonus(xparamId);
  return value;
};

I'm not sure at what point it is called, but it would appear that it isn't playing nice with the fact that I've defined block chance as xparamId 10. So it's looping through the normal xparams and then getting to block chance and breaking. I think if we edit the function to abort if it detects that it's on Id 10, it should be fine, but since I can't duplicate the problem myself, I can't verify if the fix actually works either.

Copy the below text into a blank .js file, and import it into your plugin manager at the bottom of the list.

Yanfly.StatAlc.Game_BattlerBase_xparam = Game_BattlerBase.prototype.xparam;
Game_BattlerBase.prototype.xparam = function(xparamId) {
  var value = Yanfly.StatAlc.Game_BattlerBase_xparam.call(this, xparamId);
  if (xparamId != 10) value += this.xparamAllocationBonus(xparamId);
  return value;
};

This will overwrite the function that I suspect is causing the issue, and should(hopefully?) fix it for you. Let me know if it doesn't work, and any new errors you get.

-Ramza

Hi Ramza, I am using v1.02 of the Stats Allocation, which is the latest that Yanfly has. I have a new error message after applying the fix, related to stack overflow.


(+1)

Sorry, take out the top line in the fix I posted earlier. By copying the alias function it ends up calling itself infinitely, causing the stack overflow error.

Thank you! It works perfectly now.