Fade in when loading file

Hi all, when you load a file in MV the screen immediately jumps into the scene without fade, and there's been some weird effects on some of my maps where the screen flashes with a parallax or some other background before the map itself loads. Is there a plugin/method to make the screen fade in after loading a file rather than just start the file instantly?

I'm specifically hoping to avoid putting a parallel event on every map that, if said map was loading in, would fade in. That would cause a lot of issues when doing certain cutscene/camera things I'm doing. It would be much simpler to have it so that if a file was loaded, ONLY THEN would the screen fade in.

Some helpful context is that I'm using the Yanfly save feature, so I was hoping that it would have an option to fade in after loading but I'm not seeing it.

Any advise would be greatly appreciated!
I couldn't find a plugin that just fades in after loading, but since your problem sounds more like a loading data thing, I would wager you could give a preloader a shot and see if that fixes the weirdness.
A preloader can't work before the savefile is loaded either, it can only work if the game itself that it is part of is already running.

But I agree, that sounds more like a load delay than anything else.
And since there is no way to start loading a file before the savefile is loaded, the only way around that would be to reduce the loadsize of the maps itself - meaning the filesize of the parallax backgrounds, because that is the biggest part of a parallax map load.

And no, a parallel fadein would not help either because nothing can check anything before the savefile is completely loaded.

@KitsuneForest
Have you tried storing your backgrounds with a higher compression rate?
Yes, that reduces quality if you use a too high compression, but the defaults of image programs are often set to max quality for photo images, that is not really needed for pixel map backgrounds....

Other than that we would need some more data on your maps before we can help, like map size in tiles and parallax size in both pixel and bytes.
Hi all, when you load a file in MV the screen immediately jumps into the scene without fade, and there's been some weird effects on some of my maps where the screen flashes with a parallax or some other background before the map itself loads. Is there a plugin/method to make the screen fade in after loading a file rather than just start the file instantly?

I'm specifically hoping to avoid putting a parallel event on every map that, if said map was loading in, would fade in. That would cause a lot of issues when doing certain cutscene/camera things I'm doing. It would be much simpler to have it so that if a file was loaded, ONLY THEN would the screen fade in.

Some helpful context is that I'm using the Yanfly save feature, so I was hoping that it would have an option to fade in after loading but I'm not seeing it.

Any advise would be greatly appreciated!
Whenever you go to transfer the player to another map, Fade Out, and then add a autorun on each map that forces a Fade In and then turns itself off. This will require a switch you use that you turn on before the transfer, and turn off at the end of the autorun.
Is this something similar to your situation?

A preloader can't work before the savefile is loaded either, it can only work if the game itself that it is part of is already running.
Synrec's preloader literally loads everything you want it to before the titlescreen even shows.

Whenever you go to transfer the player to another map, Fade Out, and then add a autorun on each map that forces a Fade In and then turns itself off. This will require a switch you use that you turn on before the transfer, and turn off at the end of the autorun.
Completely irrelevant, as OP is asking for help with a problem when loading a save file, not a map transfer. Well done.
Synrec's preloader literally loads everything you want it to before the titlescreen even shows.
still won't work - the OP has problems with the load time of the parallax backgrounds of his maps, and no one has the RAM to load every background of every map in parallax mapped games at the same time. Not unless this is a rather small game with small maps, and then he wouldn't have that problem.

what might work is a plugin for exchanging the load function in a way that the load function itself fades out the screen and creates the fadein. If the fadein isn't handled by a map event but initiated from the internal load function that would work here.
But I never heard of a plugin like that, so it most likely would have to be requested.
This is not a fix all (also untested so please test and report of any issues), but here is a start to allow you to fade into the scene map - save this as a plugin:
Spoiler
JavaScript:
Scene_Map.prototype.isReady = function() {
    if (!this._mapLoaded && DataManager.isMapLoaded()) {
        this.onMapLoaded();
        this._mapLoaded = true;
        this.startFadeOut(0, false);

    } else if (this._mapLoaded) {
        this.startFadeIn(this.slowFadeSpeed(), false);
    }

    return this._mapLoaded && Scene_Base.prototype.isReady.call(this);
}
Change the .slowFadeSpeed() to .fadeSpeed() if you need it to be faster, or use any constant there (default fade speed is 24 frames).


Edit: Please see code below for specific fade only from Scene Title.
still won't work - the OP has problems with the load time of the parallax backgrounds of his maps, and no one has the RAM to load every background of every map in parallax mapped games at the same time. Not unless this is a rather small game with small maps, and then he wouldn't have that problem.

