MZ How to make these changes in the pre battle window on SRPG Gear MZ?

I'm testing several battle system plugins to make new games, and I'm thinking about making one similar to the Fire Emblem games with this plugin, one that allows RPG Maker to be played as a strategy RPG. (Like the previously mentioned Fire Emblem or FInal Fantasy Tactics).

I have been testing it, and while the system itself it's fine, I would like to make a few changes that I don`t know if are possible.

Captura de pantalla 2025-11-03 194319.png


As you can see, the window is in Spanish because I'm from Spain, but what you only need to understand the lower part. There it displays the weapon that both the enemy and the playable unit are going to use, their hit rates, range and damage. I would like to move the damage number (The number at the right of the word "Daño"), and use that remaining space to display the critical chance. I think that should be important too. And also display a x2 near of the damage number if someone can double the enemy (which is a mechanic where the unit with more speed than the enemy can attack twice) or a x4 if use a weapon that attack twice by itself, and also doubles.

Another thing I would be very thankful if someone could help is about the speed difference between the units in order to double. Normally the game only allows to do it if the faster unit have two, three, or more times the speed compared to the enemy, but I would like to do it like in Fire Emblem, where you just need a flat 5 points do double.

Have a good day.

I've moved this thread to Plugin Support. Thank you.

Can't you make that attack plus adjustment in the plugin settings?
AgiAttackPlusMode: difference, srpgAgilityAffectsDifference: 5, useProbabilisticAttack: false

I added some lines to the window draw methods (the ones with "// EXTRA" comments) and changed x coordinates in the damagedraw. They use stuff inside the IIFE, so I guess put it at the very bottom in the SRPG Core plugin, but before the last line with different brackets.

Only added the draw x2 from speed difference. If you want it (or x4) from dual wield or some other stuff, you can try add it yourself.

Also, you might want to tweak with some of the x-positions of the draw texts.

