How to find out which Common Event is triggering

Very embarrassing problem here -- many moons ago I created a timer event. At the end of the timer, it's a Game Over.

It works fine, but now I realize I'd like to do something a little different than the Game Over. The problem is, I cannot figure out which common event (I assume it's a common event) is triggering on timer end.

I'm usually pretty good at tracing switches and whatnot to troubleshoot stuff like this but this one is just a timer ending. So, somewhere there's a conditional branch checking the timer (in a Common Event, I can't imagine I would have done it any other way). But since I have a billion CE's, I can't find this event no matter how hard I try.

I use MV Finder all the time but there's no way to search for conditional branches, or timers, or game overs.

Any advice would be appreciated -- thanks!
Note: the snippet I am posting here only checks common events for Conditional Branch -> Timer. It doesn't check for common event switches, map event commands, or anything related to plugins.

You could open the dev tools window (F8 or F12 during playtest) then enter this on the Console tab:
JavaScript:
for (var n = $dataCommonEvents.length; --n;) {  // For every CE
  var e = $dataCommonEvents[n];
  for (var c = e.list.length; c--;)  // For every command in the event
    if (e.list[c].code === 111 && e.list[c].parameters[0] === 3)  // If "Branch: Timer"
      console.log("Common event ID " + n + ", line " + c + ".");
}
Just open the JSON and search with a text editor.
If you are certain you used Game Over or Timer Control in a common event, you can try and use this script. It will tell you where (in which common event) it was used in the console logs.
If you are certain you used Game Over or Timer Control in a common event, you can try and use this script. It will tell you where (in which common event) it was used in the console logs.

This worked perfectly! Thank you!!

The problem was that the Common Event was unnamed and way towards the end of the Common Events list, so I couldn't find it.

Great tool, saved me a lot of trouble. Thanks all!!!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-find-out-which-common-event-is-triggering.170872/