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
31,365
Reaction score
7,674
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

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
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,787
Reaction score
939
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 :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top