Why does my Evented Title Screen "reset" after exiting a script command?

Joined
Jul 12, 2020
Messages
426
Reaction score
235
First Language
English
Primarily Uses
RMMV
So recently I've managed to event an animated title screen, and it starts with 4 normal options of New Game, Continue, Options, and Shutdown (Exit). Yayyy it mostly works!

But here's what's happening:

I evented my own picture icons on the title screen for the 4 menu options that are "unselected" and "selected" based on a looping variable.

Every time I select Continue (variable = 2) or Options (variable =3), and press cancel, suddenly, the entire set of events on the title menu reset, and I can't seem to figure out why.
In other words, the save files/options menu pop up just fine thanks to the script calls, but the moment I hit the cancel button, all the pre-title events reset....including the splash screens I have.


I will walk you through my coding events:
Screen Shot 2022-08-18 at 6.25.08 PM.png


Screen Shot 2022-08-18 at 6.25.12 PM.png

Event 001 is the very first event that runs the moment the game starts on this pre-title events map.
It autoruns to show 2 splash screens (logos), before setting a "SplashScreensDone" variable to 1, to turn itself off.

Next, after that variable is set to 1, it triggers these 2 parallel events:
Screen Shot 2022-08-18 at 6.28.07 PM.png

This event 002 is just a parallel set of looping background pictures I'm using for an "animated title screen".

The only thing that I think might be important is that I set that same variable to 2 from before.
(I do this so there is no input allowed from the player until after a wait finalizes in the next event.)

Screen Shot 2022-08-18 at 6.30.19 PM.png

In this event 003, (also parallel) is my selection event.
So here, a loop begins (after 002's variable is set to 2) to where another variable called MainMenuSelector begins at 1.


Screen Shot 2022-08-18 at 6.33.23 PM.png

Basically, I made it to where the player's button input increases/decreases a unit of 1 for this selector variable, and it's always trapped in the set of 1, 2, 3 and 4 since anything beyond or below just resets the corresponding values back.

Hence, I linked the variable's 1-2-3-4 values to the pictures of New Game, Continue, Options, and Shutdown.

1 = new game
2 = continue
3 = options
4 = shutdown

This is where my problem finally comes in:
Screen Shot 2022-08-18 at 6.36.04 PM.png


What exactly is causing the issue I stated above? Like I said before, New Game and Shutdown work just fine.
But if I hit "OK" on the Continue or Options (2 or 3), and I decide to exit those save file or options menus, the ENTIRE process repeats. (The splash screens, the setup of the event menu, etc)...it's as if all my variables are reset to zero or something.

Is there anything wrong with the script call perhaps? I've triple checked this code and I just can't seem to figure out what's causing this.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,762
Reaction score
609
First Language
German
Primarily Uses
RMMV
I cant see any obvious cause for it in the code.

You said that depending on the value of the Main Menu Selector Variable,
one of the 4 Menu Options gets Animated.
But i cant see the connection between those two anywhere in the Code.
So is there another Event you did not show, which is handling that?
Else your Animation of different Menu Buttons should not work.
Thats why iam asking.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
5,520
Reaction score
3,590
First Language
English
Primarily Uses
RMMV
It's a little hard to read your events, you describe them but it doesn't look like we actually see all of events 2 and 3.

That being said, you almost certainly shouldn't have loops inside of a parallel event. Parallel (and autorun) events already cycle, so taking something that repeats and having another section inside of it that also repeats is just begging for flow errors.

If there's something you want to happen just once when you get to the main menu, put it on a separate page then switch to a parallel that does your image movements and there's no sub-loop.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,762
Reaction score
609
First Language
German
Primarily Uses
RMMV
Which Skip Title Screen Plugin are you using?
I remember reading about one of them causing a bit of trouble with some things.

The one that comes with the Engine is missing, you can download it here:
But i doubt that this caused your Problem.
 
Joined
Jul 12, 2020
Messages
426
Reaction score
235
First Language
English
Primarily Uses
RMMV
Oop my bad guys, I should've clarified more:

I'm using HimeWorks's Pre-Title events plugin for this. The reasoning was because I wanted to animate my title screen background instead of having a stale image. I will show you a picture of what I'm talking about:

Screen Shot 2022-08-18 at 7.37.03 PM.png

So here's my title screen that appears after Event 001 (the autorun splashscreens) finish.

Event 002 (the looping parallel with all the show-picture commands) is for animating that actual yellow-white background to look like this. (This works no problem).

Title.gif

Event 003 (the one with all the ifs and button inputs) is what I use for the player to "select" those 4 main menu options (based on the Selector Variable) you see now. (New game = 1, Continue = 2, Options= 3, Shutdown =4).
I made it this way so that my title options look like cute buttons instead of the generic menu.
Screen Shot 2022-08-18 at 8.04.45 PM.png

That's why I needed to use script calls for 2 and 3, since I had to confirm what happens if the player presses "OK" when the variable happens to be 2 or 3. It is the way to display the illusion of a custom menu.
As you see here, I just manipulated the show/erase picture properties so that whatever variable the Selector variable is corresponds to a "highlighted" button.
NewGame.png

Continue.png
Options.png

Shutdown.png

Just like this.
Then whatever was selected, you could hit "OK" on and it will do those scriptcalls for Continue and Options like I said earlier.

It's a little hard to read your events, you describe them but it doesn't look like we actually see all of events 2 and 3.

That being said, you almost certainly shouldn't have loops inside of a parallel event. Parallel (and autorun) events already cycle, so taking something that repeats and having another section inside of it that also repeats is just begging for flow errors.

If there's something you want to happen just once when you get to the main menu, put it on a separate page then switch to a parallel that does your image movements and there's no sub-loop.

Noted, I'll be sure to adjust those loops so that they're separate pages. But still, I'm not sure if that's a cause for this sort of issue? A complete reset of all the variables doesn't seem like something that would be caused by a looping issue?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
5,520
Reaction score
3,590
First Language
English
Primarily Uses
RMMV
But still, I'm not sure if that's a cause for this sort of issue? A complete reset of all the variables doesn't seem like something that would be caused by a looping issue?
Like I said, it's hard to read through the full things (and I'm not even sure that you show the very bottom of them).

