Most of your incompatibility issues are you using plenty of YEP plugins. YEP was never meant to be comptable with other systems. You will need to see what works and what not. I think you should use dopans demo srpg core instead.. boomys shoukang and even mine are based on the 1.34Q which has no YEP at all
MV SRPG Engine MV - Plugins for creating Tactical Battle System
JS Plugin Releases (RMMV)I see.
I don't understand what happened but now Boomy's SRPG_Windows plugin works lol.
I just disabled all plugins that are not SRPG and reactivate them one by one and there is no problem anymore.
However I copied his FE GBA quick status window code + his FE GBA prediction windows code (in his GitHub page https://github.com/boomyville/RMMV/tree/master/SRPG Window ) and
2 things disturb me (one more ... strange than the other).
First the HP gauge don't display in the quick status window
The second (and a little more disturbing) is that the dammage prediction is completly wrong.
Prediction window tells me that the enemy will do 1 dammage, but in reality I take 19 damage lol
Maybe there are problems in the code used. I will copy it there
Quick status window lunatic code :
Prediction window lunatic code (normaly ";" means go on another line. To more lisibility I created a new line each time I saw a ";")
I don't understand what happened but now Boomy's SRPG_Windows plugin works lol.
I just disabled all plugins that are not SRPG and reactivate them one by one and there is no problem anymore.
However I copied his FE GBA quick status window code + his FE GBA prediction windows code (in his GitHub page https://github.com/boomyville/RMMV/tree/master/SRPG Window ) and
2 things disturb me (one more ... strange than the other).
First the HP gauge don't display in the quick status window
The second (and a little more disturbing) is that the dammage prediction is completly wrong.
Prediction window tells me that the enemy will do 1 dammage, but in reality I take 19 damage lol
Maybe there are problems in the code used. I will copy it there
Quick status window lunatic code :
Code:
if (this._battler.isActor()) { this.drawActorFace(this._battler, 0, 0, Window_Base._faceWidth, Window_Base._faceHeight); } else { this.drawEnemyFace(this._battler, 0, 0, Window_Base._faceWidth, Window_Base._faceHeight); } this.drawText(this._battler.name(), Window_Base._faceWidth + this.padding, 0, Window_Base._faceWidth, 'right'); this.drawText(this._battler.hp + '/' + this._battler.mhp, Window_Base._faceWidth + this.padding, this.windowHeight() / 3, Window_Base._faceWidth, 'right'); this.drawGauge(Window_Base._faceWidth + this.padding, this.windowHeight() / 3 * 2, Window_Base._faceWidth, this._battler.hpRate(), '#FF0000', '#00FF00');
Prediction window lunatic code (normaly ";" means go on another line. To more lisibility I created a new line each time I saw a ";")
Code:
this.drawText(this._actionArray[1].name(), Window_Base._iconWidth + this.padding, this.fittingHeight(0), this.windowWidth() - Window_Base._iconWidth);
if (this._actionArray[1].isActor()) { if(this._actionArray[1].weapons()[0]) { this.drawIcon(this._actionArray[1].weapons()[0].iconIndex, 0, this.fittingHeight(0));
} } else if (this._actionArray[1].enemy().meta.srpgWeapon) { this.drawIcon($dataWeapons[this._actionArray[1].enemy().meta.srpgWeapon].iconIndex, 0, this.fittingHeight(0));
} this.drawIcon(this._actionArray[1].currentAction().item().iconIndex, 0, this.fittingHeight(1)); this.drawText(this._actionArray[1].currentAction().item().name, Window_Base._iconWidth + this.padding, this.fittingHeight(1), this.windowWidth() - Window_Base._iconWidth);
this.drawText('PV', this.windowWidth() / 2 - this.textWidth('PV') / 2, this.fittingHeight(2), this.textWidth('PV')); this.drawText(this._actionArray[1].hp, 0, this.fittingHeight(2), this.textWidth(this._actionArray[1].hp), 'left');
if (this._actionArray[1] != this._targetArray[1] && this._targetArray[1].currentAction() !== null) { this.drawText(this._targetArray[1].hp, this.windowWidth() - this.textWidth(this._targetArray[1].hp) - this.padding * 2, this.fittingHeight(2), this.textWidth(this._targetArray[1].hp), 'right');
} this.drawText('Dmg', this.windowWidth() / 2 - this.textWidth('Dmg') / 2, this.fittingHeight(3), this.textWidth('Dmg'));
if(this._actionArray[1].canUse(this._actionArray[1].currentAction().item())) { if(this._actionArray[1].currentAction().srpgPredictionDamage(this._targetArray[1]) !== 0) { this.drawText(this._actionArray[1].currentAction().srpgPredictionDamage(this._targetArray[1]), 0, this.fittingHeight(3), this.textWidth(this._actionArray[1].currentAction().srpgPredictionDamage(this._targetArray[1])), 'left');
} } if(this._targetArray[1].canUse(this._targetArray[1].currentAction().item())) { if(this._targetArray[1].currentAction().srpgPredictionDamage(this._actionArray[1]) != 0) { if (this._actionArray[1] != this._targetArray[1] && this._targetArray[1].currentAction() !== null) { this.drawText(this._targetArray[1].currentAction().srpgPredictionDamage(this._actionArray[1]), this.windowWidth() - this.padding * 2 - this.textWidth(this._actionArray[1].currentAction().srpgPredictionDamage(this._actionArray[1])), this.fittingHeight(3), this.textWidth(this._targetArray[1].currentAction().srpgPredictionDamage(this._actionArray[1])), 'right');
} } } this.drawText('Prc', this.windowWidth() / 2 - this.textWidth('Prc') / 2, this.fittingHeight(4), this.textWidth('Prc')); this.drawText(Math.round(100 * this._actionArray[1].currentAction().itemHit(this._targetArray[1])), 0, this.fittingHeight(4), this.textWidth(Math.round(100 * this._actionArray[1].currentAction().itemHit(this._targetArray[1]))), 'left');
if (this._actionArray[1] != this._targetArray[1] && this._targetArray[1].canUse(this._targetArray[1].currentAction().item())) { this.drawText(Math.round(this._targetArray[1].currentAction().itemHit(this._actionArray[1]) * 100), this.windowWidth() - this.padding * 2 - this.textWidth(Math.round(this._targetArray[1].currentAction().itemHit(this._actionArray[1]) * 100)), this.fittingHeight(4), this.textWidth(Math.round(this._targetArray[1].currentAction().itemHit(this._actionArray[1]) * 100)), 'right');
} this.drawText('Crit', this.windowWidth() / 2 - this.textWidth('Crit') / 2, this.fittingHeight(5), this.textWidth('Crit')); this.drawText(Math.round(100 * this._actionArray[1].currentAction().itemCri(this._targetArray[1])), 0, this.fittingHeight(5), this.textWidth(Math.round(100 * this._actionArray[1].currentAction().itemCri(this._targetArray[1]))), 'left');
if (this._actionArray[1] != this._targetArray[1] && this._targetArray[1].canUse(this._targetArray[1].currentAction().item())) { this.drawText(Math.round(100 * this._targetArray[1].currentAction().itemCri(this._actionArray[1])), this.windowWidth() - this.padding * 2 - this.textWidth(Math.round(100 * this._targetArray[1].currentAction().itemCri(this._actionArray[1]))), this.fittingHeight(5), this.textWidth(Math.round(100 * this._targetArray[1].currentAction().itemCri(this._actionArray[1]))), 'right');
} if (this._actionArray[1] != this._targetArray[1] && this._targetArray[1].canUse(this._targetArray[1].currentAction().item())) { this.drawText(this._targetArray[1].currentAction().item().name, 0, this.fittingHeight(6), this.windowWidth() - Window_Base._iconWidth - this.padding * 3, 'right');
} if (this._actionArray[1] != this._targetArray[1] && this._targetArray[1].canUse(this._targetArray[1].currentAction().item())) { this.drawIcon(this._targetArray[1].currentAction().item().iconIndex, this.windowWidth() - Window_Base._iconWidth - this.padding * 2, this.fittingHeight(6));
} if (this._actionArray[1] != this._targetArray[1] && this._targetArray[1].currentAction() !== null) { this.drawText(this._targetArray[1].name(), 0, this.fittingHeight(7), this.windowWidth() - Window_Base._iconWidth - this.padding * 3, 'right');
} if (this._actionArray[1] != this._targetArray[1] && this._targetArray[1].currentAction() !== null) { if (this._targetArray[1].isActor()) { if(this._targetArray[1].weapons()[0]) { this.drawIcon(this._targetArray[1].weapons()[0].iconIndex, this.windowWidth() - Window_Base._iconWidth * 2, this.fittingHeight(7));
} } else if (this._targetArray[1].enemy().meta.srpgWeapon) { this.drawIcon($dataWeapons[this._targetArray[1].enemy().meta.srpgWeapon].iconIndex, this.windowWidth() - 2 * Window_Base._iconWidth, this.fittingHeight(7)); } }
Boomy's sample window is full of errors and basically requires you to nearly rewrite the whole thing from scratch.
Arg I see.
I'm fully beginer in coding (I used scratch at university but only to draw basics forms like square, triangle and creating basic algorithme ect, only to resolve math exercices in fact lol)
So I have no idea how to use it to rewrite the code lol
I Will try but at this time it's seems complicated in my mind
I'm fully beginer in coding (I used scratch at university but only to draw basics forms like square, triangle and creating basic algorithme ect, only to resolve math exercices in fact lol)
So I have no idea how to use it to rewrite the code lol
I Will try but at this time it's seems complicated in my mind
has any body successfully redesigned the srpg prediction window to that of Fire Emblem Engage?
Portrait, Name, Current Equip, Max HP, HP after Battle, Damage done, Hit Rate, Crit Rate?
The current SRPG Prediction Window has too many redundant info, and is blocking the battle field view
draw name, draw class, draw level, draw HP MP TP, draw weapon slot, draw parameters
draw action choice, hit, range, damage
--> i added the skill effective here
even tactics ogre has a more intuitive UI
Portrait, Name, Current Equip, Max HP, HP after Battle, Damage done, Hit Rate, Crit Rate?
The current SRPG Prediction Window has too many redundant info, and is blocking the battle field view
draw name, draw class, draw level, draw HP MP TP, draw weapon slot, draw parameters
draw action choice, hit, range, damage
--> i added the skill effective here
even tactics ogre has a more intuitive UI
$gameMap.regionId($gamePlayer.posX(), $gamePlayer.posY())
or
$gameMap.regionId($gameTemp.activeEvent().posX(), $gameTemp.activeEvent().posY())
If its a pre-SRPG battle event, $gameTemp.activeEvent() will be undefined so replace with whatever event you want
I agree. I don't use it myself. It's too hard to customise the prediction/status windows using a plugin
This is my version of the prediction window
It's missing stuff (like hit/crit) but it is possible to strip the window to become more intuitive
@boomy what is the code lunatic for that setup? Thank you I like how it is portrait and not face graphic! Also uses icon parameters.
Id like to retain the max HP, hp after combat, dmg, hit, crit. Im already using your code for is attack effective (300%) and not effective (50%)
Id like to retain the max HP, hp after combat, dmg, hit, crit. Im already using your code for is attack effective (300%) and not effective (50%)
You mean something like this?
(Ignore the poor mapping, this is a demo I made quickly to share with someone else lol)
It took awhile to do and it's not quite done yet, still some cases I need to account for like healing and whatnot. But it's all there aside from HP after, special thanks to Boomy for the awesome plugin 🙂
Yes! Absolutely, can tou share the code?
For AI units to take advantage of range without counterattacks, use this formula.
Of course, this targets who takes the most damage but 1-2 fights 2 range at 1 range. 2-3 fights 3-8 range at 2 range. If they don't have enough movement to reach you but make up for it with range, they'll target you at range then take advantage on the next turn (if you don't move on that turn).
I assume for weaponless skills, it's "srpgSkillRange(), srpgSkillMinRange()"
Whatever formula you got, make sure to include this part for range. (And perhaps put parenthesis around that formula but keep the range outside that)
Code:
<aiTarget: Math.max(1, (a.atk - b.def)) + (b.srpgWeaponRange() <= a.srpgWeaponRange() && b.srpgWeaponMinRange() <= a.srpgWeaponMinRange() && range || a.srpgWeaponMinRange() < b.srpgWeaponMinRange() && range < Math.max(2, b.srpgWeaponMinRange()))>
Of course, this targets who takes the most damage but 1-2 fights 2 range at 1 range. 2-3 fights 3-8 range at 2 range. If they don't have enough movement to reach you but make up for it with range, they'll target you at range then take advantage on the next turn (if you don't move on that turn).
I assume for weaponless skills, it's "srpgSkillRange(), srpgSkillMinRange()"
Whatever formula you got, make sure to include this part for range. (And perhaps put parenthesis around that formula but keep the range outside that)
Code:
+ (b.srpgWeaponRange() <= a.srpgWeaponRange() && b.srpgWeaponMinRange() <= a.srpgWeaponMinRange() && range || a.srpgWeaponMinRange() < b.srpgWeaponMinRange() && range < Math.max(2, b.srpgWeaponMinRange()))
okay i finally hard coded some stuff from boomy's SRPG Window to srpg core of GearMV 1.11Q
here's what's in my UI ala Fire Emblem Heroes :
sprg status left and right -> invisible
srpg battle command -> center
srpg prediction window
here's what's in my UI ala Fire Emblem Heroes :
sprg status left and right -> invisible
srpg battle command -> center
srpg prediction window
- user portrait, target portrait, window background
- user name, target name
- user HP, HP after, HP gauge || target HP, taget HP after, HP gauge
- Damage, Hit, Crit (Hit considers user hit and target eva)
- Action Order - improved with 2 block arrow icons
- action name - improved with icon attack effective (50% for weak, 300% for strong)
Is it possible to share your code ?
I want to do something similar with prédiction Windows (not with detailed action but just put a *2 icon next to dmg when agi attack trigger)
Do you know how to display Hit / Cri to a fix value ?
For exemple how to display hit = 100% if the real hit rate is >= 100% (exemple my True hit is 140% but I want to display 100% in the Window)
This is pretty simple. You just want to check both rates and see if they are greater than 100%. Here's the pseudo code:
IF CRI >= 100:
Write 100;
ELSE IF CRI <= 0:
Write 0;
ELSE:
Write Cri;
The same general idea can be applied to both hit and crit, you just have to change out the variables.
I have the idea yeah but I didn't have any basis in javascript (I don't know what to write) + I don't have any idea where I must write the code lol
I will share the code, but i wiil not customize alignment to your needs. Credits to ariake_takumi, boomy, and gsc
Here's the edited draw contents for Window_SrpgPrediction
Here's the edited draw contents for Window_SrpgPrediction
JavaScript:
// 内容を描画する
Window_SrpgPrediction.prototype.drawContents = function() {
this.opacity = 0;
this.resetFontSettings();
var windowWidth = this.windowWidth(); //adjust height
var lineHeight = this.lineHeight();
var padding = 24;
var user = this._actionArray[1];
var target = this._targetArray[1];
// add background image 816 x 624 px located in system folder
this._background = new Sprite(ImageManager.loadSystem('prediction'));
this.addChildAt(this._background, 1);
this._background.anchor.x = 0.5;
this._background.anchor.y = 0.5;
this._background.x = Graphics.boxWidth / 2;
this._background.y = -86;
this._background.z = 1;
// draw user bust (right side) 300 x 300 px located in system folder
this._bust = new Sprite(ImageManager.loadSystem(user.name()));
this._bust.scale.x = -1;
this.addChildAt(this._bust, 1);
this._bust.anchor.x = 0.5;
this._bust.anchor.y = 1;
this._bust.x = Graphics.boxWidth * (10 / 12);
this._bust.y = Graphics.boxHeight - 624;
// draw target bust (left side) 300 x 300 px located in system folder
if(!target.isActor()) {
var loadBust = target.name();
this._bust2 = new Sprite(ImageManager.loadSystem(loadBust));
this._bust2.visible = true;
} else {
this._bust2 = new Sprite(ImageManager.loadSystem(target.name()));
if (user === target) { this._bust2.visible = false;}
this._bust2.scale.x = 1;
}
this.addChildAt(this._bust2, 1);
this._bust2.anchor.x = 0.5;
this._bust2.anchor.y = 1;
this._bust2.x = Graphics.boxWidth * (2 / 12);
this._bust2.y = Graphics.boxHeight - 624;
// attacker
var action = user.currentAction();
var damage = action.srpgPredictionDamage(target);
var hit = action.itemHit(target);
var eva = action.itemEva(target);
var cri = action.itemCri(user);
var xx = 96 ;
this.drawText('Action', orderX - 8, -8, iconBoxWidth * 2, 'center');
// draw name and action name
this.drawText(user.name(), windowWidth / 2 + 32, lineHeight * 0 - 4, windowWidth / 2, 'center');
this.drawSrpgBattleActionName(user, action, windowWidth / 2 + padding * 2 + xx, lineHeight * 1 - 8, true);
//this.drawSrpgBattleDistance(user, action, windowWidth / 2 + 172 + padding * 2, lineHeight * 3);
this.contents.fontSize = 20;
// draw damage hit crit
this.drawSrpgBattleDamage(damage, windowWidth / 2 + padding + 100 + xx, lineHeight * 3 + 4);
this.drawSrpgBattleHit(hit, eva, windowWidth / 2 + padding + 100 + xx, lineHeight * 4 - 6);
this.drawSrpgBattleCri(cri, windowWidth / 2 + padding + 100 + xx, lineHeight * 5 - 18);
// draw HP icon
this.drawIcon(13, windowWidth / 2 + 16 + 32 + xx, lineHeight * 2 + 2);
this.contents.fontSize = 40;
this.drawText(user.hp, windowWidth / 2 + 16 + 64 + xx, lineHeight * 2);
this.contents.fontSize = 16;
// check if double action is true and action used is normal attack
if (_srpgUseAgiAttackPlus == 'true' && target.agi > user.agi && user.attackSkillId() === action.item().id) {
var nowHp = user.hp - (2 * target.currentAction().srpgPredictionDamage(user));
} else {var nowHp = user.hp - target.currentAction().srpgPredictionDamage(user);}
// limit new HP to 0 and maxp HP
if (nowHp > user.mhp) { nowHp = user.mhp;
} else if (nowHp < 0) { nowHp = 0; }
var width = this.textWidth('00000');
this.drawText(nowHp, windowWidth / 2 + 160 + width + 16 + xx, lineHeight * 2 + 12);
this.resetFontSettings();
// draw HP gauge
var rate = nowHp / user.mhp;
this.drawGauge(windowWidth / 2 + 16 + 32 + xx, lineHeight * 2 + 12, windowWidth / 3 - 48, rate, this.hpGaugeColor1(), this.hpGaugeColor2());
// target
var reaction = target.currentAction();
// If the skill cannot be used or the attacker is unable to respond
if (reaction && (!target.canUse(reaction.item()) || user.currentAction().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);
var cri = reaction.itemCri(target);
// draw name and action name
this.drawText(target.name(),-64, lineHeight * 0 - 4,windowWidth / 2, 'center');
this.drawSrpgBattleActionName(target, reaction, padding + 32, lineHeight * 1 - 8, true);
//this.drawSrpgBattleDistance(target, reaction, 172 + padding, lineHeight * 1);
// draw damage hit crit
this.contents.fontSize = 20;
this.drawSrpgBattleDamage(damage, padding + 100, lineHeight * 3 + 4);
this.drawSrpgBattleHit(hit, eva, padding + 100, lineHeight * 4 - 6);
this.drawSrpgBattleCri(cri, padding + 100, lineHeight * 5 - 18);
// draw HP icon
this.drawIcon(13, padding + 36, lineHeight * 2 + 2);
this.contents.fontSize = 40;
this.drawText(target.hp, padding + 16 + 64, lineHeight * 2);
this.contents.fontSize = 16;
// check if double action is true and action used is normal attack
if (_srpgUseAgiAttackPlus == 'true' && user.agi > target.agi && target.attackSkillId() === action.item().id) {
var nowHp = target.hp - (2 * user.currentAction().srpgPredictionDamage(target));
} else {var nowHp = target.hp - user.currentAction().srpgPredictionDamage(target);}
// limit new HP to 0 and maxp HP
if (nowHp > target.mhp) { nowHp = target.mhp;
} else if (nowHp < 0) { nowHp = 0; }
var width = this.textWidth('00000');
this.drawText( nowHp, padding + 150 + width + 16, lineHeight * 2 + 12);
this.resetFontSettings();
// draw HP Gauage
var rate = nowHp / target.mhp;
this.drawGauge( 28 + 32 , lineHeight * 2 + 12, windowWidth / 3 - 48, rate, this.hpGaugeColor1(), this.hpGaugeColor2());
}
if (_srpgPredictionWindowMode === 2) return;
// action order
BattleManager.makeActionOrders();
this.contents.fontSize = 18;
var order = BattleManager.actionBattlers();
var doubleActioncheck = [];
var doubleActionRate = 0;
var iconBoxWidth = Window_Base._iconWidth + 4;
var orderX = this.windowWidth() / 2 - this.standardPadding() - iconBoxWidth +10;
var orderY = lineHeight - 2;
var line = 0
this.drawText('Action', orderX - 8, -8, iconBoxWidth * 2, 'center');
for (var i = 0; i < order.length; i++) {
battler = order[i];
// user
if (user === battler && action && action.item()) {
// first action
if (doubleActioncheck.indexOf(battler) < 0) {
this.drawSrpgBattleOrders(battler, action.item(), orderX, 17 + orderY * line);
// double action
} else if (_srpgUseAgiAttackPlus === 'true' && doubleActioncheck.indexOf(battler) >= 0) {
actionRate = this.setDoubleActionRate(user, target);
if (actionRate > 0) {
this.drawSrpgBattleOrders(battler, action.item(), orderX, 17 + orderY * line);
this.drawSrpgActionRate(actionRate, orderX + iconBoxWidth, 17 + orderY * line);
}
}
// next
doubleActioncheck.push(battler);
line++;
// target
} 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);
}
// double action
} 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.drawSrpgActionRate(actionRate, orderX, 17 + orderY * line);
}
}
// next
doubleActioncheck.push(battler);
line++;
}
}
};
JavaScript:
// draw action order
Window_SrpgPrediction.prototype.drawSrpgBattleOrders = function(battler, item, x, y) {
// for nomal attack, show weapon icon
var arrowicon1 = 92; // actor arrow head
var arrowicon2 = 93; // actor arrow tail
var arrowicon3 = 90; // actor arrow tail
var arrowicon4 = 91; // actor arrow head
if (DataManager.isSkill(item) && item.id === battler.attackSkillId() &&
!battler.hasNoWeapons()) {
if (battler.isActor()) {
var item = battler.weapons()[0];
this.drawIcon(arrowicon1, x-32, y + 2);
this.drawIcon(arrowicon2, x, y + 2);
this.drawIcon(item.iconIndex, x + 32, y + 2);
} else {
var item = $dataWeapons[Number(battler.enemy().meta.srpgWeapon)];
this.drawIcon(item.iconIndex, x, y + 2);
this.drawIcon(arrowicon3, x + 32, y + 2);
this.drawIcon(arrowicon4, x + 64, y + 2);
}
// else draw skill icon
} else {
if (battler.isActor()) {
this.drawIcon(item.iconIndex, x + 32 , y + 2);
} else {
this.drawIcon(item.iconIndex, x , y + 2);
}
}
};
JavaScript:
// 使用する攻撃名の描画
Window_SrpgPrediction.prototype.drawSrpgBattleActionName = function(battler, action, x, y, flag) {
if (action && flag === true) {
var skill = action.item();
if (skill) {
var costWidth = this.costWidth();
this.changePaintOpacity(this.isEnabled(battler, skill));
// 通常攻撃の場合、装備している武器名を表示する
if (DataManager.isSkill(skill) && skill.id === battler.attackSkillId() &&
!battler.hasNoWeapons()) {
if (battler.isActor()) {
var item = battler.weapons()[0];
} else {
var item = $dataWeapons[Number(battler.enemy().meta.srpgWeapon)];
}
this.drawItemName(item, x, y, 280 - costWidth);
// 通常攻撃以外のスキル名はそのまま表示する
} else {
this.drawItemName(skill, x, y, 280 - costWidth);
}
this.drawSkillCost(battler, skill, x, y, 288);
this.changePaintOpacity(1);
// is attack effective
if (battler.isActor()) {
if ($gameSystem.EventToUnit($gameTemp.targetEvent().eventId())[1].elementRate($gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1].currentAction().item().damage.elementId) > 1) {
this.drawIcon(94, x + 6, y - 6); // effective icon ID
} else if ($gameSystem.EventToUnit($gameTemp.targetEvent().eventId())[1].elementRate($gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1].currentAction().item().damage.elementId) < 1) {
this.drawIcon(95, x + 6, y + 6); // not effective icon ID
}
} else if (!battler.isActor()) {
if ($gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1].elementRate($gameSystem.EventToUnit($gameTemp.targetEvent().eventId())[1].currentAction().item().damage.elementId) > 1) {
this.drawIcon(94, x + 6, y + 6); // effective icon ID
} else if ($gameSystem.EventToUnit($gameTemp.activeEvent().eventId())[1].elementRate($gameSystem.EventToUnit($gameTemp.targetEvent().eventId())[1].currentAction().item().damage.elementId) < 1) {
this.drawIcon(95, x + 6, y + 6); // not effective icon ID
}
}
} else {
this.drawText('------------', x + 52, y, 96, 'right');
}
} else {
this.drawText('------------', x + 52, y, 96, 'right');
}
};
JavaScript:
// battle damage
Window_SrpgPrediction.prototype.drawSrpgBattleDamage = function(damage, x, y) {
this.changeTextColor(this.systemColor());
var width = this.textWidth('00000');
if (damage >= 0) {
this.drawText(_textSrpgDamage, x, y, 164);
this.resetTextColor();
this.drawText(damage, x + 90, y, width, 'right');
} else {
this.drawText(_textSrpgHealing, x, y, 164);
this.resetTextColor();
this.drawText(damage * -1, x + 90, y, width, 'right');
}
};
// battle cri
Window_SrpgPrediction.prototype.drawSrpgBattleCri = function(cri, x, y) {
var val = cri;
var width = this.textWidth('000%');
this.changeTextColor(this.systemColor());
this.drawText("Cri", x, y, 98);
this.resetTextColor();
this.drawText(Math.floor(val * 100) + '%', x + 110, y, width, 'right');
};
// battle hit
Window_SrpgPrediction.prototype.drawSrpgBattleHit = function(hit, eva, x, y) {
var val = Math.floor((hit.clamp(0, 1.0) * (1.0 - eva).clamp(0, 1.0)) * 100); // 命中・回避を同時に処理する
var width = this.textWidth('000%');
this.changeTextColor(this.systemColor());
this.drawText(TextManager.param(8), x, y, 98);
this.resetTextColor();
this.drawText(val.clamp(0, 100) + '%', x + 110, y, width, 'right');
};
Thank you very much !
Don't worry I will find a way to edit to my personal tastes when I will understand the code.
Just a question. I don't understand that part
Does the background of picture be transparent ? have a background color ? anything else ?
Another question about that part :
Is it possible to display a down/dead sprite for actors or enemies that have been defeated in the MZ plugin? I was looking for it in the plugin instructions but couldn't find anything about it. I plan for enemies to disappear when defeated but actors to stay downed on the map until the match is over.
its dopan's plugin, the graves here . Only tomoaky's SRPG version has the down image portrait upon defeat. SPRG Converter erases the event upon defeat while tomokay's activates Self Switch D. SRPG Converter is Fire Emblem Style, so the Final Fantasy Tactics defeat effect you want not really here yet
Just put the images in the system folder. those are Filenames. Rather than me explaining it all, please go to boomy's github SRPG Window, all the variables are explained there.
1. prediction is the filename for the window background it should be the size 816 x 624
2. all player bust portraits should be same name in Database. ex Aldo -> Aldo
3. all enemy bust portraits should be same name in Database. ex. Slime -> Slime
Yeah I tried the graves plugin and got a "ReferenceError: ResourceHandler is not defined" error upon loading my game. Not sure if it's because it just doesn't work with MZ or what it is. It's almost crucial to my game to have the down sprites so I was hoping there would be a way to add it.
I see, thank you very much it's clearer now !
Sorry to bother you again, but I have a bug when I copy your code in the SRPG_core / Window_SRPGPrediction (maybe I didn't paste where it should be)
Do you think it would work if I paste the code in the Lunatic Code section in Boomy's SRPG_Windows plugin's parameters instead of editing the SRPG_core directly ?
Original thread: https://forums.rpgmakerweb.com/threads/srpg-engine-mv-plugins-for-creating-tactical-battle-system.110366/