MZ How to run a common event in a title scene ?

Hello everyone, I'm trying to bind some common event on the options for the title scene. I tried the code below, they are placed in the method of the option binding:
$gameTemp.reserveCommonEvent(commandEventNumber) $gameMap._interpreter.setup($dataCommonEvents[commandEventNumber].list)
But none of this worked. I seem to have found the reason here, Scene_Title there are no game interpreters: https://forums.rpgmakerweb.com/inde...mmon-event-in-equip-scene.126871/post-1115925

Is there any way to add a game interpreter to Scene_Title, I've added this._interpreter = new Game_Interpreter() to Scene_Title.prototype.initialize, but I don't know what to do next, I just tried to run common event from code in the title scene.
Can someone help me, any advice is important to me, I've been stuck here for a day...
I would suggest trying to study SRD's title command customizer plugin which does what you want, more or less.

Reserved events will automatically be set up when the interpreter is allowed to do so.

The usual approach is to pop back to the map after reserving the common event, e.g.
JavaScript:
$gameTemp.reserveCommonEvent(123);
SceneManager.pop();
[Edit: but that is not applicable for the title scene.]

Otherwise you will need to add not only an event interpreter, but also all relevant objects, e.g. message windows, and the necessary structure to process the new elements in scene updates.

Edit: sorry, for some reason I read your post as wanting this for the pause menu, not the title screen. Yeah, that's going to be tricky. 😴

I'd suggest simply making your custom commands start on a different map, and put a suitable autorun event on that map. My Cae_TitleMenu plugin has options for adding custom "new game" commands, in case that helps.
Reserved events will automatically be set up when the interpreter is allowed to do so.

The usual approach is to pop back to the map after reserving the common event, e.g.
JavaScript:
$gameTemp.reserveCommonEvent(123);
SceneManager.pop();
[Edit: but that is not applicable for the title scene.]

Otherwise you will need to add not only an event interpreter, but also all relevant objects, e.g. message windows, and the necessary structure to process the new elements in scene updates.

Edit: sorry, for some reason I read your post as wanting this for the pause menu, not the title screen. Yeah, that's going to be tricky. 😴

I'd suggest simply making your custom commands start on a different map, and put a suitable autorun event on that map. My Cae_TitleMenu plugin has options for adding custom "new game" commands, in case that helps.
Thanks for your reply, it gave me some inspiration. I was actually wondering if it's possible to modify Scene_Title by following the code of Scene_Map and its parent class, to give Scene_Title the ability to run common events. I may need a bit of time to look into the code of Scene_Map and its parent class.

Edit: It seems like I should consider whether I can put Game_Map into Scene_Title.
You could just skip the title scene altogether and have a map be the title screen. There are also plugins that provide an in-between solution where you have a limited event map as a title screen.

Oh yep, that's a much better idea!

A similar option is Pre-Title Events by Himeworks (lets you replace title with map):
Looks like Casper's plugin has a wider selection of features.
Oh yep, that's a much better idea!

A similar option is Pre-Title Events by Himeworks (lets you replace title with map):
Looks like Casper's plugin has a wider selection of features.
Thanks for the reply, I finally decided to bind the js script to the command item, the common event seems a bit complicated.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-run-a-common-event-in-a-title-scene.165358/