MV YEP_SegmentedGauges and YEP_AbsorbtionBarrier creates false segments for the barrier.

YepSegmentedGauges and YEPAbsorbtionBarrier visual barrier bug.png

It should draw a segment every 250hp. And it actually works: "William 4" has 18 segments (4500 / 250), just like "William 2". BUT "William 4" also has a barrier of 2500 points. And the barrier should have either no segments, or preferably 10 segments. But it only has 6,5 segments which is completely wrong and misleading. The Plugins don't even recognize the barrier and just draws the segments-width as if the barrier wouldn't exist and as if "William 4" still only had 4500 hp.

The $gameTroop.members()[1] has a barrier of 500 points, which should have 2 segments, but it hasn't.
here is the fix:
YEP_SegmentedGauges line 263:
function(dx, dy, dw, rate, color1, color2, originalWidth) {

YEP_SegmentedGauges line 266:
this.drawGaugeSegments(dx, dy, dw, 0, 1, originalWidth);

YEP_SegmentedGauges line 164:
Window_Base.prototype.drawGauge = function(dx, dy, dw, rate, color1, color2, originalWidth) {

line 166:
this.drawGaugeSegments(dx, dy, dw, 0, 0, originalWidth);

line 169:
Code:
Window_Base.prototype.drawGaugeSegments = function(dx, dy, dw, xB, yB, originalWidth) {                // this is my drawGaugeSegments function
  var segments = this._gaugeSegments;
  if (segments) {
    var originalX = dx;
    var originalW = dw;
    var gaugeH = this.gaugeHeight() - 2;
    var gaugeY = dy + this.lineHeight() - gaugeH - 2 + yB;   
    if (this.isGaugeOutline()) {
      dx += 1;
      dw -= 2;
      gaugeY -= 2;
    }   
    dx += xB;
    var segmentsToUse = segments * (dw / originalWidth || 1);
    var segmentWidth = Math.round(dw / segmentsToUse);                                
    if (segmentWidth > 1) {
      var color = this.gaugeBackColor();
      for (var i = 1; i < segments; ++i) {
        dx += segmentWidth;
        if (dx > originalX + originalW) return;
        this.contents.fillRect(dx, gaugeY, 1, gaugeH, color);
      }
    }
  }
};

line 136:
this.setGaugeSegments((actor.mhp + actor.barrierPoints()) / (Yanfly.Param.SegmentGaugesHp));

YEP_AbsorptionBarrier line 1434:
Code:
Window_Base.prototype.drawBarrierGauge = function(actor, wx, wy, ww) {
    var max = actor.mhp + actor.barrierPoints();
    var rate1 = actor.mhp / max;
    var ww2 = ww * rate1;          
    var wxbarrier = wx + ww2;                          
    var wwbarrier = ww - wxbarrier + 1;//+ 7;                       
    if (actor.isActor()) wwbarrier = ww - wxbarrier + 7;
    var rate2 = (actor.barrierPoints() + actor.mhp) / max;
    var color1 = this.barrierColor1();
    var color2 = this.barrierColor2();
    this.drawGauge(wxbarrier, wy, wwbarrier, rate2, color1, color2, ww);   
    var color1 = this.hpGaugeColor1();
    var color2 = this.hpGaugeColor2();
    this.drawGauge(wx, wy, ww2, actor.hpRate(), color1, color2, ww);
    return ww;
};

at this point Yanfly should hire me as his bug fixer...

Original thread: https://forums.rpgmakerweb.com/threads/yep_segmentedgauges-and-yep_absorbtionbarrier-creates-false-segments-for-the-barrier.151614/