Game always crashes in combat

Discussion in 'RPG Maker MV' started by Milennin, Oct 31, 2015.

  1. Milennin

    Milennin "With a bang and a boom!" Veteran

    Messages:
    2,184
    Likes Received:
    1,243
    Location:
    Fiore
    First Language:
    English
    Primarily Uses:
    RMMV
    Hilarious how I end up with a game breaking message only because I'm such a noob at combat formulaes, lol.
     
    #21
  2. Snake

    Snake Veteran Veteran

    Messages:
    46
    Likes Received:
    23
    Location:
    Germany
    First Language:
    German
    And 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 :D In the end it worked out.
     
    #22
  3. G4merSylver

    G4merSylver Villager Member

    Messages:
    17
    Likes Received:
    10
    Excuse me~

    Same problem overhere. Using the "fixed" formula with the exception of the state remover, but I get the same error! :o

    -- 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 o_O
     
    Last edited by a moderator: Nov 7, 2015
    #23
  4. DoubleX

    DoubleX Just a nameless weakling Veteran

    Messages:
    1,462
    Likes Received:
    542
    First Language:
    Chinese
    Primarily Uses:
    N/A
    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:

    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
     
    Last edited by a moderator: Jan 5, 2016
    #24
  5. LordIxis

    LordIxis Villager Member

    Messages:
    7
    Likes Received:
    4
    Location:
    Uh no
    First Language:
    English
    This actually happens to me, but it's caused by Yanfly's Core Engine plugin and his Aftermath Victory plugin 
     
    Last edited by a moderator: Nov 14, 2016
    #25

Share This Page