[REQUEST]YEP_X_BattleSysATB Battle Status

Oscar92player

Veteran
Veteran
Joined
Jul 26, 2012
Messages
513
Reaction score
229
First Language
Spanish
Primarily Uses
RMMV
Hello everyone! I need help with the YEP_X_BattleSysATB plugin made by Yanfly. The point is that I need to resize the HP, MP, TP and the ATB gauges and his current/max values.





There is a lot of space in the Battle Status Window, and the gauges are very little in comparison. I'd like to edit the part of the plugin that rewrites that part and givo more space to the HP and MP gauges only (leaving enough for the status icons; the TP and ATB gauges are fine), and I have found that part of the plugin between the lines 2073 and 2159:

//=============================================================================
// Window_BattleStatus
//=============================================================================

Window_BattleStatus.prototype.redrawATB = function() {
if (this.isATBGaugeStyle(0)) return;
var rect;
for (var i = 0; i < $gameParty.battleMembers().length; ++i) {
var actor = $gameParty.battleMembers();
if (this.isATBGaugeStyle(1)) {
rect = this.basicAreaRect(i);
this.contents.clearRect(rect.x - 1, rect.y, rect.width + 2, rect.height);
this.drawBasicArea(rect, actor);
} else if (this.isATBGaugeStyle(2)) {
this.redrawATBGaugeRect(i, actor);
}
}
};

Window_BattleStatus.prototype.redrawATBGaugeRect = function(index, actor) {
var rect = this.gaugeAreaRect(index);
var clrect = this.gaugeAreaRect(index);
var totalArea = this.gaugeAreaWidth();
if ($dataSystem.optDisplayTp) {
var gw = totalArea / 4 - 15;
clrect.x = rect.x + gw * 3 + 44;
clrect.y = rect.y;
clrect.width = gw + 2;
this.contents.clearRect(clrect.x, clrect.y, clrect.width, clrect.height);
this.drawActorAtbGauge(actor, rect.x + gw * 3 + 45, rect.y, gw);
} else {
totalArea -= 30;
var hpW = parseInt(totalArea * 108 / 300);
var otW = parseInt(totalArea * 96 / 300);
clrect.x = rect.x + hpW + otW + 29;
clrect.y = rect.y;
clrect.width = otW + 2;
this.contents.clearRect(clrect.x, clrect.y, clrect.width, clrect.height);
this.drawActorAtbGauge(actor, rect.x + hpW + otW + 30, rect.y, otW);
}
};

Window_BattleStatus.prototype.isATBGaugeStyle = function(type) {
if (this.atbGaugeStyle() !== type) return false;
if (!BattleManager.isATB()) return false;
return (SceneManager._scene instanceof Scene_Battle);
};

Yanfly.ATB.Window_BattleStatus_drawBasicArea =
Window_BattleStatus.prototype.drawBasicArea;
Window_BattleStatus.prototype.drawBasicArea = function(rect, actor) {
if (this.isATBGaugeStyle(1)) {
this.drawActorAtbGauge(actor, rect.x, rect.y, rect.width);
}
Yanfly.ATB.Window_BattleStatus_drawBasicArea.call(this, rect, actor);
};

Yanfly.ATB.Window_BattleStatus_drawGaugeAreaWithTp =
Window_BattleStatus.prototype.drawGaugeAreaWithTp;
Window_BattleStatus.prototype.drawGaugeAreaWithTp = function(rect, actor) {
if (this.isATBGaugeStyle(2)) {
var totalArea = this.gaugeAreaWidth();
var gw = totalArea / 4 - 15;
this.drawActorHp(actor, rect.x + 0, rect.y, gw);
this.drawActorMp(actor, rect.x + gw * 1 + 15, rect.y, gw);
this.drawActorTp(actor, rect.x + gw * 2 + 30, rect.y, gw);
this.drawActorAtbGauge(actor, rect.x + gw * 3 + 45, rect.y, gw);
} else {
Yanfly.ATB.Window_BattleStatus_drawGaugeAreaWithTp.call(this, rect, actor);
}
};

Yanfly.ATB.Window_BattleStatus_drawGaugeAreaWOTp =
Window_BattleStatus.prototype.drawGaugeAreaWithoutTp;
Window_BattleStatus.prototype.drawGaugeAreaWithoutTp = function(rect, actor) {
if (this.isATBGaugeStyle(2)) {
var totalArea = this.gaugeAreaWidth() - 30;
var hpW = parseInt(totalArea * 108 / 300);
var otW = parseInt(totalArea * 96 / 300);
this.drawActorHp(actor, rect.x + 0, rect.y, hpW);
this.drawActorMp(actor, rect.x + hpW + 15, rect.y, otW);
this.drawActorAtbGauge(actor, rect.x + hpW + otW + 30, rect.y, otW);
} else {
Yanfly.ATB.Window_BattleStatus_drawGaugeAreaWOTp.call(this, rect, actor);
}
};






I tried to change myself that part, but I don't know much about JavaScript. If possible, I would like it to be an add-on, but if I have to change that part of the code, it is more than enough, really.


P.D.: Another request I need to ask if it's possible to make a plugin to use gauge custom graphics for ATB and TP instead of using the default ones. That would be great, seriously.


Thank you! Regards!
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

Are we allowed to post about non-RPG Maker games? And, if so, would any of you be interested in a short, proof of concept type non-euclidian puzzle game?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:

Forum statistics

Threads
105,883
Messages
1,017,232
Members
137,607
Latest member
Maddo
Top