YEP_InstantCast - Ending an encounter with it breaks the next encounter

Trilaterus

Villager
Member
Joined
Nov 11, 2017
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
To reproduce this bug, have a skill that has the <Instant> tag applied to it, and deal the finishing blow onto the last enemy in an encounter. That encounter ends as normal, but start the next encounter and the battle actions menu doesn't appear, locking up the game.

1580653836587.png
^ I've made the Attack skill instant, basically just keep spamming it until the enemies die

1580653939518.png
^ This is the state the screen is in when you start the second encounter, the action menu on the left never appears

1580654014536.png
^ No other plugins being used, I would include the test project but because YEP_InstantCast is a purchasable plugin I don't want to be a point of access for people to access it freely

I'm not sure of any other information I should include, let me know if anything is not clear or if there's something else I can add
 

Trilaterus

Villager
Member
Joined
Nov 11, 2017
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
I've figure out a solution to this issue, I don't fully understand how it fixes it so I'm not sure if it introduces other problems.

In any case, the issue seems to be that on line 364: if (this.updateEventMain()) return;, that function also checks if the battle has ended, returning true if it has and thus exiting this function early. I basically moved the couple of lines below it above it and it seems like they need to be set to ensure the next battle starts properly. TLDR at line 364 in function BattleManager.endActorInstantCast change the following lines to this order:

Before:

JavaScript:
if (this.updateEventMain()) return;
Yanfly.Instant.BattleManager_endAction.call(this);
this._subject = user;
this._instantCasting = undefined;
After:
JavaScript:
Yanfly.Instant.BattleManager_endAction.call(this);
this._subject = user;
this._instantCasting = undefined;
if (this.updateEventMain()) return;
I found this bug on YEP_InstantCast version 1.12
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
781
Reaction score
492
First Language
English
Primarily Uses
RMMV
I've figure out a solution to this issue, I don't fully understand how it fixes it so I'm not sure if it introduces other problems.

In any case, the issue seems to be that on line 364: if (this.updateEventMain()) return;, that function also checks if the battle has ended, returning true if it has and thus exiting this function early. I basically moved the couple of lines below it above it and it seems like they need to be set to ensure the next battle starts properly. TLDR at line 364 in function BattleManager.endActorInstantCast change the following lines to this order:

Before:

JavaScript:
if (this.updateEventMain()) return;
Yanfly.Instant.BattleManager_endAction.call(this);
this._subject = user;
this._instantCasting = undefined;
After:
JavaScript:
Yanfly.Instant.BattleManager_endAction.call(this);
this._subject = user;
this._instantCasting = undefined;
if (this.updateEventMain()) return;
I found this bug on YEP_InstantCast version 1.12
While it isn't expressly mentioned in the help text for that plugin, I'd suspect the bug doesn't happen at all if you use the YEP_BattleEngineCore plugin, as this is a battle plugin, and probably requires it as a dependency.
 

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,837
Latest member
Dabi
Top