I am using Yanfly plugins and Olivia plugins and during a boss battle i use some "Force-Actions" when life drop at 50% then 25%.
Sometimes the game enter in conflict and sometimes not. I have no clue to know what make this happen.
I took a screenshot if someone understand it better than me he will be my savior,
I think this generally means the JSON can't be parsed, which indicates you have something wrong with your notes somewhere.
Can you narrow it down to a particular force action or a particular skill or weapon or something? If not, you'll have to start checking every slot in every database tab, to see if you can find one that's not correct.
As the error is in JSON.parse, I think it's SOMETHING wrong with whatever it's trying to make a copy of. Could be a skill, could be an actor or enemy, don't know without looking at the plugin. I would first look at your notes, but it could also be some weird characters in a description or name somewhere.
Can you get a screenshot of the console when you get the error (play, get the error, hit F8 to open developer tools, click on Console tab). That might have more information.
Hey there gang. I have been getting a seemingly random crash in battle. I understand most of the error code but it references a .json.parse () and that is throwing me off I was hoping some could help me with this one. My MV is version 1.6.2. I'll post an image of the error below. Big thanks for...
Previously when I've encountered this "JSON.parse token u at position 0" error, it has meant that something tried to JSON.parse(undefined). Given that line 2015 of Yanfly's Battle Engine Core seems to be this:
JavaScript:
action: JsonEx.makeDeepCopy(this._action),
...I would suspect that the error is due to BattleManager._action being undefined. This is possible if the battler in question is immobilised, since in that case their action queue will be empty and the first action undefined.
There could be other reasons for an empty action queue, e.g. if they've already completed their action phase this turn. Since this "remember previous action" thing is introduced by Yanfly's Battle Engine Core, I think the most effective solution would be to patch that plugin somehow. It would be best to try to reliably reproduce the problem first, though: that way you can be much more certain that any fix you find actually does (or doesn't) work.
I came up with something that might solve the problem (just theory, I haven't tested it). Save the following code as a .js file (Save As > File Type: All Files, Filename: whateverYouLike.js), import as a plugin, and make sure to load it immediately after Battle Engine Core in the Plugin Manager~
JavaScript:
// Place immediately below YEP_BattleEngineCore in the Plugin Manager
// Override - "no action" failsafe to avoid JSON.parse failure
BattleManager.setPreForceActionSettings = function() {
return {
subject: this._subject,
action: this._action ? JsonEx.makeDeepCopy(this._action) : undefined, // <- edit 1 of 1
actionList: JsonEx.makeDeepCopy(this._actionList),
targets: this._targets.slice(),
allTargets: this._allTargets.slice(),
indTargets: this._individualTargets.slice(),
phaseSteps: JsonEx.makeDeepCopy(this._phaseSteps),
returnPhase: this._returnPhase,
phase: this._phase,
conditionFlags: JsonEx.makeDeepCopy(this._conditionFlags),
trueFlags: JsonEx.makeDeepCopy(this._trueFlags)
}
};
// Override - do not restore "no action"
BattleManager.loadPreForceActionSettings = function() {
var settings = this._forceActionQueue[0];
if (settings) {
this._forceActionQueue.shift();
if (!settings.action) return false; // <- edit 1 of 1
this.resetPreForceActionSettings(settings);
return this._subject && this._subject.isAppeared();
} else {
return false;
}
};
Got again the same error after view test. It seems to happen also when a state "Paralysis" (made with Yanfly Tips and Tricks) goes on my last Heros to play, just before the new turn starts.
In the console i got this "
SceneManager.catchException = function(e) {
if (e instanceof Error) {
Graphics.printFullError(e.name, e.message, e.stack);
console.error(e.stack);
} else {
Graphics.printError('UnknownError', e);
}
AudioManager.stopAll();
this.stop();
I tried to understand and do more changes but i don't get where is the error.
Hi @caethyril thanks for your answer, i did try to put your fix by going on your post and saving as whatevernam.js and it still did the same error. What i tried also is to change Yanfly Paralysis state notes by cuting the "message" part. (Now i did dowload your Fix by google drive to see if it's maybe also me that just stupid haha)
But i think by reading the console it seems that there is a problem with position, force actions and messages.
And the error always appear when my last guy get Paralysed before the boss turn starts (then he has to force action and bam error).
It looks like that state just removes actions. Are you making the boss do Force Action, or your (paralyzed) guys?
Does the error happen if you turn off all other plugins except Battle Engine Core and Buffs & States Core, save your project, and test? Maybe it's some kind of plugin conflict or load order problem.
Actually, I just checked and it doesn't look like line 2040 in YEP_BattleEngineCore has any code in my copy (v1.51). For me, setPreForceActionSettings ends on line 2029. Which versions are you using of:
RPG Maker MV?
You can check the editor version via Help > About.
Project core scripts?
You can check your core script version from the editor by choosing Game > Open Folder, then open js/rpg_core.js in a text editor (e.g. Notepad). The version should be in the first couple of lines, e.g. I see this in mine:
It might be just because you're using an old version of Battle Engine Core, or loading plugins in an unusual order, so check that stuff then save your project to see if that helps~
If your core scripts and editor aren't the same version, that might be a problem. You can follow the instructions in this announcement to update your project:
6/21/2018 Everyone, please read the instructions carefully. The bugs that are being reported shouldn't happen if the correct files were even copied properly. Such examples like the "CTRL BUG" shouldn't happen if you copied index.html, package.json, the rpg*.js files and so on. I also received...
Hi @caethyril, i update Battle Engine Core, my Version of Rpg Maker is 1.6.1
I am using Force Actions on my boss for him to cast more spells depending on how the battle evolve.
I will try to see if the error appears again because it always happen only in the end of the turn and if my last character is paralysed (because my boss use Thunder spells and have a chance to Paralyse, so a lot of random conditions to arrive to the point where my last character is getting tuched, paralysed and the effect of paralyse appears (33% chance to stop him to make his action)
So i will run more test untill the error appears or not. But anyway thanks for help, i will say that this post is closed, if i have this error again i will try to fix it even if i will need to change this paralyse state.
I'm moving on from RMXP finally. I've been stuck in a difficult decision between XP and MZ, and I've given up and moved on to MZ. Overall I'm really liking it, I wish tilesets were easier to setup like XP, but it's actually not that bad!
I've been using a modified version of a script called Multiple Messages. It makes my text boxes look like a Mario & Luigi game! There is something about it that bothers me a little bit, but I shouldn't worry about that now.
Side note, Mist's walking animation is almost perfectly in sync with Loose Yourself by Eminem.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.