Need advice on switching tile sets with autorun

I am using Mog Hunters Time System and I have been using parallel events to switch tile sets between spring/summer/fall/winter but I wonder how much slowdown having a tile set change parallel event causes.

Currently I am re-thinking how to optimize some of the dynamics in my game and I am curious if there would be a way to switch tile sets using an autorun event. It seems simple enough but the autorun event would have to reset when the switch for the seasons flip.

Here is the parallel event, its pretty straight forward.
1.png

So I guess my question is, how would I get an autorun event to reset so its ready to run again the next time I enter the map?
but the autorun event would have to reset when the switch for the seasons flip.
A parallel process event would have to do the same.

Just so you understand, there is very little difference between parallel and autorun events. They both loop, so you have to do something to disable them. That "something" either has to be erasing the event (so it will only play once when the map is first loaded, then not again until you leave the map and return), or activating a different page by turning on a switch or self switch that is used as a condition on a higher-numbered page that does not have an autorun/parallel trigger (so it will only play once, ever, unless you turn that switch or self switch off again so the higher numbered page is no longer active). In that aspect, parallel and autorun events are both the same.

Autorun events take away control from the player while they're running, and parallel process events don't.

The other thing that might surprise you is that parallel process events run before autorun events. So if you do things like changing tilesets, setting weather or screen tints, etc, after transferring to a map, you will not see it happen with a parallel process event, but you may see it with an autorun event.

What is on the other pages of your event? Are any of them conditioned by self switch A? Or is each one conditioned by a season switch? If self switch A is not used as a condition on any of those pages, that's where your problem is - you're never deactivating that event page, so it is swapping the tileset on every frame for the entire time you're on that map. Instead of turning on self switch A (which does nothing, but I suspect you intend it to stop the event looping), use Erase Event, which WILL stop it running, until you leave the map and return.
What is on the other pages of your event? Are any of them conditioned by self switch A? Or is each one conditioned by a season switch?

No self switch A conditions are there, I was going solely by an example from a demo so I kinda assumed by the example that if a self switch A condition is set and there is no self switch A page... that disabled the event. I now know it does not. >.<

you intend it to stop the event looping), use Erase Event, which WILL stop it running, until you leave the map and return.

I do, yes. And thank you so much for sharing this... My skill at eventing just went up! It's now 15 out of 450, heh.

Edit: So, theoretically, the best thing to do (unless an event needs to continually run) is have a parallel event with an erase event command at the end of it.
lol - you only need to post 29 more questions like that and you will be at max level!

if a self switch A condition is set and there is no self switch A page... that disabled the event
No, that's just half the equation. You have to turn on the self switch, but there also has to be another page that uses the self switch as a condition.

Out of interest, what were you getting as far as FPS goes with the parallel process before you changed it, compared to what you were getting after you added the Erase Event?
I just changed some of the events so they erase themselves and there is quite a bit of stutter on the map. It actually had the opposite effect.

Before changing them the FPS was at 60 but it would spike downward every 10-20 steps to around 45 then quickly go back up to 60.

Now... there is noticeable stutter after a few minutes on the map. It's too late tonight for me to work on it though, I will double check everything in the morning.
There is something else going on that causes it. Once you erase the event, it's gone and it doesn't come back until you leave the map and return. If you are getting stutters as you are walking around on the map, it's from something else.

See what other parallel process events you have going on - both on the map and in common events. Plugins might also be contributing. Are you using any lighting systems? If you disable all plugins, are you still having the same issue?
Right now, while it's still fairly early in the project, I am trying to educate myself on good eventing practices to maximize game performance. I really don't want to get 6 moths or a year down the road and have to redo half of the game. Unfortunately I can't make a lot of sense out of the console to tell where problem areas are.

Are you using any lighting systems?

Yeah, I have been using Terrax but I am currently thinking to switching to Nova Lighting.

If you disable all plugins, are you still having the same issue?

I am trying to isolate which plugin might be causing the issue, one of them doesn't like having the activation event set to erase itself, it seems.

Some of the plugins have events that seem strange but they were like that in the demo so I don't question them. For example, I use Galv's Layer plugin and the event to "fade out" an overlay or layer has activate and de-activate self switch A all through it... yet there is no self switch A page in the event. So I just assumed that self switches could be used in mysterious ways that I don't understand yet, lol.

This is one of those "if you give a man a fish he can eat for a day" things. I could ask a million questions about how to set up different events but I figure that won't be necessary if I get a grasp of how the basics work (learn to fish myself, heh).

So...

1) My first assumption is that parallel events are the devil. By that I mean, that they can cause slow down if you have dozens or hundreds of badly constructed events running in your game.

The REALITY of this? a) I have no idea just how many parallel events can be running before it causes slowdown. b) To some degree it depends on your PC. I work on a high end PC and thats the reason I am concerned, I don't want to find out later low end systems fold in half when my game loads.

Some of the dynamics in my project will have to use parallel events (I assume), like Galv's crazy layer-fade-event-that-I-wish-just-used-a-simple-plugin-command:

Spoiler: Galv's Layer Fade
1.png
2.png
3.png
4.png
5.png

And my system of torches and lanterns that run on timers then extinguish themselves, There are two parts of the total system that use parallel events and I couldn't seem to find a way around it.

Spoiler: Torch and lantern event
1.png
1.png
3.png
4.png
5.png
6.png

2) Here is an example of what I surmise is a "healthy" autorun event used to activate (and keep activated) a Tool Ring plugin on a particular map. I would like this to be made into a common event (that does NOT keep running again and again when its not necessary) but I haven't tried yet.

Spoiler: Tool Ring activation event
1.png
2.png

I know the tool ring SHOULD stay activated until I use a command to turn it off but I just figured it would be a nice safeguard against potential bugs later down the road to have essential tools set to regulate themselves.

Which brings a couple of questions to mind:

--> How do self switches work in common events?

--> Can I use the erase command in common events?

--> Once a parallel or autorun event with a "self switch A on" command flips over to its self switch A page... it does NOT change back, ever, right? It runs once and thats it?

Ultimately, what I am trying to accomplish is to eliminate some of the parallel events used in changing weather/seasons/tile sets/etc when the Mog Hunter Time System switches to a new season. I figure that would be best done by making them autorun events that reset (by erasing themselves).

If you have made it all the way to the bottom of this rediculous post I owe you a coffee. PM me your paypal. =)

Edit: I guess its not so rediculous when everything is tucked away in spoilers...
I seriously don't think this has anything to do with the events erasing themselves. If that were the case, the issue would be constant. Did you disable all plugins and see if it still happens? The first step in troubleshooting is to determine if it's a plugin or an event that's causing the problem. You can only identify that by running without any plugins active. If you are going through plugins one by one, and it's an event that's the problem, how much time are you losing?
I narrowed it down. It's the Mog Hunter weather plugin, it doesn't like being erased apparently. Maybe its just the way the plugin is setup or something.

Edit: After further testing, it seems that the Mog Weather plugin doesn't like autorun events that erase, it works fine with a parallel event that erases.

Original thread: https://forums.rpgmakerweb.com/threads/need-advice-on-switching-tile-sets-with-autorun.131799/