Game has ecountered a bug.

● ARCHIVED · READ-ONLY
Started by AldoR 10 posts View original ↗
  1. Hi everyone, I hope this is the right place to post this. I'm making some practise with RPG MV, using Yanfly plugins. And here the problem.
    My test project, is working, I can play it, until I've created an event on the Worl Map, that gives a lot of experience amount to the main actor, reaching the max level, 100. (Set it up with the CoreEngine). The World Map has random encounters, and when the main actor's level is 100, walking around, the game stop itsefl, showing me multiple errors. But when I'm walking on the map, with a normal actor's level, (reached through the game, that is 6), I have no problem with encounters or battle, they start and finish, without a problem.
    In the enemy's note tage I used the formula <Base Parameters on Class: 1>(This one got me the error.) And I tried another formula in the note tag, instead of the Enemy Based Param plugin, form the Enemy Level plugin, <Static Level: x>, and with this, all work properly. I checked the js files, and I guess there's some issues with the calculation of the various parameters. Did I mess up some settings? Or am I doing something wrong?
    Thanks for the attention. RPGMV_bug.JPG
  2. Before moving this to JS Plugin Support, it would be worth looking at the event you created which gives the extra EXP in case that is where you made the error. Please post a screenshot of the event page - don't crop it, as we need the information on the left side and tabs, not just the actual commands themselves.
  3. Please add screenshots of all relevant notetag from your database that are related to this problem. Links to the plugins that are part of this issue would be nice too.
  4. Plugin order might be an issue as well.
  5. Plugin order as well as core script / plugin versions.

    Could you please trigger these error messages, then go to the developer tools (F8), to the Console window, and post a screenshot of that as well?

    Also open your project folders (Game > Open Game Folder), go into the js subfolder, open the rpg_core.js and let us know what version is on the first few lines.
  6. The relevant part of the code:

    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];
          var j = this.currentClass().params[paramId][98];
          i += (i - j) * (this.level - 99);
          return i;
        } else {
          return cl.params[paramId][this.level];
        }
      }
    };

    The script is trying to call the "currentClass()" method on Game_Enemy, but that method does not exist (i.e. 'undefined'). I would lean towards saying this is a bug in the script.
  7. Here the screenshot of the event that give EXP, I use the italian verson of RPG MV, sorry for that.
    ExpEventpg1.JPG ExpEventpg2.JPG
    Then, this note tag is what makes the problem. The plugin is YEP_X_EnemyBasedParam.
    NoteTag_wp.JPG
    And with this one, I have no issues. The plugin is the same as above, YEP_X_EnemyBasedParam, but I used a different formula.
    NoteTag_np.JPG
    The plugin order:
    PluginOrder.JPG
    These are the console errors:
    ConsoleErrors.JPG
    And the rpg_core.js version:
    RpgVersion.JPG
    So, what I can do about that bug?
    Thanks everyone! Very, very much. I hope you found these screens useful!
  8. get a wait into the parallel process before switching off the second page.

    without a wait, that button might work once per frame and that might result in multiple EXP gains within a single second.

    EDIT:
    And I suggest you remove the spaces from your folder structure.
    That has nothing to do with this error, but it will cause problems on deployment.
    Just check your error messages: every symbol that is replaced with a %-number combination in those is a letter that is illegal under networking rules and that the engine has problems to use, like the space in your "sword masters"
  9. Bug identified.
    Culprit function:

    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]; //culprit line
          var j = this.currentClass().params[paramId][98]; //another culprit
          i += (i - j) * (this.level - 99);
          return i;
        } else {
          return cl.params[paramId][this.level];
        }
      }
    };

    inside YEP_EnemyBaseParam.js, begins at line 253

    What the problem is with this:
    For lower levels it works OK. For levels 100 and higher it doesn't.
    The reason is, this.currentClass () is unique only to Actors, it's not for enemies. You can see that in the first two lines Yanfly has used a different code from this.currentClass() to get the monster's class. In fact the current class of the monster is saved in variable "cl".
    Solution:
    Replace all instances of this.currentClass() with cl
    since Yanfly has defined cl as the monster's current class.

    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 = cl.params[paramId][99];
          var j = cl.params[paramId][98];
          i += (i - j) * (this.level - 99);
          return i;
        } else {
          return cl.params[paramId][this.level];
        }
      }
    };
  10. Thanks a lot! To all of you!
    I added the wait process before switching off the secon page, and removed the space in the folder structure.
    Poryg thank you for the edit!
    I really understand what I was doing wrong, thank to all of you!!!