RMMV YEP_SegmentedGauges and YEP_AbsorbtionBarrier creates false segments for the barrier.

HornsterLG

Regular
Regular
Joined
Dec 19, 2021
Messages
91
Reaction score
26
First Language
german
Primarily Uses
RMMV
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.
 

HornsterLG

Regular
Regular
Joined
Dec 19, 2021
Messages
91
Reaction score
26
First Language
german
Primarily Uses
RMMV
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...
 

Latest Threads

Latest Posts

Latest Profile Posts

The X-Mas and ~ all ~ December long Calendar Project seems to bring my machine right to the limit. A very good oportunity to test what my pc can do. Or at which point I should decide to take a step back from filling the rendering program with assets.
The new grafics card and ram do their job well, that's for sure. My own early Christmas gifts were a good investment.
my laptop keyboard gave up, they keep glitching out, it seems like it's time to finally replace them, honestly surprised it lasted this long.
Tiny setback. Turns out my Title Screen image and one of my primary background & avatar images are AI Generated. Glad I went back and checked all my resource links. So I am in hot pursuit of replacement images. Which is fine since I was still missing some images that I need anyway.
Watching Vibrato Chain Battle System is too awesome! watch I wish had this gfx and animation skill to make such game!
Got drawn back by a notification about QPlugins. For those who want the MZ versions I was using, they're on my Github. https://github.com/ImaginaryVillain/QPlugins I literally don't care what you do with them, have fun! :LZSlol:

Meanwhile.. I'm glorying over these 550 new Victorian house models Epic gave me this month. See next post for examples....

Forum statistics

Threads
136,892
Messages
1,271,117
Members
180,670
Latest member
jakkapong
Top