I don't know if finding the error/bug in the code would be easier or just adding some kind of additional check during the Victory phase that forces it into the results screen. I don't know enough programming or JavaScript to do either.
Mog Plugins
The Long of it:
Since early development of my game, I've had a seemingly random bug/glitch, where sometimes upon winning a battle the game would soft lock on the victory screen. I say soft lock because the battle sprites will loop in their victory poses and any map effects like mog's weather, will continue to play but it won't proceed to the Results screen that displays exp and gold. I know nothing with computers is truly random so I assumed it's a very specific set of circumstances that trigger this bug but I was unable to reliably produce it. I thought, incorrectly, that is was a plugin incompatibility, but this can be reproduced in Mog's Demo for Chrono Engine with all the plugins turned off except for Chrono Engine. After a long time and thorough testing I can now reproduce this error every time, narrowed it down to the Chrono Engine plugin itself and this is beyond my feeble JavaScript knowledge.
To reproduce the error: This can be done in Chrono Engine Demo using Chrono Mode.
Set an Ally or User scoped skill to have a speed that is not zero. I used Cure, a healing spell from the demo. For ease of testing, I set this to a high number, 300 (Figure1). This puts the user of that skill into "charging" or "casting" state until there ATB bar fills. I also gave slime like 10 HP so they are easier to kill. If all the enemies are slain before the skill goes off, the victory screen will play as normal but get stuck and not go to the result screen. It's also worth noting that the damage combo counter and the enemy hp HUD elements do not get cleared as well (Figure2). Start a battle and kill everything except for one enemy. Cast cure to the user or an ally. Kill the remaining enemy before Cure has had a chance to cast. Get stuck on Victory screen.
Figure1
Figure2
At first I thought this was a me problem and had something to do with a plugin incompatibility but I finally found myself with some time to investigate this further and used Mog's demo to track this down as best as I could. I tried Google thinking surely I can't be the only one to have had this problem. No luck, but Google isn't what it used to be.
Anyway, deleted all the plugins in the demo except for Mog_ChronoEngine (Figure3) and using the above method, still got the same freeze (Figure4) just without the stuck Combo Counter and EnemyHP.
Figure3
Figure4
I tried to make all User/Ally scoped skills to be a speed of 0 so they would just immediately be cast (this screwed with some balancing and they way I had some skills planned but it's easy enough to adjust for) but there are still instances where the player can select a skill while another one is firing off leading to the soft lock freeze.
This is particularly annoying when it happens after a tough battle like a boss battle because hitting F5 means the player has to start from the last save and all that hard work and progress is lost.
I lack the programming/JavaScript skills to solve this problem and am welcoming any solutions to this as I'm kind of far into development and this is just crushing my motivation to continue.:LZSsad: