Can there be such a thing as too many event commands for one event?

evmaster

Cats are the best.
Veteran
Joined
Sep 1, 2015
Messages
524
Reaction score
733
First Language
English
Primarily Uses
RMMV
For events that are triggered by action button, not auto run or parallel process. Would there be any lag or game problems if one event had 50 conditional branches? What about 200 or more?

I have a similar related question. Is creating variables to check for variables that do run parallel process and/or require no triggers a bad or good idea? (For Data base common events or events on map) Example:

◆If:# of fish caught = 50
◆If:fish achievement check1 = 0
◆Control Variables:#0158 #total of Achievements += 1
◆Text:None, Dim, Top
: :\^ACHIEVEMENT: Fisherman\|\|
◆Control Variables:#0160 fish achievement check1 = 1
◆Exit Event Processing

:End

:End

Because in this way the common event doesn't repeat. This example uses a common event with no trigger.
But what if a common event using this variable check system ran a parallel process? What about using lots of variables for one parallel event in general? Is there a number you shouldn't go past?
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
668
Reaction score
368
First Language
Poland
Primarily Uses
RMMV
No, it shouldn't unless you are using script calls that access local files, take a look at this code:
Code:
Game_System.prototype.obtainData = function(id, database){
    $source = new Soulrender();
    var data = $source.readFile('./data_proto/' + database + '.txt');
    var proto = $source.explode(data, "\n");
    var item = $source.explode(proto[id], "|");
    return item;
}

Game_System.prototype.truncate = function(input, size){
   if (input.length > size) {
      return input.substring(0, 0) + 'Parameters:';
   }
   return input;
};

Game_System.prototype.setItemDescription = function(id){  
    const db = 'data_proto';
    var item_icon = "\\i[" + this.obtainData(id, db)[0] + "]";
    var item_name = "\\fs[22]\\hc[a0f573]" + this.obtainData(id, db)[1] + "\\hc[ffffff]";
    var item_type = " - [ \\hc[f5db73]" + this.obtainData(id, db)[2] + "\\hc[ffffff] ]";
    var item_desc = "\\fs[16]" + this.obtainData(id, db)[3];
    var item_header = item_icon + item_name + item_type + "\n\n";
    var item_description = item_header + item_desc;
    if (Imported.YEP_MessageCore){
        return item_description;
    } else return "Cannot use this method because there is not installed Yanfly Message Core plugin";  
}
this code reads data from text file wich I'm using to setup items, weapons and armor descriptions and the file "data_proto.txt" is nearly reaching 100kb size so accessing specific line from file causes engine a slower cursor movement when highlighting item.

Therefore using even 999 default commands in one event should not cause any problems, but... they may be some single occurences when you deploy game for web and put it on some weak server.

For the second part, I would use "else branch to check event if other values of variables are set and it's better look in game, for instance: - https://prnt.sc/u07sdz

If you skip "else" branch and values mismatch in "if" statement nothing happens.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,698
Reaction score
7,362
First Language
German
Primarily Uses
RMMV
technically no, practically yes

the problem is not with the event commands processed by the engine, but with the developer's ability to keep track of it.
the longer an event is, the more problematic it might become, especially in bughunting.

So if you have an event that you know will become more complex, then I suggest using comments and other tricks to keep track of what the event does and where in the event you currently are.
 

evmaster

Cats are the best.
Veteran
Joined
Sep 1, 2015
Messages
524
Reaction score
733
First Language
English
Primarily Uses
RMMV
I've been wondering about this for awhile. So all I have to worry about is losing track and bugs? And Rpg Maker MV can smoothly run an event without problems? (In case of event commands only, no script)

Thanks everyone! ♥
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
You should be able to have thousands of Conditional Branches without Problem in 1 Parallel Event.

If they are structured correctly. Because the stuff in the Branches cost much more "Performance Reserves".
while a branch cost nearly nothing as far as i know. (But iam no Tech Guy, so maybe a Scripter can tell you more)
Like Change Player Graphic. Used1 Time when needed, its no problem. Having it Change Player Graphic up to 60 Times per second sucks an intense amount of performance reserves and adding just a few things can cause Lag or Stutter.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Recent threads, and my very poor algorithm for my minimap plugin have made me face the fact that I need to review algorithms and such.

Going through Cracking the Coding Interview now. I am so excited.
Kes
I've seen a reference to a Community Lighting plugin for MZ, but cannot find it. Is it still in beta?

Todo:
Add fog of war
Add enemy indicators
Make window draggable
Optimise map drawing algorithm (5 seconds to load the map you see, so it's a... poo-poo algorithm)

Any suggestions? :kaoblush:
bleh studio hell job haha at least they like it didnt had time to do much laundry tho ;w;'....YES I DO AT LEAST TAKE A SHOWER everyday!
Ami
--- Food Ingredients ---

Hero: Since the Chef are in Hospital,we can't eat his Dish in 3 Days.
F.Mage: What we have to Eat?
M.Healer: Don't worry,we can Eat the Food Ingredients.
Hero & F.Mage
: Really?

(3 Days Later)

Chef: Hi,Guys. I'm Ba---
(Entire Party Collapse After Eat Raw Meat)
Chef: Wha...WHAT GOING ON HERE!!!!!!

Forum statistics

Threads
102,913
Messages
995,918
Members
134,363
Latest member
Wilsonliz
Top