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
545
Reaction score
734
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
805
Reaction score
438
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
31,003
Reaction score
7,481
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
545
Reaction score
734
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


Finally! I've been puzzling over why it wasn't working for two days now. Turns out all of my calculations were correct, I just forgot to give some events hitboxes. :kaoswt: Now my randomly generated maps check for collision errors, and move stuff around in real time if they finds any. :LZSexcite:
Ami
--- OP Candy ---

Kids: Trick Or Treat!
Hero: Alright,here's the Candies (Give A Bunch Of Candy).
Kids: Thank you,Mister! (Running)
Hero: How cute they are…
F.Archer: Did you give them a OP Candy,accidently?
Hero: Huh?
Halloween, a day where kids are encouraged to take candy from strangers.
Stream will be live shortly with a session of the Interactive Text Adventure! Feel free to drop by!
Took a break from spriting dinosaurs to carve a dinosaur pumpkin.

Forum statistics

Threads
104,671
Messages
1,007,980
Members
136,159
Latest member
tomtam
Top