Yanfly's CTB - Hide Turn Order Window

shukiri

Villager
Member
Joined
Nov 6, 2018
Messages
19
Reaction score
5
First Language
english
Primarily Uses
RMMV
Hi,

I need some help hiding the turn order display in some specific circumstances such as on the victory screen and when text is displayed in battle (temporarily hiding). If someone could either point out how to do it, I would be extremely grateful.

Script: http://www.yanfly.moe/wiki/Battle_System_-_CTB_(YEP)

Thanks.
 

shukiri

Villager
Member
Joined
Nov 6, 2018
Messages
19
Reaction score
5
First Language
english
Primarily Uses
RMMV
Update: I've solved half of the problem by using the patch here: https://forums.rpgmakerweb.com/inde...attle-result-with-yanfly-plugins-rmmv.104946/ -- It now hides when displaying battle results.

Code:
var Imported = Imported || {};
Imported.MRP_MOG_YEP_BattleResultHide = true;

(function() {
    var MRP_BATTLERESULTHIDE_SB_CREATEBRESULT_OLD = Scene_Battle.prototype.createBResult;
    Scene_Battle.prototype.createBResult = function() {
        MRP_BATTLERESULTHIDE_SB_CREATEBRESULT_OLD.call(this);
        
        if(Imported.YEP_BattleEngineCore) BattleManager._victoryPhase = true;
        if(Imported.YEP_BattleStatusWindow)
        {
            this._statusWindow.hide();       
        }       
    };   
})();
Can anyone use this to also hide the CTB order window when text is being shown in battle?

I read somewhere that is might have to do with $gameMessage.isBusy()... how would I use that?

Thanks.
 

shukiri

Villager
Member
Joined
Nov 6, 2018
Messages
19
Reaction score
5
First Language
english
Primarily Uses
RMMV
So the setting "BattleManager._victoryPhase = true;" hides it permanently. I need a way to turn it off and on when text shows in battle.

Code:
Window_CTBIcon.prototype.updateOpacity = function() {
    var rate = this.opacityFadeRate();
    
    if (this._foreverHidden) return this.reduceOpacity();
    if (this.isReduceOpacity()) return this.reduceOpacity();
    if (BattleManager._victoryPhase) {
      this._foreverHidden = true;
      return this.reduceOpacity();
    }
    if (BattleManager._escaped) {
      this._foreverHidden = true;
      return this.reduceOpacity();
    }
    if (this._battler) {
      var index = BattleManager.ctbTurnOrder().reverse().indexOf(this._battler);
      if (index < 0) return this.reduceOpacity();
    }
    this.contentsOpacity += rate;
};
In the plugin settings, there is a parameter to show hide the turn order "Yanfly.Param.CTBTurnOrder" but I think it only checks this at the battle start...

Code:
Sprite_Battler.prototype.createCTBIcon = function() {
    if (!Yanfly.Param.CTBTurnOrder) return;
    this._ctbIcon = new Window_CTBIcon(this);
};
Is there something we can put in the updateOpacity function to hide when "$gameMessage.isBusy()" or whatever the appropriate condition for that is?
 

shukiri

Villager
Member
Joined
Nov 6, 2018
Messages
19
Reaction score
5
First Language
english
Primarily Uses
RMMV
Finally figured it out:

Dedicate a switch to turning it on and off and then put a new line here:

Code:
Window_CTBIcon.prototype.updateOpacity = function() {
    var rate = this.opacityFadeRate();
    if ($gameSwitches.value(YOURSWITCH) == false) return this.reduceOpacity();
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top