But if you do something that breaks the Loop, gets to the bottom of the parallel event, and then starts over, that could result in something like what you're describing.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
37,024
Reaction score
10,022
First Language
German
Primarily Uses
RMMV
Is there anything wrong with the script call perhaps?
yes and no, the problem is that you're calling other scenes.

ONLY the battlescene and the map have event interpreters by default. That is why an item use calling a common event has to go back to the map from the item menu to execute that common event.

and I'm guessing that going to a scene without an event interpreter and then going back to the map forces the map interpreter to reset and restart all its events.
 
  • Like
Reactions: Bex

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,762
Reaction score
609
First Language
German
Primarily Uses
RMMV
I never used that Plugin, but maybe its worth making a backup copy of your project and than
deactivate hime plugin and try the standard skip title plugin.
Just to make sure its not the Plugin and because its pre title.
I have the feeling when you enter and leave the code starts new because its not safed anywhere,
because the Game never got started properly.
just a big guess...
 
Joined
Jul 12, 2020
Messages
426
Reaction score
235
First Language
English
Primarily Uses
RMMV
Like I said, it's hard to read through the full things (and I'm not even sure that you show the very bottom of them).

But if you do something that breaks the Loop, gets to the bottom of the parallel event, and then starts over, that could result in something like what you're describing.

Ahh yeah, see none of those loops ever break. I have it this way so that the player cycles back through the options without ever leaving the values of 1, 2, 3 or 4.

If you'd like, I can show you all of the code, just don't wanna overload/dump it on ya since it's kind of a lot.
But basically, all I have is just some show picture commands and variable changes for the selector-only. But I never have a point where like, the splash screens (Event 001) variable ever gets reset back to 0. So it seems odd that it would get reverted when I hit the "Cancel" button for those 2 specific options.


yes and no, the problem is that you're calling other scenes.

ONLY the battlescene and the map have event interpreters by default. That is why an item use calling a common event has to go back to the map from the item menu to execute that common event.

and I'm guessing that going to a scene without an event interpreter and then going back to the map forces the map interpreter to reset and restart all its events.


Ahh, this sounds like the issue. Cause aside from the scripts, everything else is working perfectly as I wanted.

Is there perhaps another way to tell the game to open a Save File menu, or the Options menu without doing that restart?

I never used that Plugin, but maybe its worth making a backup copy of your project and than
deactivate hime plugin and try the standard skip title plugin.
Just to make sure its not the Plugin and because its pre title.
I have the feeling when you enter and leave the code starts new because its not safed anywhere,
because the Game never got started properly.
just a big guess...


I'll go ahead and give this a try as well because it definitely sounds like I am somehow "avoiding" the main menu since it's just an evented pre-title map.
Though in HImeWorks, there is an option I have checked true to make my Pre-title map the "Title Screen". I thought for sure it would've counted as such.

In all honesty, all I really wanted was just an animated title screen (Event 002), and I probably wouldn't have needed all these main menu commands at all if there was a plugin for that (though I couldn't find one when I researched).

Could you link me a skip-title plugin that you mentioned?
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,762
Reaction score
609
First Language
German
Primarily Uses
RMMV
I allready linked it further up in this Thread.
 

Arthran

Veteran
Veteran
Joined
Jun 25, 2021
Messages
614
Reaction score
608
First Language
English
Primarily Uses
RMMZ
Does this behavior still occur when you set "Use As Title" to "false"?
 
Joined
Jul 12, 2020
Messages
426
Reaction score
235
First Language
English
Primarily Uses
RMMV
Does this behavior still occur when you set "Use As Title" to "false"?

Just tested this.
Unfortunately, yes it does ;w;


