Yanfly BattleCore: TypeError undefined is not a function

Hey guys, I've been working on the battle system end of my game and I opted to go with Yanfly's Battle engine core v1.39b. Unfortunately I've encountered a problem relatively early on, which I see this error at the beginning of the player team's second turn. I've tried disabling all other plugins other than the battle core, but to no avail. Any suggestions?
Edit: also my current game version is 1.31.
 


rpgmakererror1.png
Hmm...


What did you change on it from the default? Maybe a formula you made is giving the error?
Hmm...


What did you change on it from the default? Maybe a formula you made is giving the error?

No changes were made. To troubleshoot, I've dried deleting the entire plugin both from the game menu and the game folder itself, restarting the program, and then downloading a new copy of the plugin and trying that, but to no avail. I'm going to start a new project to see if that works, but the project that I've been working on all day was created today, so it shouldn't be a version issue.


Edit: I just created a new project with the plugin being the only sole plugin installed, and I still encounter the problem. To my knowledge the Battle Core does not have any other plugins that are required, is this correct?
did you start a new game or did you load a saved file when this error happens?


"undefined" usually happens in one of two cases - either loading a savefile that is missing the required data (because it was saved before the plugin was activated) or if there are several incompatible plugins.


However, there is one additional possibility in this specific case: it can be a misconfiguration, because Yanfly has a lot of defaults preset. For example, the battlecore has specific animations set for sideview in plugin properties, and if you deleted some of the default animations in your project, that could also result in such errors.


(or if it isn't the animations, then it could be one of several other presets, please check them all)
did you start a new game or did you load a saved file when this error happens?


"undefined" usually happens in one of two cases - either loading a savefile that is missing the required data (because it was saved before the plugin was activated) or if there are several incompatible plugins.


However, there is one additional possibility in this specific case: it can be a misconfiguration, because Yanfly has a lot of defaults preset. For example, the battlecore has specific animations set for sideview in plugin properties, and if you deleted some of the default animations in your project, that could also result in such errors.


(or if it isn't the animations, then it could be one of several other presets, please check them all)

I've never have changed any settings, and I have reinstalled the script multiple times through different projects, getting clean versions of each plugin to make sure there isn't anything changed within the plugin. I"m running out of things to try and I am considering postponing the combat section of my project for a while so I can get more done; however this is a roadblock that I must overcome eventually so all advice is welcome.


I have RPG Maker MV installed on another computer to see if is some issue with my current installation on this computer.
For what it's worth, I'm seeing an identical error under the same circumstances, while using the default parameters.
Same issue, same game version. TypeError on 2nd turn. maybe we should contact yanfly about this?
@Ghostsniper64, @Amazoness!, @KimiRaven


I think you all missed my point.


The question I asked is


"have you configured the plugin, or did you just place the file, activated it and then ignored its configuration options?"


You CANNOT expect every plugin to work just by placing it, the more complex cases REQUIRE you to configure them BEFORE they can work.


This is especially true because Yanfly's scripts are extremely stable - there are thousands of users of that battleengine, and everyone else gets it to work - so where do you think the error has to be? If that was a general bug in the plugin, you would have read about it before.


Additionally, it would be nice to check if all your files are completely updated - there have been changes in 1.2.0 and 1.3.0 that required changes in the plugins as well, and the only way to make sure that everything works together is to have both the project's files and the plugin file updated to the latest version (which is 1.3.1 for MV and Projects). Just remember: updating the editor will never update your projects, that has to be done manually.
Hello, just made this user account to post here!


I got the same exact problem as you guys. For troubleshooting - I too created a completely new project and only set the plugin ON, but it's still crashing. Absolutely no settings changed, all files intact and all.


@Andar, what do you mean with configuration options? With my original project I tweaked some of those options I belive you're talking about, but there seemed to be no "MUST-CONFIGURE" stuff there. at least not that I'd notice anyway.
all plugin properties


yes, they have default values - but several of those defaults assume settings that are not guarenteed in any project, and you will get errors if the default value does not fit your project.
@Andar


I'm using version 1.3.1 of the editor, which is the same version I originally installed.


Similarly, I'm using version 1.39b of the plugin, the same version I originally installed.


As for the plugin configuration options? Yes, I've looked at them. I initially changed some of them, though once I started noticing this error, I changed everything back, assuming at first that one of the parameters I'd changed had caused this.


Now what I'm finding is that in a new project, with no other plugins and everything at default, this still happens. If there is some configuration that needs to be changed in order to prevent this, there's nothing in the documentation to say so.


I am, as is probably quite evident, very new at this. If I'm making some kind of glaring newbie mistake to cause this then I apologize for wasting everyone's time, but I'm confident that I've installed this thing correctly, and I see no obvious configuration relating to this that needs to be changed.


(I will also note that somebody has submitted a bug report for this problem in the main YEP thread.)
I may have found solution, thanks to @Ghostsniper64 image, referring to line 1577 on YEP_BattleEngineCore.js may or may not have conflict with rpg_managers.js on line 2222,


Changed BattleManager.refreshAllMembers(); to BattleManager.endTurn(); seems to work. But other effect or instability is unknown, this may be a quick fix but maybe it's better to wait for Yanfly official update
Ah yes KimiRaven! Works for me too thanks a lot!!! ^^
Looks like this was indeed a bug in the newest version of the plugin. The corrected version has been uploaded, and I can confirm it fixes the problems we were seeing.
Looks like this was indeed a bug in the newest version of the plugin. The corrected version has been uploaded, and I can confirm it fixes the problems we were seeing.

Well, I'm glad that we were able to solve this problem and that it got updated! Case closed as far as I'm concerned: just tried the new version and it worked just fine for me. Cheers

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-battlecore-typeerror-undefined-is-not-a-function.68833/