Issue with Yanfly's Frontview Battlers loading ontop of MOG's Battle HUD

Hello! So I’m using both Yanfly’s Battle Engine Core and Mog’s Battle HUD plugin. I’m having an issue where the battler sprites load on top of the battle menu I’ve made with Mog’s plugin. What I want is for the battler sprites to appear behind the HUD. I’ve tried switching the order of which plugins are loaded first in the plugins manager, to no avail.

Is there a way I could get the Battle Core plugin to load the battlers before the HUD, or is there a way to get the Battle HUD to load after the battler sprites have loaded? I’ve attached an image to show what it looks like. The silhouettes behind each actor are placeholders for what I want the sprites to look like in the final design.

In front view MOG_BattleHud builds its own copies of the actor sprites and drops them into its hud container after the hud panels are already in there. Last child added draws on top, so the sprites land over the panels. That all happens inside MOG’s own code, so the Plugin Manager order won’t move it either way.

I think maybe a small patch plugin would sort it. Save this as its own .js in js/plugins and put it under MOG_BattleHud in the list. It puts the hud pieces back in after the sprites so the panels come out on top:

//=============================================================================
// BattlerBehindHud.js
//=============================================================================
(function() {

    var _createBattleHudSB = Scene_Battle.prototype.createBattleHudSB;
    Scene_Battle.prototype.createBattleHudSB = function() {
        _createBattleHudSB.call(this);
        if (this._screen_layout) {
            this._hudField.addChild(this._screen_layout);
        }
        if (this._battle_hud) {
            for (var i = 0; i < this._battle_hud.length; i++) {
                this._hudField.addChild(this._battle_hud[i]);
            }
        }
    };

})();

I was looking at MOG_BattleHud v5.04f for that so if yours is older the function name might not line up.

THANK YOU SO MUCH!! This plugin works like a charm and I would not have known what to do without it. You’re a real life saver!

1 Like

Glad to hear it worked!