RPG Maker Forums

I want to force the map camera to zoom out before taking the snapshot used as the background for the main menu and possibly tint the image in a sepia tone before displaying the menu choices.

Looking at Yanfly's Core engine plugin, it seems simple enough to modify SceneManager.snapForBackground().

Alternatively, looking at Scene_Map and how it handles battle transitions, it seems I should add or modify the the steps between Scene_Map.updateCallMenu() and Scene_Map.callMenu().

Less desirably, I could use HimeWorks Window Background Designer to specify what image appears in the background, but I don't know if it's possible to dynamically assign an image based on the map you're on. SumRndmDde's Kingdom Hearts menu screen has parsing for a map that gives area information and could provide a framework for a dynamic picture, but both those sound like more coding than should be necessary.

To the best of my knowledge, the procedure would be something like:

[Map is running, player calls menu]

1. Map stores current zoom size, preferably as a property of Scene_Map
var mapZoom = Game_Screen.zoomScale;

2a. Map zooms out in preparation for snapping background;
Game_Screen.setZoom(SceneManager._screenWidth/2,SceneManager._screenHeight/2, 0.25)
2b. Sepia tint applied to map

3. Menu opens, zoomed out picture of map is displayed in background
SceneManager.snapForBackground();

4. Player does stuff in the menu, closes menu. Map returns to zoom before opening menu
Game_Screen.setZoom(SceneManager._screenWidth/2,SceneManager._screenHeight/2, mapZoom);

I can't seem to figure out where and how to have the zoom effects though. Any help is appreciated.

Edit: I neglected to mention I was also using MBS Map Zoom. Anyway, I solved the problem using the following in a custom plugin function:

Code:
    Game_Map.prototype._mapZoom = {
        x: 1,
        y: 1,
        is: false,
        ratio : 0.5,
    };

    var _Scene_Map_callMenu = Scene_Map.prototype.callMenu;
    Scene_Map.prototype.callMenu = function() {
        $gameMap._mapZoom.x = $gameMap._zoom.x;
        $gameMap._mapZoom.y = $gameMap._zoom.y;
        $gameMap._mapZoom.is = true;
        $gameMap.setZoom($gameMap._mapZoom.ratio, $gameMap._mapZoom.ratio, 10);
        _Scene_Map_callMenu.call(this);
        this._waitCount = 11;
    };

    var _Scene_Map_update = Scene_Map.prototype.update;
    Scene_Map.prototype.update = function() {
        if (($gameMap._mapZoom.is)&&(!SceneManager.isNextScene(Scene_Menu))) {
            $gameMap._mapZoom.is = false;
            $gameMap.setZoom($gameMap._mapZoom.x,$gameMap._mapZoom.y);
        }
        _Scene_Map_update.call(this);
    };
This thread can be closed.

Latest Threads

Latest Posts

Latest Profile Posts

He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!

Forum statistics

Threads
106,035
Messages
1,018,459
Members
137,821
Latest member
Capterson
Top