MZ How many events can MZ handle on a single map?

Hello,

I'm trying to create a map around the max size (256x256), where every single tile will have an event upon player touch. For example, moving across a certain terrain type will deduct X amount of stamina from the player, cause a battle with a certain enemy type, etc. Each event tile will essentially choose a random variable, the list of which I plan on being anywhere from short to medium. Additionally, I plan on having parallel events running, such as roaming enemies, etc, and will be using "Set Event Location" extensively for this purpose. I understand parallel events can bog down the engine, so I'll be trying to keep them relatively simple and not too complex.

Is this feasible? Or will I be pushing the engine too far? If so, what would be a good compromise for my ambitions?
Hi there!

By default, I believe RPG Maker can handle all the events you put on a map. The problem here is not RPG Maker, is the hardware running RPG Maker. And for that, we cannot say for sure, because we cannot say for sure what hardware will be running the game.

Besides that, it's not feasible do this way. If you plan to add a map event on each tile of the map, it's easier to handle everything by using parallel events checking the player position. If player X === 10 e player Y === 10, then, do something. I guess this way is easier, but still a lot to do and thingsa can get real messy to keep up anyway.

I understand parallel events can bog down the engine
- Not entirelly true, it also depends on what the parallel event is doing.

I still don't know exactly what you should do to achieve that, with events. I guess for me this is one of the cases that I would figure out as I'm doing it. But I can already think of a start point:

On a parallel event, you need to keep track of:
Player coordinates X and Y
Player Terrain Type

Then, after that, on theory, you need to check the player coordinates and do something about it. But doing that in a map of 256x256 will be a nightmare. But the logic is:
  • If player X equals 0 and player Y equals to 0, then he is on the first top-left tile. Do the eventing for that tile.
Then keep checking each coordinate. But that also is not feasible at all. But that would be the logic to do to not make an event on each tile.

If the only function of each event on each tile would be set a random value to a variable, then it's better for you to track the player steps.

if current player steps - old player steps is equal to 1, then player moved one step.
If that is true, you run the random variable value thing. And with the result of that, you do something. That would start to be more feasible.
Hi there!

By default, I believe RPG Maker can handle all the events you put on a map. The problem here is not RPG Maker, is the hardware running RPG Maker. And for that, we cannot say for sure, because we cannot say for sure what hardware will be running the game.

Besides that, it's not feasible do this way. If you plan to add a map event on each tile of the map, it's easier to handle everything by using parallel events checking the player position. If player X === 10 e player Y === 10, then, do something. I guess this way is easier, but still a lot to do and thingsa can get real messy to keep up anyway.

I understand parallel events can bog down the engine
- Not entirelly true, it also depends on what the parallel event is doing.

I still don't know exactly what you should do to achieve that, with events. I guess for me this is one of the cases that I would figure out as I'm doing it. But I can already think of a start point:

On a parallel event, you need to keep track of:
Player coordinates X and Y
Player Terrain Type

Then, after that, on theory, you need to check the player coordinates and do something about it. But doing that in a map of 256x256 will be a nightmare. But the logic is:
  • If player X equals 0 and player Y equals to 0, then he is on the first top-left tile. Do the eventing for that tile.
Then keep checking each coordinate. But that also is not feasible at all. But that would be the logic to do to not make an event on each tile.

If the only function of each event on each tile would be set a random value to a variable, then it's better for you to track the player steps.

if current player steps - old player steps is equal to 1, then player moved one step.
If that is true, you run the random variable value thing. And with the result of that, you do something. That would start to be more feasible.
Thanks for reply.

When you say it's not feasible, do you mean the map cannot handle so many events, or do you mean it would be far too inconvenient?
Thanks for reply.

When you say it's not feasible, do you mean the map cannot handle so many events, or do you mean it would be far too inconvenient?

Eliaquim explained it pretty well.

Now I think what he means is that when you're doing something such as eventing/coding, there is an effective way of doing it, and then a long-winded mess of a way of doing it.

So for my game, I had to do a conditional check to see if I had 4 party members in my party.

I did it

Conditional branch: If Member 1 was in the Party,
-> Condition branch: If member 2 was in the Party
-> conditional branch: If member 3 was in the party
-> Conditional branch: If member 4 was in the party

