Yanfly Party limit Gauge: Add Y position on condition

● ARCHIVED · READ-ONLY
Started by Lnik3500 2 posts View original ↗
  1. Hello! I'm looking to modify the plugin slightly for better looks in my game. I am looking to have the gauge go lower when the help window is opened, inspired by Yanfly's Turn Order Display.

    Here is the code I found to modify:
    Code:
    Window_PartyLimitGauge.prototype.getPositionY = function() {
        if (Imported.YEP_BattleEngineCore) {
          var statusHeight = Yanfly.Param.BECCommandRows;
        } else {
          var statusHeight = 4;
        }
        statusHeight *= Window_Base.prototype.lineHeight.call(this);
        statusHeight += Window_Base.prototype.standardPadding.call(this) * 2;
        var height = this.windowHeight();
        return eval(this._unit.partyLimitGaugePosY());
    };

    Here is the code I found that would change the Y position of the turn orders:
    Code:
    Window_TurnOrderIcon.prototype.destinationY = function() {
      var value = Yanfly.Param.TODPositionY;
      if (this._helpWindow && this._helpWindow.visible) {
        var cap = this._helpWindow.height;
        this._selectHeight = this._selectHeight ||
          Math.round(this.contents.height / 4);
        value = Math.max(value, cap + this._selectHeight);
      }
      if (!this.battler()) return value;
      if (this.battler().isSelected()) {
        value -= this._selectHeight;
      }
      return value;
    };

    The end result would be that the gauge would lower by an amount I would change myself, but I don't know how I can achieve this. Any help would be the best.
  2. Bump