Autorun event on launch?

I searched for a plugin that might do this and was quite astonished to not find one...


Is there any means of automatically running an event on launch? Note that I don't mean having an event autotrigger from the starting location when you first start the game as I have that setup already.


In this case, I need to run a common event every time the game starts because a save game bypasses the aformentioned autotriggered event. Any ideas?
So you are still talking about when a game begins or resumes, as "on launch" means when you first run the program, before you get to the title screen, and at that point, there are no events, because there is no map.


You already know you can make a common event run from the starting map.  So its seems what you are asking is for a way to have the common event also run when you resume a saved game.


It could be as simple as conditioning the common event by a switch and setting it to autorun or parallel, and turning the switch off at the end, and then a small plugin to turn on the switch just prior to saving the game, then off again after saving.


Can you elaborate on why, what kind of common event this is?  Knowing what you're trying to achieve can be helpful.
It could be as simple as conditioning the common event by a switch and setting it to autorun or parallel, and turning the switch off at the end, and then a small plugin to turn on the switch just prior to saving the game, then off again after saving.



Ohh, good idea! I might be able to finagle something to work with this. I'm going to be manually informing the game when to save so I SHOULD be able to make this switch do what I need it to do...


To answer your second question, I'm creating a children's book app with RPG maker and I want it to save certain settings between booting the game, but I still want it to boot up the main menu every single time the app is opened (right now it's booting into a minigame instead of the main menu, and I mean the MM I manually created to bypass the usual main menu as I don't want to give access to the real MM).


The common event is basically the new main menu, and is set to autorun when a switch is activated.
So you're skipping the title screen and using map events to show your menu?  You must be using a plugin for that?


Maybe what you need is a plugin so when you load a game, it'll take you to a specific point/map rather than to where you were before saving?  Because the way I described it above, when you load a game, the switch will be on so your autorun common event will run, but the map the player was on when saving will show briefly before the common event begins.
So you're skipping the title screen and using map events to show your menu?  You must be using a plugin for that?


Maybe what you need is a plugin so when you load a game, it'll take you to a specific point/map rather than to where you were before saving?



Yeah, using "Jumpstart" by Starbird. It autoloads the save file and only allows one file (which is perfect for what I need).


Also, I stumbled upon this which might be able to make this happen as well:
No.  That plugin allows you to set a switch, and its value will be shared by all save files.  As you only have one save file, that plugin is of no use to you.
No.  That plugin allows you to set a switch, and its value will be shared by all save files.  As you only have one save file, that plugin is of no use to you.



I'm not sure why it's working...but it's working. *shrug*


It might be saving only the variables/switches I choose to the save file (which would actually be fine for my purposes)? Either way, I was able to set the plugin to save a set of variables immediately upon changing them, and now it's saving them after reboot but not locking me into the minigame on bootup.


It was your suggestion about switches that got me searching for switch-based plugins to start with so thanks for that. 🙂
If it's working, I don't think it's because of the plugin, or you may not be testing thoroughly enough.  And without seeing your common event (and what it does with the switch) I can only guess.



Is it conditioned by the switch, and do you turn the switch off at the end so it doesn't repeat?  Do you turn the switch on prior to saving and then off again after saving?  What happens if you resume a saved game, see the menu, exit the menu, save your game, then close completely - when you re-open and reload, does the menu come up again?

Original thread: https://forums.rpgmakerweb.com/threads/autorun-event-on-launch.73903/