^ It works, but it's not really feasible,

A much better method was

Conditional branch: Script= Party member count == 4

This was much better as it just requires 1 conditional.

But that was a simple example, as when you try to do more advanced eventing that may require alot of ifs, buts, and whens, then you want to make it as simple as you can whilst achieving the same effect compared to an overly complicated, messy event setup.
Thanks for reply.

When you say it's not feasible, do you mean the map cannot handle so many events, or do you mean it would be far too inconvenient?
actually neither is the reason, you're overlooking several things here.

first, there is an internal limit that one move can only trigger one event.
which means that if the tile triggers an event, then a second one will not trigger before the next move - no matter if random encounter, moving event or common event.

second, if you want to have more than one event on any position then the additional events will have to be set to through and as such cannot trigger at all (in addition to the above)

For your idea of each tile having different effects on the player, it would be much better to use either Terrain Tags or Region ID (and I suggest Terrain Tag if 7 different tags are enough for you)
Thanks for reply.

When you say it's not feasible, do you mean the map cannot handle so many events, or do you mean it would be far too inconvenient?
I mean both.
I have 400-600 events per map for a regular map, and it can cause problems sometimes.
I have 400-600 events per map for a regular map, and it can cause problems sometimes.
Interesting. On average, how complex are the events?
Interesting. On average, how complex are the events?
Very simple. Most are just turning on or off lights in a simplified version of line-of-sight and controlling my automap.
Map size, some events & plugins will noticeably increase map loading times. When I started my project I was hoping to make a 1000x500 world map. I settled for 6 connected 150x150 maps. Even at that size some good fog plugins are unusable. 150x150 loads twice as fast as 250x250.
second, if you want to have more than one event on any position then the additional events will have to be set to through and as such cannot trigger at all (in addition to the above)
This doesn't seem accurate? Why would the additional events have to be through? I'm pretty sure you can stack multiple non-through events on the same tile, either with Set Event Location or by editing the map in a text editor to tweak the event's coordinates.

But it's true that, if you're using move routes to stack them, all but the last would have to be through. On the other hand, there's nothing to stop you setting the others to not through once they're stacked.

And also, setting an event to through doesn't prevent it from triggering.
Oh yeah forgot to add that most of my maps are 64*48.
Very simple. Most are just turning on or off lights in a simplified version of line-of-sight and controlling my automap.
Oh yeah forgot to add that most of my maps are 64*48.
Damn, bro. I'm working on a project that's supposed to be really big, and now I don't even know if I should do it. It's a bit much, but if you don't mind, could you send me the game project? I want to see what exactly is loading the engine and how much.
[email hidden]
Pls?..
Oh yeah forgot to add that most of my maps are 64*48.
I started to get worried, so I placed over 350 parallel events on the map for testing. Incidentally, this is a completely wrong approach to game design, but as a test, with five different events copied 69 times (plus some minor ones), everything works quite well. I can even see that I could add another 50 and it would be relatively tolerable, and if I remove 50, there will be no lag at all.
The events contain huge conditional branches, "show image" commands as animations, plugin commands, and so on. I'm doing this on a PC that's at least ten years old (GTX 750Ti, Ryzen 7 2700).
What could possibly be causing lag in your game? Are all your events parallel? What plugins are you using?
I started to get worried, so I placed over 350 parallel events on the map for testing. Incidentally, this is a completely wrong approach to game design, but as a test, with five different events copied 69 times (plus some minor ones), everything works quite well. I can even see that I could add another 50 and it would be relatively tolerable, and if I remove 50, there will be no lag at all.
The events contain huge conditional branches, "show image" commands as animations, plugin commands, and so on. I'm doing this on a PC that's at least ten years old (GTX 750Ti, Ryzen 7 2700).
What could possibly be causing lag in your game? Are all your events parallel? What plugins are you using?
Comminity Lighting is a lot of the problem, it adds a whole another layer to draw on, so I have assumed that it was that.

Original thread: https://forums.rpgmakerweb.com/threads/how-many-events-can-mz-handle-on-a-single-map.183362/