Hilarious how I end up with a game breaking message only because I'm such a noob at combat formulaes, lol.
Game always crashes in combat
RPG Maker MV SupportAnd sry that i couldn't help you in the end xD I would've never guessed it was something like the damage formula.
Thx to Mellye for the help 😀 In the end it worked out.
Thx to Mellye for the help 😀 In the end it worked out.
Excuse me~
Same problem overhere. Using the "fixed" formula with the exception of the state remover, but I get the same error! 😮
-- Edit: Actually it works... For everyone but Monsters? I mean that I can freely use attack formulas when its the player, but when its a mob any variable will crash it 😳
Same problem overhere. Using the "fixed" formula with the exception of the state remover, but I get the same error! 😮
-- Edit: Actually it works... For everyone but Monsters? I mean that I can freely use attack formulas when its the player, but when its a mob any variable will crash it 😳
Another possibility for this error to happen is one of the targets having grd as 0% is guarding when hit.
If that's the case, the error should occur whenever one of the targets having grd as 0% is guarding when hit.
If that's also not the case, you can place this diagnose snippet above all custom plugins and check what's logged on the console:
If that's the case, the error should occur whenever one of the targets having grd as 0% is guarding when hit.
If that's also not the case, you can place this diagnose snippet above all custom plugins and check what's logged on the console:
Code:
Game_Action.prototype.makeDamageValue = function(target, critical) { // Rewrite var item = this.item(); console.log("subject", this.subject().name, "item", item.name, "target", target.name, "critical", critical); // Added var baseValue = this.evalDamageFormula(target); console.log("baseValue = this.evalDamageFormula(target)", baseValue); // Added var value = baseValue * this.calcElementRate(target); console.log("value = baseValue * this.calcElementRate(target)", value); // Added if (this.isPhysical()) { value *= target.pdr; console.log("value *= target.pdr", value); // Added } if (this.isMagical()) { value *= target.mdr; console.log("value *= target.mdr", value); // Added } if (baseValue < 0) { value *= target.rec; console.log("value *= target.rec", value); // Added } if (critical) { value = this.applyCritical(value); console.log("value = this.applyCritical(value)", value); // Added } value = this.applyVariance(value, item.damage.variance); console.log("value = this.applyVariance(value, item.damage.variance)", value); // Added value = this.applyGuard(value, target); console.log("value = this.applyGuard(value, target)", value); // Added value = Math.round(value); console.log("value = Math.round(value)", value); // Added return value;}; // Game_Action.prototype.makeDamageValueGame_Action.prototype.executeHpDamage = function(target, value) { // Rewrite if (this.isDrain()) { value = Math.min(target.hp, value); console.log("value = Math.min(target.hp, value)", value); // Added } this.makeSuccess(target); target.gainHp(-value); if (value > 0) { target.onDamage(value); } this.gainDrainedHp(value);}; // Game_Action.prototype.executeHpDamageGame_Action.prototype.executeMpDamage = function(target, value) { // Rewrite if (!this.isMpRecover()) { value = Math.min(target.mp, value); console.log("value = Math.min(target.mp, value)", value); // Added } if (value !== 0) { this.makeSuccess(target); } target.gainMp(-value); this.gainDrainedMp(value);}; // Game_Action.prototype.executeMpDamageGame_Action.prototype.itemEffectRecoverHp = function(target, effect) { // Rewrite var value = (target.mhp * effect.value1 + effect.value2) * target.rec; console.log("value = (target.mhp * effect.value1 + effect.value2) * target.rec", value); // Added if (this.isItem()) { value *= this.subject().pha; console.log("value *= this.subject().pha", value); // Added } value = Math.floor(value); console.log("value = Math.floor(value)", value); // Added if (value !== 0) { target.gainHp(value); this.makeSuccess(target); }}; // Game_Action.prototype.itemEffectRecoverHpGame_Action.prototype.itemEffectRecoverMp = function(target, effect) { // Rewrite var value = (target.mmp * effect.value1 + effect.value2) * target.rec; console.log("value = (target.mmp * effect.value1 + effect.value2) * target.rec", value); // Added if (this.isItem()) { value *= this.subject().pha; console.log("value *= this.subject().pha", value); // Added } value = Math.floor(value); console.log("value = Math.floor(value)", value); // Added if (value !== 0) { target.gainMp(value); this.makeSuccess(target); }}; // Game_Action.prototype.itemEffectRecoverHp
This actually happens to me, but it's caused by Yanfly's Core Engine plugin and his Aftermath Victory plugin
Original thread: https://forums.rpgmakerweb.com/threads/game-always-crashes-in-combat.48670/