what might work is a plugin for exchanging the load function in a way that the load function itself fades out the screen and creates the fadein. If the fadein isn't handled by a map event but initiated from the internal load function that would work here.
But I never heard of a plugin like that, so it most likely would have to be requested.
Nah, he just needs a 90 frame wait and it should do it. If someone has less than the minimum required, that's on them, not the Dev.

And who said anything at all about a plugin. This is eventing. Not everything has to be a plugin.
Nah, he just needs a 90 frame wait and it should do it.
and how do you start such an event from the title screen, before the game is even loaded?

The OP has no problems after a map transfer, he has a problem after a savegame is loaded.
and how do you start such an event from the title screen, before the game is even loaded?

The OP has no problems after a map transfer, he has a problem after a savegame is loaded.
Read it again.

Hi all, when you load a file in MV the screen immediately jumps into the scene without fade, and there's been some weird effects on some of my maps where the screen flashes with a parallax or some other background before the map itself loads. Is there a plugin/method to make the screen fade in after loading a file rather than just start the file instantly?

WHAT MAPS ARE ON THE TITLE SCREEN? They are talking about loading files like images, not the title screen.
WHAT MAPS ARE ON THE TITLE SCREEN? They are talking about loading files like images, not the title screen.
Only the OP can clarify, but I'm pretty sure they were talking about loading a savefile, not an image file.
and savefiles can only be loaded from the title screen, and they always contain the current map...
Apologies for the delay, was AFK most of the day

I do mean loading from save files, not just from map to map in game. Sorry for not clarifying that.

While I am having the loading problem on one map in particular, I still want to have the ability for my game to fade in from save file loads just as a preference. It overall looks cleaner, so even if I solve the problem on this map, it's good to have this fade-in ability regardless of where in the game you are.

The reason I don't want to have a fade-in parallel event for when you enter any map is because I have the game use map transfers in unique ways to move the player around instantaneously within a map (aka transfer from one point in the map to another point in the same map). It would just be easier to focus on the one circumstance where the player loads the save and then the screen fades in.

I'll try a couple of the solutions suggested above tomorrow and will report back. Just wanted to pop in for clarifications real quick
The reason I don't want to have a fade-in parallel event for when you enter any map is because I have the game use map transfers in unique ways to move the player around instantaneously within a map (aka transfer from one point in the map to another point in the same map). It would just be easier to focus on the one circumstance where the player loads the save and then the screen fades in.
Thank you - this is important information. What I gave you occurs on every scene change when the map is loaded (and is checking to see if it is ready).

Try this solution instead when you get the chance - save as a plugin (probably put it near the top in case you have other plugins aliasing this method):
Spoiler
JavaScript:
// Fade in when map is loading from Scene Title only
Scene_Map.prototype.isReady = function() {
    let check = false;

    if (!this._mapLoaded) {
        if (SceneManager.isPreviousScene(Scene_Title)) check = true;

        if (DataManager.isMapLoaded()) {
            this.onMapLoaded();
            this._mapLoaded = true;

            if (check) this.startFadeOut(0, false);
        }
    }
  
    if (this._mapLoaded && check) this.startFadeIn(this.slowFadeSpeed(), false);

    return this._mapLoaded && Scene_Base.prototype.isReady.call(this);
}
Thanks!
Yep, this seems to do the trick! Thanks everyone for your help!
Thank you - this is important information. What I gave you occurs on every scene change when the map is loaded (and is checking to see if it is ready).

Try this solution instead when you get the chance - save as a plugin (probably put it near the top in case you have other plugins aliasing this method):
Spoiler
JavaScript:
// Fade in when map is loading from Scene Title only
Scene_Map.prototype.isReady = function() {
    let check = false;

    if (!this._mapLoaded) {
        if (SceneManager.isPreviousScene(Scene_Title)) check = true;

        if (DataManager.isMapLoaded()) {
            this.onMapLoaded();
            this._mapLoaded = true;

            if (check) this.startFadeOut(0, false);
        }
    }
 
    if (this._mapLoaded && check) this.startFadeIn(this.slowFadeSpeed(), false);

    return this._mapLoaded && Scene_Base.prototype.isReady.call(this);
}
Thanks!
Only the OP can clarify, but I'm pretty sure they were talking about loading a savefile, not an image file.
and savefiles can only be loaded from the title screen, and they always contain the current map...
Then what maps are they talking about. You saw load file, and assumed it meant loading the tester. Keep reading and they are talking about files like parallax. Literally said, it flashes on the MAP. So I do NOT understand why you are ATTACKING a person that actually read it and helped!!

Original thread: https://forums.rpgmakerweb.com/threads/fade-in-when-loading-file.180810/