Spoiler
Window_SrpgPrediction.prototype.drawContents = function() {
this.resetFontSettings();
const lineHeight = this.lineHeight();
const padding = 24;
const user = this._userArray[1];
const target = this._targetArray[1];
const critChanceUser = ((user.cri - target.cev)*100).toString() + "%"; // EXTRA
const critChanceTarget = ((target.cri - user.cev)*100).toString() + "%"; // EXTRA
// 攻撃側
var action = user.currentAction();
if (action) {
var damage = action.srpgPredictionDamage(target);
var hit = action.itemHit(target);
var eva = action.itemEva(target);
this.drawSrpgBattleActionName(user, action, this.innerWidth / 2 + padding * 2, lineHeight * 0, true);
this.drawSrpgBattleHit(hit, eva, this.innerWidth / 2 + padding * 2, lineHeight * 1);
this.drawSrpgBattleDistance(user, action, this.innerWidth / 2 + 172 + padding * 2, lineHeight * 1);
this.drawSrpgBattleDamage(damage, this.innerWidth / 2 + padding * 2, lineHeight * 2, doubleActionRate);
this.changeTextColor(ColorManager.systemColor()); // EXTRA
this.drawText("Crit", this.innerWidth / 2 + padding * 2 + 150, lineHeight * 2, 112, 'center'); // EXTRA
this.resetTextColor(); // EXTRA
this.drawText(critChanceUser, this.innerWidth / 2 + padding * 2 + 200, lineHeight * 2, 112, 'center'); // EXTRA
} else {
this.drawSrpgBattleActionName(user, action, this.innerWidth / 2 + padding * 2, lineHeight * 0, true);
}
// 迎撃側
var reaction = target.currentAction();
// スキルが使えない場合
if (reaction && !target.canUse(reaction.item())) reaction = null;
// 攻撃側が応戦不能の攻撃の場合
if (action && action.item().meta.srpgUncounterable) reaction = null;
if (!reaction || user === target) {
this.drawSrpgBattleActionName(target, reaction, padding, lineHeight * 0, false);
} else {
var damage = reaction.srpgPredictionDamage(user);
var hit = reaction.itemHit(user);
var eva = reaction.itemEva(user);
this.drawSrpgBattleActionName(target, reaction, padding, lineHeight * 0, true);
this.drawSrpgBattleHit(hit, eva, padding, lineHeight * 1);
this.drawSrpgBattleDistance(target, reaction, 172 + padding, lineHeight * 1);
this.drawSrpgBattleDamage(damage, padding, lineHeight * 2, doubleActionRate);
this.changeTextColor(ColorManager.systemColor()); // EXTRA
this.drawText("Crit", padding + 150, lineHeight * 2, lineHeight * 2, 112, 'center'); // EXTRA
this.resetTextColor(); // EXTRA
this.drawText(critChanceTarget, padding + 200, lineHeight * 2, lineHeight * 2, 112, 'center'); // EXTRA
}
if (_srpgPredictionWindowMode === 2) return;
// 行動順序
BattleManager.makeActionOrders();
this.contents.fontSize = 18;
var order = BattleManager.actionBattlers();
var doubleActioncheck = [];
var doubleActionRate = 0;
var iconBoxWidth = ImageManager.iconWidth + 4;
var orderX = this.innerWidth / 2 - iconBoxWidth;
var orderY = lineHeight - 2;
var line = 0
this.drawText('Action', orderX, -8, iconBoxWidth * 2, 'center');
for (var i = 0; i < order.length; i++) {
battler = order[i];
if (user === battler && action && action.item()) {
// 初回行動時
if (doubleActioncheck.indexOf(battler) < 0) {
this.drawSrpgBattleOrders(battler, action.item(), orderX + iconBoxWidth, 17 + orderY * line);
// 2回行動がある場合
} else if (_srpgUseAgiAttackPlus === 'true' && doubleActioncheck.indexOf(battler) >= 0) {
actionRate = this.setDoubleActionRate(user, target);
if (actionRate > 0) {
this.drawSrpgBattleOrders(battler, action.item(), orderX + iconBoxWidth, 17 + orderY * line);
this.drawText("x2", this.innerWidth / 2 + padding * 2 + 100, lineHeight * 2, 112, 'center'); // EXTRA
if (_srpgUseProbabilisticAttack === 'true') {
this.drawSrpgActionRate(actionRate, orderX + iconBoxWidth, 17 + orderY * line);
}
}
}
// 次の行へ
doubleActioncheck.push(battler);
line++;
} else if (target === battler && reaction && reaction.item()) {
// 初回行動時
if (doubleActioncheck.indexOf(battler) < 0) {
this.drawSrpgBattleOrders(battler, reaction.item(), orderX, 17 + orderY * line);
// 応戦が反撃率に応じる場合
if (_srpgBattleReaction === 2 && target.cnt > 0) {
this.drawSrpgActionRate(target.cnt * 100, orderX, 17 + orderY * line);
}
// 2回行動がある場合
} else if (_srpgUseAgiAttackPlus === 'true' && doubleActioncheck.indexOf(battler) >= 0) {
actionRate = this.setDoubleActionRate(target, user);
if (_srpgBattleReaction === 2 && target.cnt > 0) actionRate = Math.floor(actionRate * target.cnt);
if (actionRate > 0) {
this.drawSrpgBattleOrders(battler, reaction.item(), orderX, 17 + orderY * line);
this.drawText("x2", padding + 100, lineHeight * 2, 112, 'center'); // EXTRA
if (_srpgUseProbabilisticAttack === 'true') {
this.drawSrpgActionRate(actionRate, orderX, 17 + orderY * line);
}
}
}
// 次の行へ
doubleActioncheck.push(battler);
line++;
}
}
};

Window_SrpgPrediction.prototype.drawSrpgBattleDamage = function(damage, x, y) {
this.changeTextColor(ColorManager.systemColor());
if (damage >= 0) {
this.drawText(_textSrpgDamage, x+6, y, 164);
this.resetTextColor();
this.drawText(damage, x + 100, y, 112, 'left');
} else {
this.drawText(_textSrpgHealing, x+6, y, 164);
this.resetTextColor();
this.drawText(damage * -1, x + 100, y, 112, 'left');
}
};
Where I put this code? AgiAttackPlusMode: difference, srpgAgilityAffectsDifference: 5, useProbabilisticAttack: false

Because when I try to put it where it should go, it doesn't let me, it only let me put numbers.

And in which part of the code I have to put the one you sent? (Sorry for being ignorant, I don't know a lot about programming.)
This is the settings for me, when I opened the project from MZ STEAM DLC English Sample Project folder (so presumably the latest version?)

SRPG.JPG



And like I said put (copy paste) the code edit at the very bottom in the SRPG Core plugin, but before the last line with different brackets.
You can open the plugin file with notepad and then just save the edit. I added the extra line comments here just for clarity, hope I didn't mess up anything with those. But yeah copy paste the whole thing.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-these-changes-in-the-pre-battle-window-on-srpg-gear-mz.180842/