I allready linked it further up in this Thread.

Alriiight, I just tested this as well.

So in this version, I took off HimeWorks and used the Yami_SkipTitle for the testing purpose...
I noticed that it sort of worked, but created a new problem. So I went to the Continue/Options tab, cancelled...and it worked! It didn't repeat anything at all, and it went straight back to the menu like I wanted.

But of course, the new problem is that since the player is still here, they are still able to access everything like their items/stats menu which shouldn't be possible on the "main menu".
Also, in-game, if I go to "Game End" and "Go back to Title", it takes me directly back to a generic title screen (without the evented map).


Based on this, it definitely seems like it has something to do with HimeWorks's plugin...
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,762
Reaction score
609
First Language
German
Primarily Uses
RMMV
they are still able to access everything like their items/stats menu which shouldn't be possible on the "main menu".
When your Evented Titlescreen starts, you need to use Eventcommand:
Disable Menu Access. Than the Player should not be able to Open the Menu on Titlescreen.

For the Eventcommand return to title and Game Over, i just noticed that i got the same Problem.
The Plugin seems to have a flaw.

Edit:
I made a Thread to call for some help on this. Maybe @Caethyrils answer in that Thread is also helpful to you.
 
Last edited:
Joined
Jul 12, 2020
Messages
426
Reaction score
235
First Language
English
Primarily Uses
RMMV
When your Evented Titlescreen starts, you need to use Eventcommand:
Disable Menu Access. Than the Player should not be able to Open the Menu on Titlescreen.

For the Eventcommand return to title and Game Over, i just noticed that i got the same Problem.
The Plugin seems to have a flaw.

Edit:
I made a Thread to call for some help on this. Maybe @Caethyrils answer in that Thread is also helpful to you.

Ahhh yeah I was just checking out the help thread.

So based on my situation, what do you think is the best approach? Should I even bother with Pre-Title Events? Keep the Yami_SkipTitle plugin perhaps? I'm not really sure where to go from here tbh.

In general, I like to avoid scripts if I can cause I'm scared of breaking the game, but I also know sometimes you just have to use 'em.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,762
Reaction score
609
First Language
German
Primarily Uses
RMMV
Caethyrils Solution seems to work best, the Blackscreen at Gamestart is half a second longer.
But you need no other Workarounds, Game Over, Game Menu option to go to Title,Event commands,
all work fine. Just make sure to have no Picture selected for the standard titlescreen, or else you will see that one for a split second, which would not look good.
If i dont run into any hidden problems i will use thatone myself.

Thatway you are able to Event your Pre Title and Title Screen.
 
Joined
Jul 12, 2020
Messages
426
Reaction score
235
First Language
English
Primarily Uses
RMMV
Caethyrils Solution seems to work best, the Blackscreen at Gamestart is half a second longer.
But you need no other Workarounds, Game Over, Game Menu option to go to Title,Event commands,
all work fine. Just make sure to have no Picture selected for the standard titlescreen, or else you will see that one for a split second, which would not look good.
If i dont run into any hidden problems i will use thatone myself.

Thatway you are able to Event your Pre Title and Title Screen.

Ahh alright! Just real quick though, where do I insert that snipet of code from Caethyrils?

Code:
/*:
 * @plugindesc Title screen immediately redirects to New Game.
 * @help Free to use and/or modify for any project, no credit required.
 */
void (function(alias) {
  Scene_Title.prototype.start = function() {
    alias.apply(this, arguments);
    this.commandNewGame();
  };
})(Scene_Title.prototype.start);
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,762
Reaction score
609
First Language
German
Primarily Uses
RMMV
Close RPG Maker
Navigate to your Project folder in there you find the js folder, and in there you find the plugins folder.
copy paste one of the existing ones, than rename that file (no free spaces and no special signs in the name).
Than Open that file with the standard Text Editor.
Delete everything in there. Than copy paste caethyrils script snippet and safe the file.

Open RPG Maker
Go to Plugin manager, select the plugin from the available list.

Safe Project and Hit Playtest.
 
Joined
Jul 12, 2020
Messages
426
Reaction score
235
First Language
English
Primarily Uses
RMMV
Close RPG Maker
Navigate to your Project folder in there you find the js folder, and in there you find the plugins folder.
copy paste one of the existing ones, than rename that file (no free spaces and no special signs in the name).
Than Open that file with the standard Text Editor.
Delete everything in there. Than copy paste caethyrils script snippet and safe the file.

Open RPG Maker
Go to Plugin manager, select the plugin from the available list.

Safe Project and Hit Playtest.


Done, done and done!
It works perfectly on my end : D

Hurray for Caethyrils!

Thank you to everyone that tried to help!
 
  • Like
Reactions: Bex

Latest Threads

Latest Posts

Latest Profile Posts

DamageEvil_2.png added!
index.php

Important update for Leafko!

Forum statistics

Threads
125,671
Messages
1,172,701
Members
164,802
Latest member
thesailing
Top