My game's memory usage increases after every battle

This is definitely going to cause problems. So reworking it is a good idea.
One other idea is to just work with the spartan implementation of garbage collection. If you are worried about Ram usage, you could create purge hallways - hallways with little stuff happening on them (these hallways would be completely separate maps). Make sure it takes the same length of time to garbage collect as it would to travel from one side of the map to the other (with maybe a small buffer just in case), ensuring that garbage collection happens before loading the next map. It's like you see games with loading doors or hallways or whatever, it's the same concept, but kind of in reverse. We can't intelligently cull items from RAM, so let's just give the game time to do it on its own.
Putting this hallways before large maps would ensure that it would have maximum RAM headroom to reduce problems.
I've just spent hours testing and the lighting engine is 99% of the problem, the rest of it is actually having a pretty minimal impact (like in the ballpark of 0). But thank you for that, I may end up using that if I make something more intensive with parallax and such.
I have no idea what you're currently doing, but aren't you doing it while the player is being moved by a movement route?
As of right now it's just a parallel process that looks like this.
1695088952978.png


Wherein it checks if the player's x and y is the same as this events x and y, which DOES go off if the player is currently being controlled by a movement route, whereas the "Player Touch" option does not.
As of right now it's just a parallel process that looks like this.
View attachment 277026

Wherein it checks if the player's x and y is the same as this events x and y, which DOES go off if the player is currently being controlled by a movement route, whereas the "Player Touch" option does not.

Is this check constantly running with no wait frames?

Because that's the number one source of lag in RPG Maker.
So instead of having this on every event and using a script call to check if the player is standing on it, you have one parallel event that checks whether the player is standing on a given region ID...then use a script call to set the A self switch of the event on that tile.

And, as I said multiple times and RCX just said, you should have a Wait command on this. At least, like, 5 frames.
So instead of having this on every event and using a script call to check if the player is standing on it, you have one parallel event that checks whether the player is standing on a given region ID...then use a script call to set the A self switch of the event on that tile.

And, as I said multiple times and RCX just said, you should have a Wait command on this. At least, like, 5 frames.
Can do, that's a simple fix.

Also, @RCXGaming, you have no idea, they are everywhere. BUT, as I've now found out it's not the source of my issue, because somehow my game isn't lagging, it's just got that issue because of the lighting. I've messaged the plug-in author and will fix this while I wait for an answer though because obviously I'll be better off if I do it properly, even if it's not the source of my current problem.
What I recommend doing is troubleshooting how deep this RAM utilization goes with the lighting plugin. From reading your responses, it sounds like the map that is causing the problem is making heavy utilization of the lighting plugin, which may be a non-standard, unintended use case outside the scope of the plugin.
Try making a more normal map with a normal amount of lighting on it and see if the problem persists there too.
What I recommend doing is troubleshooting how deep this RAM utilization goes with the lighting plugin. From reading your responses, it sounds like the map that is causing the problem is making heavy utilization of the lighting plugin, which may be a non-standard, unintended use case outside the scope of the plugin.
Try making a more normal map with a normal amount of lighting on it and see if the problem persists there too.
It does, just to a lesser degree. A map with the player's light and 5 more light sources makes the memory go up by about 100MB or less whereas the map I discovered the issue on it goes up about 3-400MB.

Also I don't think it's non-standard because the demo project has lights EVERYWHERE, which leads me to believe the problem is on my end and I've set something up wrong.

EDIT: I added a battle to the demo project and exiting the fight DOES make the memory go up, but by a tiny amount compared to mine, and there's a LOT more lights in the scene, idk if it has to do with the small size of the map but fights are having a pretty negligible effect on the memory usage.
my traps because the "player touch" option doesn't go off when the player is under a movement route command, which I use for my block moving.
Turn off wait for completion and they will.
Turn off wait for completion and they will.
THANK YOU, that's an easy fix.

Original thread: https://forums.rpgmakerweb.com/threads/my-games-memory-usage-increases-after-every-battle.161287/