Getting this error sometimes when I use a certain skill

Column

Veteran
Veteran
Joined
Dec 11, 2015
Messages
80
Reaction score
20
First Language
Engrish
I was testing the damage formulas of my characters skills yesterday evening and sometimes I'd randomly get this error when I used one. It was always on the same skill, but not every time I used it. Actually, I didn't even get it often. Maybe once out of every 20 or so times I used it, but only ever on the same skill. Should've taken a picture of the skill in question, sorry, I didn't think about it until later. It's set to HP absorb, repeats 2 times. I'm using Yanlfy Engine Core, Yanfly Battle Core, and the plugin that let's you set up a weapons animation to use a specific skill animation. Can't remember the name of it but it was one of the defaults JSs when I installed MV. Any idea what this is, why I get it, or how to fix it? I don't like game freezing errors like this. Don't like them one bit.

20151220_222212.jpg
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,506
Reaction score
8,144
First Language
German
Primarily Uses
RMMV
Please press F8 to open the console and post the full error data here.


But "non-finite" usually means a failed division by zero or by an undefined value. And if it happens only rarely then some random number isn't correctly limited - for example if one of your skills contain a division by a random number, and that random number might result in a zero.


Please give a screenshot of that specific skill, we need to see its formula and other effects as well
 

Column

Veteran
Veteran
Joined
Dec 11, 2015
Messages
80
Reaction score
20
First Language
Engrish
Will do as soon as I get home. Posting from my phone at work. But I don't think it should be diving by zero. It's a.mag * .70 - b.whatevermagicdefenseis * .33 and then set to repeat three times so it hits thrice. Maybe my values are too low or something. I'll edit this post when I get home and add any more informstion I can!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,140
Reaction score
14,646
First Language
English
Primarily Uses
RMMV
Also disable ALL of your plugins, or try the same skill in a brand new project, and see if the error still happens.
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,816
Reaction score
968
First Language
Chinese
Primarily Uses
N/A
Will do as soon as I get home. Posting from my phone at work. But I don't think it should be diving by zero. It's a.mag * .70 - b.whatevermagicdefenseis * .33 and then set to repeat three times so it hits thrice. Maybe my values are too low or something. I'll edit this post when I get home and add any more informstion I can!
If the error still comes with all cusomt plugins disabled, please take a screenshot on the skill in question and try this snippet:

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
Then check what's logged on the console :)
 

Latest Profile Posts

I wish I can work faster on my game. But I don't want to get burned out. :(
I've been working on something on and off for a few years now, and I've been reluctant to share any details on the project before I had anything playable because I did not want to generate hype only for the project to go back on hiatus. That being said I believe what I'm working on is very unique and pushes the boundaries of what RPG Maker projects can be. Bold claims, I know but just wait.
Happy Mother's Day to all the moms :)
Create Anime Art w/ AI, Tall Sprites with Aurora, Customize Variable Display | RPG Maker News #34

[My favorite slow moving track I've made so far]

Forum statistics

Threads
111,196
Messages
1,059,201
Members
144,446
Latest member
ryu12582
Top