Yanfly enemy base params crashing game

Everytime with a battle.

[ERROR 4/23/2018 03:53:44pm] TypeError: this.currentClass is not a function
at Game_Enemy.classBasedParameterValue (chrome-extension://kmcklefpbipcgojefbeoemppffjeofpm/www/js/plugins/YEP_X_EnemyBaseParam.js:257:20)
at Game_Enemy.paramBase (chrome-extension://kmcklefpbipcgojefbeoemppffjeofpm/www/js/plugins/YEP_X_EnemyBaseParam.js:236:22)
at Game_Enemy.Game_BattlerBase.param (chrome-extension://kmcklefpbipcgojefbeoemppffjeofpm/www/js/plugins/YEP_BaseParamControl.js:660:19)
at Game_Enemy.Game_BattlerBase.param (chrome-extension://kmcklefpbipcgojefbeoemppffjeofpm/www/js/plugins/Ramza_DualWield.js:602:47)
at Game_Enemy.get (chrome-extension://kmcklefpbipcgojefbeoemppffjeofpm/www/js/rpg_objects.js:2135:42)
at Game_Enemy.Game_BattlerBase.recoverAll (chrome-extension://kmcklefpbipcgojefbeoemppffjeofpm/www/js/rpg_objects.js:2623:20)
at Game_Enemy.Game_BattlerBase.recoverAll (chrome-extension://kmcklefpbipcgojefbeoemppffjeofpm/www/js/plugins/YEP_BattleEngineCore.js:3570:44)
at Game_Enemy.Game_BattlerBase.recoverAll (chrome-extension://kmcklefpbipcgojefbeoemppffjeofpm/www/js/plugins/YEP_X_StateCategories.js:237:44)
at Game_Enemy.Game_BattlerBase.recoverAll (chrome-extension://kmcklefpbipcgojefbeoemppffjeofpm/www/js/plugins/YEP_X_LimitedSkillUses.js:744:44)
at Game_Enemy.setup (chrome-extension://kmcklefpbipcgojefbeoemppffjeofpm/www/js/rpg_objects.js:4311:10)
Are your plugins in the right order?
If you've added a plugin recently, are you starting a new game or resuming a previously-saved game?
Is it any battle, against any enemy, or only specific ones?
Do you need to set up enemy notes, and have you set them up correctly?

Got a link to the plugin in question?
Are your plugins in the right order?
If you've added a plugin recently, are you starting a new game or resuming a previously-saved game?
Is it any battle, against any enemy, or only specific ones?
Do you need to set up enemy notes, and have you set them up correctly?

Got a link to the plugin in question?

I haven't added or changed anything recently. It seems to happen on everyone with the base parameters now.

http://yanfly.moe/2017/05/31/yep-139-enemy-base-parameters-rpg-maker-mv/
It is trying to do something different because your enemy is > level 99
It is trying to do something different because your enemy is > level 99

Enemy level should around 55 or so.
this says otherwise:

Code:
Game_Enemy.prototype.classBasedParameterValue = function(paramId) {
  var classId = this.enemy().classBasedParam[paramId];
  var cl = $dataClasses[classId];
  if (Imported.YEP_X_ClassBaseParam && cl.baseParamFormula[paramId] !== '') {
    var formula = cl.baseParamFormula[paramId];
    return this.customEnemyBaseParamFormula(formula, paramId);
  } else {
    if (this.level > 99) {
      var i = this.currentClass().params[paramId][99];  <<<<<<<<<<<<< this is the line causing the error
      var j = this.currentClass().params[paramId][98];
      i += (i - j) * (this.level - 99);
      return i;
    } else {
      return cl.params[paramId][this.level];
    }
  }
};

So that bit of code only gets run if either you don't have the YEP_X_ClassBaseParam or the class of your enemy doesn't have that parameter set up, AND the enemy level is > 99.

Unless you have a different version of the plugin and it's a different line causing the error.
this says otherwise:

Code:
Game_Enemy.prototype.classBasedParameterValue = function(paramId) {
  var classId = this.enemy().classBasedParam[paramId];
  var cl = $dataClasses[classId];
  if (Imported.YEP_X_ClassBaseParam && cl.baseParamFormula[paramId] !== '') {
    var formula = cl.baseParamFormula[paramId];
    return this.customEnemyBaseParamFormula(formula, paramId);
  } else {
    if (this.level > 99) {
      var i = this.currentClass().params[paramId][99];  <<<<<<<<<<<<< this is the line causing the error
      var j = this.currentClass().params[paramId][98];
      i += (i - j) * (this.level - 99);
      return i;
    } else {
      return cl.params[paramId][this.level];
    }
  }
};

So that bit of code only gets run if either you don't have the YEP_X_ClassBaseParam or the class of your enemy doesn't have that parameter set up, AND the enemy level is > 99.

Unless you have a different version of the plugin and it's a different line causing the error.


It's 1.01 and accoarding to the player they're lvl 55 only.
http://yanfly.moe/yep/changelog/Is your plugin are updated...check yanfly release update for 1.6.1 beta...migth solved everything...
battleengine core 1.46
I don't use 1.61 since the core updates plugin by Yanfly causes game crashes and it's not very optimal on desktops without it.
well even if u dont use 1.6.1. it migth be a good try to copy ure game check the plugin your having problem with in a copied version with an update version of the plugin see for your self if it still doing the same thing... what are u losing to try...!😛👍
Do you also have an enemy levels plug-in. If so that might be raising your levels higher than you think or higher than it is displaying.
Do you also have an enemy levels plug-in. If so that might be raising your levels higher than you think or higher than it is displaying.

Yes, I have it but if the players are about 55 then the enemy is no way able to be 99?
Yes, I have it but if the players are about 55 then the enemy is no way able to be 99?

Well, it depends on how you set up the enemies in your project, only you can know that. As long as Shaz investigated the same version plugin that you have, her investigation must be accurate (because code doesn't lie).
It is up to you to recreate the situation that the player faced and determine what enemy level they were fighting, which is normal bug-finding procedure.

However, there could be other factors such as plugin order or incompatibilities.

For example, if you are using the Yanfly Difficulty Slider plugin, if the player sets it to 200% then the enemies would be 2x the level behind the scenes.
"this.currentClass is not a function"
This seems to be a bug in YEP_X_EnemyBaseParam. As previous stated it only seems to occur when the enemy level is set higher than 99. The workaround is to set [Maximum level] and [Maximum cap] to 99 in the YEP_EnemyLevels plugin.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-enemy-base-params-crashing-game.94470/