RMMV BattleLogs are delaying (lagging) actions effects

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,325
Reaction score
795
First Language
Poland
Primarily Uses
RMMV
Let me explain what I mean by writing such title from the start.
I'm using MPP_SmoothBattleLog - 2018/06/07 (ver. 1.0) by Mokusei Penguin plugin to display battle log messages, however this plugin, aswell SRDs BattleLog upgrade are causing lags or delays in Action Sequences of my skills
Video #1 - framerate drop was caused other software working in background (framerate keeps stable at 60fps)

But what I want to fix is to display messages exacly at the same moment when Action Sequence is executed without any delays in animation, like in this second video

So my questions are:
- What is causing such delay? (Incompability in plugins?)
- How potentially I can fix this?
- Are there any alternatives without such hmm... Bug?
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,986
Reaction score
2,304
First Language
EN
Primarily Uses
RMMZ
Looks like there's a minimum duration for each battlelog line. I assume that is intentional: no point displaying text if the player doesn't get time to read it, right? :kaoswt:

I had a brief look at the code of MPP_SmoothBattleLog but didn't identify the cause. In the plugin's parameters, maybe try reducing View Duration and/or change Log Type to 0? Remember to save your project to apply Plugin Manager changes before testing.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,325
Reaction score
795
First Language
Poland
Primarily Uses
RMMV
Changing parameters you mentioned @caethyril helped, but there is still tiny, but noticeable lag. I managed it to "hide" by reducing number of enemies in troops group, but that's not good enough for me. I'll keep searching more for solid solution. (Maybe custom battle log window, or pushing them via action sequences)
 

GregorDuckman

Villager
Member
Joined
Oct 14, 2021
Messages
21
Reaction score
16
First Language
English
Primarily Uses
RMMZ
In stock RMMV / RMMZ this happens because there is delay baked into the Window_BattleLog class - oddly enough, outside of the ATB style in MZ the battle log controls a lot of the pace of battle and effects which is a massive no-no in my books - a log window is a log window, not a speed controller.

I can only imagine these plugins build off the same idea and as @caethyril suggest reducing these baked in delays should fix it, but if it doesn't you might just be running into some genuine lag due to a programming flaw or compatibility issue. Since the number of enemies in a troop appears to affect this (it really shouldn't if it were a baked in timing issue), my money is on a programming flaw.

