remove status bar for specific actor plugin

● ARCHIVED · READ-ONLY
Started by ramedina1234 8 posts View original ↗
  1. is there a plugin where you can remove completely status bar for specific actor? like a pet in battle that doesnt attack but just have idle animation and victory animation. or a quest that need to escort some npc.

    Here's the picture:
    remove.png

    I dont want it to look like this:
    remove.png


    I just want it to be remove completely. For example actor 2 is on battle but dont have status bar.
  2. What plugins are you currently using? Does one of them already prevent the pet from attacking or being selected in the battle?
  3. Im using octopack battleOTB and yep selection control so that enemies wont attack him. And i just use state "cannot move" so that he wont attack.
  4. I do not have experience with the OTB. You may try the plugin below, which seems to work with MV's battle system and with YEP_BattleEngineCore. In those applications, this plugin allows an inactive battler to be specified with the note <watchBattle> in the Actors section of the database. The inactive battler has walking, escape, and victory motion animations, but does not attack, does not get attacked, does not get healed, and does not prevent a Game Over scene if the other party members are defeated. The inactive battler also has no name or stats displayed in the battle scene. The inactive battler is treated as a normal party member outside of the battle scene.
    Code:
    // InactiveBattler.js
    // Created on 10/8/2018
    // Last modified on 10/10/2018 by Yethwhinger
    
    var objYeth = objYeth || {};
    var Yanfly = Yanfly || false;
    
    /*:
    * @plugindesc This plugin is meant to allow an actor to
    * appear in battles but not participate.
    * @author Yethwhinger
    *
    * @help This plugin allows specified actors to appear in the
    * battle scene without participating in combat. Such inactive
    * battlers are specified with the note <watchBattle> in the
    * Note field in the Actors section of the database. These
    * inactive battlers will not be able to be healed or attacked
    * during combat and will not have their status displayed
    * during combat.
    */
    
    //----------------------------
    // Changes to Game_Actor
    //----------------------------
    
    objYeth.Game_Actor_setupInactBat = Game_Actor.prototype.setup;
    Game_Actor.prototype.setup = function (actorId) {
        var watchBattle = $dataActors[actorId].meta.watchBattle;
        objYeth.Game_Actor_setupInactBat.call(this, actorId);
        if (watchBattle) {
            this._watchBattle = watchBattle;
        }
    };
    
    Game_Actor.prototype.actingIndex = function () {
        return $gameParty.actingBattleMembers().indexOf(this);
    };
    
    if (Yanfly) {
        if (Yanfly.BEC) {
            objYeth.Game_Actor_isSelectedInactBat = Game_Actor.prototype.isSelected;
            Game_Actor.prototype.isSelected = function () {
                if (this._watchBattle) {
                    return false;
                }
                else {
                    return objYeth.Game_Actor_isSelectedInactBat.call(this);
                }
            };
        }
    }
    
    //--------------------------------
    // Changes to Game_Party
    //--------------------------------
    
    Game_Party.prototype.actingBattleMembers = function () {
        var members = this.battleMembers().slice();
        var i;
        var nMembers = members.length;
        for (i = 0; i < nMembers; i++) {
            if (members[i]._watchBattle) {
                members.splice(i, 1);
                i--;
                nMembers--;
            }
        }
        return members;
    };
    
    Game_Party.prototype.aliveMembers = function () {
        return this.actingBattleMembers().filter(function (member) {
            return member.isAlive();
        });
    };
    
    Game_Party.prototype.smoothTarget = function (index) {
        if (index < 0) {
            index = 0;
        }
        var member = this.actingBattleMembers()[index];
        return (member && member.isAlive()) ? member : this.aliveMembers()[0];
    };
    
    Game_Party.prototype.makeActions = function () {
        this.actingBattleMembers().forEach(function (member) {
            member.makeActions();
        });
    };
    
    Game_Party.prototype.selectActing = function (activeMember) {
        this.actingBattleMembers().forEach(function (member) {
            if (member === activeMember) {
                member.select();
            } else {
                member.deselect();
            }
        });
    };
    
    //--------------------------------
    // Changes to Scene_Battle
    //--------------------------------
    
    Scene_Battle.prototype.startActorCommandSelection = function () {
        this._statusWindow.select(BattleManager.actor().actingIndex());
        this._partyCommandWindow.close();
        this._actorCommandWindow.setup(BattleManager.actor());
    };
    
    //--------------------------------
    // Changes to BattleManager
    //--------------------------------
    
    BattleManager.allBattleMembers = function () {
        return $gameParty.actingBattleMembers().concat($gameTroop.members());
    };
    
    BattleManager.makeActionOrders = function () {
        var battlers = [];
        if (!this._surprise) {
            battlers = battlers.concat($gameParty.actingBattleMembers());
        }
        if (!this._preemptive) {
            battlers = battlers.concat($gameTroop.members());
        }
        battlers.forEach(function (battler) {
            battler.makeSpeed();
        });
        battlers.sort(function (a, b) {
            return b.speed() - a.speed();
        });
        this._actionBattlers = battlers;
    };
    
    BattleManager.actor = function () {
        return this._actorIndex >= 0 ? $gameParty.actingBattleMembers()[this._actorIndex] : null;
    };
    
    BattleManager.selectNextCommand = function () {
        var nActing = $gameParty.actingBattleMembers().length;
        do {
            if (!this.actor() || !this.actor().selectNextCommand()) {
                this.changeActor(this._actorIndex + 1, 'waiting');
                if (this._actorIndex >= nActing) {
                    this.startTurn();
                    break;
                }
            }
        } while (!this.actor().canInput());
    };
    
    if (Yanfly) {
        if (Yanfly.BEC) {
            objYeth.BattleManager_startInputInactBat = BattleManager.startInput;
            BattleManager.startInput = function () {
                objYeth.BattleManager_startInputInactBat.call(this);
                $gameParty.requestMotionRefresh();
            };
        }
    }
    
    //--------------------------------
    // Changes to Window_BattleStatus
    //--------------------------------
    
    objYeth.Window_BattleStatus_initializeInactBat = Window_BattleStatus.prototype.initialize;
    Window_BattleStatus.prototype.initialize = function () {
        this.calcMaxItems();
        objYeth.Window_BattleStatus_initializeInactBat.call(this);
    };
    
    Window_BattleStatus.prototype.calcMaxItems = function () {
        this._maxItems = $gameParty.actingBattleMembers().length;
    };
    
    Window_BattleStatus.prototype.maxItems = function () {
        return this._maxItems;
    };
    
    Window_BattleStatus.prototype.drawItem = function (index) {
        var actor = $gameParty.actingBattleMembers()[index];
        this.drawBasicArea(this.basicAreaRect(index), actor);
        this.drawGaugeArea(this.gaugeAreaRect(index), actor);
    };
    
    Window_BattleStatus.prototype.drawAllItems = function () {
        var topIndex = this.topIndex();
        for (var i = 0; i < this.maxPageItems() ; i++) {
            var index = topIndex + i;
            if (index < this.maxItems()) {
                this.drawItem(index);
            }
        }
    };
    
    Window_BattleStatus.prototype.updateStatusRequests = function () {
        if (BattleManager._victoryPhase) return;
        for (var i = 0; i < this._maxItems; ++i) {
            var actor = $gameParty.actingBattleMembers()[i];
            if (!actor) continue;
            if (actor.isStatusRefreshRequested()) this.processStatusRefresh(i);
        }
    };
    
    //--------------------------------
    // Changes to Window_BattleActor
    //--------------------------------
    
    Window_BattleActor.prototype.select = function (index) {
        Window_BattleStatus.prototype.select.call(this, index);
        $gameParty.selectActing(this.actor());
    };
    
    Window_BattleActor.prototype.actor = function () {
        return $gameParty.actingBattleMembers()[this.index()];
    };
    
    Window_BattleActor.prototype.getClickedActor = function () {
        for (var i = 0; i < $gameParty.actingBattleMembers().length; ++i) {
            var actor = $gameParty.actingBattleMembers().reverse()[i];
            if (!actor) continue;
            if (this.isClickedActor(actor)) {
                if (this._selectDead && !actor.isDead()) continue;
                if (this._inputLock) {
                    if (this.cursorAll()) {
                        return this.index();
                    }
                    else {
                        if (actor.actingIndex() !== this.index()) continue;
                    }
                }
                return actor.actingIndex();
            }
        }
        return -1;
    };
    
    Window_BattleActor.prototype.getMouseOverActor = function () {
        for (var i = 0; i < $gameParty.actingBattleMembers().length; ++i) {
            var actor = $gameParty.actingBattleMembers().reverse()[i];
            if (!actor) continue;
            if (this.isMouseOverActor(actor)) {
                if (this._selectDead && !actor.isDead()) continue;
                if (this._inputLock && actor.actingIndex() !== this.index()) continue;
                return actor.actingIndex();
            }
        }
        return -1;
    };
    
    Window_BattleActor.prototype.onTouch = function (triggered) {
        var lastIndex = this.index();
        var x = this.canvasToLocalX(TouchInput.x);
        var y = this.canvasToLocalY(TouchInput.y);
        var hitIndex = this.hitTest(x, y);
        if (hitIndex >= 0) {
            if (this.cursorAll() || hitIndex === this.index()) {
                if (triggered && this.isTouchOkEnabled()) {
                    this.processOk();
                }
            } else if (this.isCursorMovable()) {
                this.select(hitIndex);
            }
        } else if (this._stayCount >= 10 && !this.cursorAll()) {
            if (y < this.padding) {
                this.cursorUp();
            } else if (y >= this.height - this.padding) {
                this.cursorDown();
            }
        }
        if (this.index() !== lastIndex) {
            SoundManager.playCursor();
        }
    };
  5. Hey sorry for the late reply. nice plugin. though i still want my pet to attack but auto battle. he will just attack without me controlling though i know how to auto battle flag. i just want to delete the name hp bar mp bar etc or rather status bar of that actor.

    EDIT: And it has issue with GALV_Layer Graphics
  6. What is the issue with GALV_LayerGraphics? Is there an error message in the debugger or on the game screen?
  7. sorry. there's no issue. it's just one of my program is causing error. sorry again
  8. You may try the plugin below, which I have tested with MV's battle system. Since this plugin is made to be used with an auto-battle actor that cannot be selected, due to the <Cannot Select: All> note being used with YEP_X_SelectionControl, it is possible for the auto-battling actor to keep fighting indefinitely without user input after all the other actors have been defeated. Is that situation acceptable in your game?
    Code:
    // NoBattleStat.js
    // Created on 10/15/2018
    
    var objYeth = objYeth || {};
    
    /*:
    * @plugindesc This plugin is meant to remove the battle status
    * display from an auto-battle actor.
    * @author Yethwhinger
    *
    * @help This plugin removes the battle status display for actors
    * who have the Special Flag Auto Battle set. It requires the
    * YEP_X_SelectionControl plugin. The auto-battling actor must have
    * <Cannot Select: All> placed in the actor's Note field in the
    * database.
    */
    
    //----------------------------
    // Changes to Game_Actor
    //----------------------------
    
    Game_Actor.prototype.userConIndex = function () {
        return $gameParty.userBattleMembers().indexOf(this);
    };
    
    //--------------------------------
    // Changes to Game_Party
    //--------------------------------
    
    Game_Party.prototype.userBattleMembers = function () {
        var members = this.battleMembers().slice();
        var i;
        var nMembers = members.length;
        for (i = 0; i < nMembers; i++) {
            if (members[i].isAutoBattle()) {
                members.splice(i, 1);
                i--;
                nMembers--;
            }
        }
        return members;
    };
    
    Game_Party.prototype.selectUserCon = function (userMember) {
        this.userBattleMembers().forEach(function (member) {
            if (member === userMember) {
                member.select();
            } else {
                member.deselect();
            }
        });
    };
    
    //--------------------------------
    // Changes to Scene_Battle
    //--------------------------------
    
    Scene_Battle.prototype.startActorCommandSelection = function () {
        this._statusWindow.select(BattleManager.actor().userConIndex());
        this._partyCommandWindow.close();
        this._actorCommandWindow.setup(BattleManager.actor());
    };
    
    //--------------------------------
    // Changes to Window_BattleStatus
    //--------------------------------
    
    objYeth.Window_BattleStatus_initializeNoBatStat = Window_BattleStatus.prototype.initialize;
    Window_BattleStatus.prototype.initialize = function () {
        this.calcMaxItems();
        objYeth.Window_BattleStatus_initializeNoBatStat.call(this);
    };
    
    Window_BattleStatus.prototype.calcMaxItems = function () {
        this._maxItems = $gameParty.userBattleMembers().length;
    };
    
    Window_BattleStatus.prototype.maxItems = function () {
        return this._maxItems;
    };
    
    Window_BattleStatus.prototype.drawItem = function (index) {
        var actor = $gameParty.userBattleMembers()[index];
        this.drawBasicArea(this.basicAreaRect(index), actor);
        this.drawGaugeArea(this.gaugeAreaRect(index), actor);
    };
    
    Window_BattleStatus.prototype.updateStatusRequests = function () {
        if (BattleManager._victoryPhase) return;
        for (var i = 0; i < this._maxItems; ++i) {
            var actor = $gameParty.userBattleMembers()[i];
            if (!actor) continue;
            if (actor.isStatusRefreshRequested()) this.processStatusRefresh(i);
        }
    };
    
    Window_BattleStatus.prototype.onInactiveSelectTouch = function () {
        var lastIndex = this.index();
        var x = this.canvasToLocalX(TouchInput.x);
        var y = this.canvasToLocalY(TouchInput.y);
        var hitIndex = this.hitTest(x, y);
        if (hitIndex >= 0) {
            var actor = $gameParty.userBattleMembers()[hitIndex];
            var win = this._enemySelectWindow;
            if (actor && win) {
                var winIndex = win._enemies.indexOf(actor);
                if (winIndex >= 0) {
                    if (winIndex !== win.index()) {
                        win.select(winIndex);
                        SoundManager.playCursor();
                    } else {
                        win.processOk();
                    }
                }
            }
        }
    };
    
    //--------------------------------
    // Changes to Window_BattleEnemy
    //--------------------------------
    
    Window_BattleEnemy.prototype.select = function (index) {
        $gameTroop.select(null);
        $gameParty.select(null);
        Yanfly.Sel.Window_BattleEnemy_select.call(this, index);
        if (this.enemy() === 'ALL ENEMIES') {
            var length = this._enemies.length;
            for (var i = 0; i < length; ++i) {
                var target = this._enemies[i];
                if (!target) continue;
                if (typeof target === 'string') continue;
                if (target.isEnemy()) target.select();
            }
        } else if (this.enemy() === 'ALL ALLIES') {
            var length = this._enemies.length;
            for (var i = 0; i < length; ++i) {
                var target = this._enemies[i];
                if (!target) continue;
                if (typeof target === 'string') continue;
                if (target.isActor()) target.select();
            }
        } else if (this.enemy() && this.enemy().isActor()) {
            $gameParty.selectUserCon(this.enemy());
            this.actorWindow().select(this.enemy().userConIndex());
        }
    };