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
541
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
770
Reaction score
420
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,907
Reaction score
7,447
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
541
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

Ami
--- Diary ---

M.Mage: It's the F.Mage's Diary. While she isn't here,i can read it.

May, 10: I'm hurt after the battle with the Minotaur. But luckily,F.Healer heal me with her Heal-2. That why,i Fall in Love with her.

M.Mage: Eh???
So... some of my Desktop hardware has kicked it apparently (still trying to figure out what and how at the moment :/ ) .... yay?
Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
Made a HUGE (YYOOOOJJ) Update to Monstructs and moving towards a Steam Early Access release!

Forum statistics

Threads
104,224
Messages
1,004,809
Members
135,740
Latest member
Animalblack
Top