Try opening the DevTools (F8 on Windows), go to the "Performance" tab, and see if you can sniff out a function running for too long. First run a recording of the performance in battle for ~10 seconds. Save this recording, then start another one with you using that attack. If you see the "scripting" part of the pie chart jump up dramatically in size, then your game is getting stuck in a loop somewhere for much longer than it should - nothing about those animations, damage numbers, or the log window's appearance should warrant that big a tax on your CPU unless it's a bug.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,325
Reaction score
795
First Language
Poland
Primarily Uses
RMMV
I think I found an issue. I just noticed it - when message is pushed to Battle log, action sequence with keyword "action effect" executes damage, and when damage is executed it plays sound of damage set in system tab in DB and while message is popping in battle log on screen, this sound is also played (don't know why - There are no AudioManager.playSe() references in this plugin) so, when such fast sequences are executed (videos from 1st post) AudioManager is called, so I think there are two options only: either modify that plugin to not play again sound ( or change to different one), or remove damage sound from system.json fields and put it with action sequences in skills.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,693
Reaction score
1,805
First Language
Dutch
Primarily Uses
RMMV
wouldn't it be possible to combine the effect in video 2 and in video 1
to show "total dmg dealt xxx to ENEMY NAME"?

that way, it's readable and not fast :) (just a suggestion though).

I think it's also a bit cleaner than a wall of text.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,325
Reaction score
795
First Language
Poland
Primarily Uses
RMMV
Normally you would be right, but because of Nature of This skill I wont do that, however I did like I said post earlier, removed damage sounds and put them in skills and animations, and limit number of lines in battle log to 5 its all ok now.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,325
Reaction score
795
First Language
Poland
Primarily Uses
RMMV
Wrong... It's not ok... Some animations are played like in Slow Motion in matrix (actually framerate drops to 2-3 fps)...
 

GregorDuckman

Villager
Member
Joined
Oct 14, 2021
Messages
21
Reaction score
16
First Language
English
Primarily Uses
RMMZ
Wrong... It's not ok... Some animations are played like in Slow Motion in matrix (actually framerate drops to 2-3 fps)...
You should definitely try running the diagnostic I mentioned up above then, it will give you clues whether it's the Renderer/Painter struggling to keep up (might indicate too many sprites/particles are getting rendered) or whether there's an enormous increase to the amount of scripting time being spent between frames (caught in a loop, running too many slow calls, etc).
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,325
Reaction score
795
First Language
Poland
Primarily Uses
RMMV
Well... I checked it and gave a look of it and this tells me nothing

But you might be right @GregorDuckman - too much animations, because in one particular skill there are called 2 animations 21 times in 1 frame interval, but that doesn't explain, why this lag don't happens, when I disable that "smooth" battle log plugin.

 

GregorDuckman

Villager
Member
Joined
Oct 14, 2021
Messages
21
Reaction score
16
First Language
English
Primarily Uses
RMMZ
Hmm, it could have something to do with how the that plugin allocates memory for drawing the text to the window. If it's reacting to each of those animations (21 in a single frame sounds like a lot) that could easily bog things down - drawing text is usually bitmapping done purely in software so it can be a slower process than you might think. Let me have a look into that plugin, I'll see if anything jumps out at me.
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,325
Reaction score
795
First Language
Poland
Primarily Uses
RMMV
I wish you good luck, I read code of this plugin several times and nothing bothered me. Only one think come up to me to overcome this problem - use BattleManager._logWindow.addText(text) in <finish action> of skills and disable default messages in YEP_BattleEngineCore.
 

GregorDuckman

Villager
Member
Joined
Oct 14, 2021
Messages
21
Reaction score
16
First Language
English
Primarily Uses
RMMZ
I wish you good luck, I read code of this plugin several times and nothing bothered me. Only one think come up to me to overcome this problem - use BattleManager._logWindow.addText(text) in <finish action> of skills and disable default messages in YEP_BattleEngineCore.
Maybe the issue is that these methods are also being aliased inside YEP? Outside of the usual stuff i find cringeworthy in the scripting of these plugins (aliasing leads to extreme spaghetti code that makes exactly these types of problem difficult to track, though in it's defense what else can you do to maintain general compatibility), I don't see anything that jumps out at me either.

If disabling the log window altogether also disables YEP's code then maybe that's where the problem comes in. Are there a bunch of eval() calls being made in YEP's battle log?
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,325
Reaction score
795
First Language
Poland
Primarily Uses
RMMV
In the plugin itself (YEP_BattleCoreEngine) evals in Window_BattleLog there are none, just aliased basic messages, same goes in MPP_SmoothBattleLog. Disabling either one of these plugins actually solves the problem, game returns to solid 60fps, but most of game are based on Yanfly's plugins...

I'll try to remove completly all related things with battle Log from BattleEngineCore.

I removed this plugin for good. I won't be wasting time for something irrelevant...
 
Last edited:

Latest Threads

Latest Profile Posts

I keep thinking up of new changes or improvements... Edit: Forgot to add the image Gimpwork.JPG
Hello, my nickname is Rigomor, but I am also known as Mopsikus. I work on RPG Maker games, and are currently working on a game called Peony of War.
If the world treats you like an enemy... Then the world must be your enemy...
What started as 1 RPG in development on the Nintendo DS, turned into 4 RPGs in development (1 on VX and 3 on VX Ace). Wish me luck.

Forum statistics

Threads
117,294
Messages
1,106,257
Members
153,480
Latest member
Varlen
Top