Common events vs Events - economy

When does it make sense to have common events over in-map events? In terms of editor economy.

Excluding situations like Action Sequences ofc
What do you mean by "editor economy"?
Basically common events should only be used for things that needed to be done multiple times - in any form.
calling a common event from many different map events would make sure there is no mistake in the repeated sequence for example, and less work to create the many events.
the same goes if something is needed on many maps
Not sure what you mean by editor economy either, but for me is all about shortcuts. Is it something you see yourself reusing a number of times? it probably should be a common event. is it something thatll only be done once? definately not.

All examples from my game:
All my innkeepers function the exact same, so theyre all one common event.
I yoinked Dragon Quest's mini medal mechanic and every single one is the same common event.
theres a travelling merchant whose inventory updates as the game goes on based on your actions and progress. every appearance is the same common event wrapped around some regional/situational banter.
theres set locations where every character may change their main classes. common event
Your party leader has an impact on how what the player sees in a cutscene, but some are forced perspectives. I have a common events record current party formation, to swap the leader around for the cutscene, and then to return the party to its previous formation

they just save you time doing things youd be doing... commonly.
common events are for things that are global, generic, and repetitive.
things that must be triggered from anywhere, more than once, and from different processes with no connection to each other.

I have a big common event that is a dialogue manager: it triggers to return a face and line of dialogue based on the state of a global variable, which is set by a map event, which doesn't exist... it spawns randomly at run time, so the common event is there to catch all possible variations.


In terms of editor economy.
if you mean to save entries on the database, you can wrap all CEs that pertain to a certain thing under one CE and direct the flow with labels.
that's exactly what I did with that dialogue manager: have the non-existing event raise it's name to the variable, send that name to the CE, and with that name go find the corresponding dialogue and return.
only do it when the system itself is solidly finished, otherwise it's a mess to debug.
I am not the most experienced person to respond here and I generally agree with what most everyone else is saying.

However, I would add one small wrinkle that has definitely worked for me in the past because I use Common Events quite a bit.

I have also used a Common Event for things that I might not need to access again, from another map, but because it can make a huge Event a little smaller by extracting parts of it and using a Common Event instead.

Now maybe that isn't the optimal purpose that the Common Event was designed for, but let's say I have a really big Event on a map and there are big chunks that could be stripped out of the Event by making some of those chunks Common Events.

For me, it can make it easier to keep the Event organized and easier to read, edit, and trouble shoot.

Now, occasionally I have run into a few flow issues when using Common Events this way, but generally they have worked just fine and it has helped me with larger, very complex Events. I can build a piece of the larger Event as a Common Event and make sure it works.

So I definitely use Common Events for singular pieces of Events sometimes. But maybe that is just because I need to learn more about designing and organizing Events more efficiently.

I also use Common Events for the things that everyone else has mentioned.
if you mean to save entries on the database
That is precisely what I mean.
if you mean to save entries on the database, you can wrap all CEs that pertain to a certain thing under one CE and direct the flow with labels
What do you mean?
That is precisely what I mean.
You can have up to 9999 common events, so it's kinda hard to imagine that you're really in a situation where you've gotta worry too hard about this type of thing. Unless you're working on the next Elder Scrolls game, you could probably just use Common Events when it makes sense to, and use map events when it makes sense to, without really running into any problems.

But there are also plugins for Template Events, if you need them.
What do you mean?
I could be wrong, but I think it generally means using Conditions in the Common Event to separate different things you want to happen, thus eliminating the need to have multiple Common Events that relate to the same general thing.

So you call the CE and it starts checking Conditions. If Switch X is on do this. If Switch Y is on do that. If Variable P = 5 do something else.

But maybe "labels" means something else.
What do you mean?

my rig, generically:
Code:
@n = $vars[Id]
@params = []
@params[0] = "handle #{@n}"
command_119
Label: return_point
Exit Event Process
Comment: #===============================
Label: handle NPC1
...
<stuff for npc1>
...
Jump To Label: return_point
Comment: #===============================
Label: handle NPC2
...
<stuff for npc2>
...
Jump To Label: return_point
Comment: #===============================
...
Exit Event Process

load the name of the target npc in global N, mix that with "handle ..." as a string, load that to the global parameters for the interpreter, and call command 119 (go to label).
command 119 will go to label "whatever parameters[0] says", which is "handle XXX"
basic GoSub/Return flow from 1986
I'll throw this in here as a rare use case for common events:

On very rare occasions I have used a common event simply as a folder.
Say for example I have a cutscene that is running; lots of dialog.
Then I need to run some logic for something in the middle of that cutscene.
Running the logic at this point in the cutscene makes the event difficult to read, and clutters the editor.
Most of the time for organizational purposes I might use a label and "jump to" command and put the logic at the bottom of the event, and then a label to jump back, but there are few times where that is either inconvenient or I just can't
So in those rare cases, I will put the logic into a common event, then run the common event in the cutscene. In this case it declutters the editor a lot and makes reading the event a lot easier.

This step is totally unnecessary, it doesn't really affect the game at all, and is simply for organizing things. It is never required to do this.
I use it for a lot of things - code that is the same but is used often like treasure chests, battle, messages like "HP/MP Restored! - But, you're still hungry", etc.

I like the workflow for parallel and autorun common events that I can switch on/off - it helps me separate the process mentally and keep track of things better.

It doesn't always have to be a global thing for the entire game, though, you can always optimize your workflow.

I got tired of having to make my party gather together and then split off into a certain formation pre-cutscene or dialog (which required separate move routes for every follower), so I made a common event of it and just called it when I needed it.

Basically, anything you want to be available for you on any map. Though, I will say that common events (parallel/autorun) typically has performance issues because of user expectations and constantly checking everything all the time (less than every frame). Wait frame is your friend for optimization.
I have also used a Common Event for things that I might not need to access again, from another map, but because it can make a huge Event a little smaller by extracting parts of it and using a Common Event instead.
So in those rare cases, I will put the logic into a common event, then run the common event in the cutscene. In this case it declutters the editor a lot and makes reading the event a lot easier.
In such cases I personally like to use other events on the same map instead of common events, so that common ones are only things that are useful on multiple maps. Though I guess either way can work fine, just do whatever is most convenient for you.
thank you for the ingenious solution

Original thread: https://forums.rpgmakerweb.com/threads/common-events-vs-events-economy.164777/