Bug encounter on battle with Yanfly and Olivia plugin

Grumphlu

Veteran
Veteran
Joined
Mar 25, 2015
Messages
31
Reaction score
6
First Language
Français
Primarily Uses
Hi Everyone,

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,

Thanks in advance
 

Attachments

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,667
Reaction score
13,277
First Language
English
Primarily Uses
RMMV
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.
 

Grumphlu

Veteran
Veteran
Joined
Mar 25, 2015
Messages
31
Reaction score
6
First Language
Français
Primarily Uses
My force actions are all particular skills casted by my boss.

This error generaly happen in the end of a turn. Do you think this is a problem with my skill notetag ?

Look like there is a problem with the position of my ennemies maybe (i am realy not good with plugin and general coding...)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,667
Reaction score
13,277
First Language
English
Primarily Uses
RMMV
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.
 

Grumphlu

Veteran
Veteran
Joined
Mar 25, 2015
Messages
31
Reaction score
6
First Language
Français
Primarily Uses
Ok i will try to get the error, it might take some time, i will have to run many fights ^^

(Also thanks you so much for helping me :) )
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,712
Reaction score
1,162
First Language
EN
Primarily Uses
RMMV
This may be the same problem as discussed here:
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. :kaoback:
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. :kaopride:

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;
    }    
};
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,009
Reaction score
4,747
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Currently without internet due to storm damage and most of our state is devastated. No idea how long I'll be unable to log onto here, but I'll answer questions as soon as I can.
This is supposed to be pso2 photon blast inspired animation
I'm sure this question's been asked before, but I can't find an answer: is there any way to run the Steam version of RPGMaker *without* being logged into Steam? It's a frustrating extra step sometimes.
Been seeing bright flashes in the sky for a while, and thought it was my eyes playing tricks on me. Nope! Lightning. Now it's raining heavily. Seeing lightning, but not hearing thunder, is weird.
Small Update for myself:
>Two Dungeon maps are done, Dungeon 3 is in progress. Dungeon 4 needs work.
>4 characters set up out of a possible 6 but those come later.
>Hub area needs work.
>Game completion..., 20-25% maybe?

Forum statistics

Threads
100,714
Messages
978,682
Members
132,332
Latest member
Clew
Top