SmeeDucks

Villager
Member
Joined
Jan 19, 2020
Messages
10
Reaction score
2
First Language
English
Primarily Uses
RMMV
So during testing one of my friends discovered a bug where any damaging skill seems to have a random chance to deal "-Infinity HP" which ends up always killing the enemy. He has shown me, and it is a fairly common occurrence when he plays (roughly once an encounter), however on my own device and several others I have borrowed to test in playtest or deployed versions, the bug has been impossible to replicate. Since it only seems to happen on a deployed versions on other people's devices I don't really know of a way to track down the cause. The only thing that I can reason as the cause is in rpg_core the Graphics.printLoadingError has a -Infinity (this._loadingCount = -Infinity), but I don't know how that would be passed as damage. We are going to try and get a copy of RPGmaker on his device and run in it in the engine so we can bring up the devTools and see what error is being caused on his end, but that might end up being a while from now. If anyone has had any experience with something similar or anyway or any other way of testing it that would be helpful. Thanks!
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
848
Reaction score
707
First Language
English
Primarily Uses
RMMV
Sounds more likely there's a division by zero happening, which turns a float to 'infinity'. Check every time there's a division in your damage formula
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,724
Reaction score
8,508
First Language
German
Primarily Uses
RMMV
for detailed help, we would need more information like a screenshot of the skill used from the database.

as for the testing issue, if you deploy and start the deployed version on your computwer it should do the same as on any other players computer - IF you deploy correctly and don't make the mistake and deploy into your project directory. If there is a www folder in your project directory that has already happened and your playtest is already damaged.

if the error still only happens on that friends computer, ask him/her if it happens on new games or on loaded savefiles - loading an incompatible savefile from an older version can cause data errors.
 

SmeeDucks

Villager
Member
Joined
Jan 19, 2020
Messages
10
Reaction score
2
First Language
English
Primarily Uses
RMMV
for detailed help, we would need more information like a screenshot of the skill used from the database.

as for the testing issue, if you deploy and start the deployed version on your computwer it should do the same as on any other players computer - IF you deploy correctly and don't make the mistake and deploy into your project directory. If there is a www folder in your project directory that has already happened and your playtest is already damaged.

if the error still only happens on that friends computer, ask him/her if it happens on new games or on loaded savefiles - loading an incompatible savefile from an older version can cause data errors.
All the skills use a form of "Math.ceil(((a.atk*x)*a.atk/((a.atk+(b.def*y))))); for damage where no enemy or actor has 0 atk or def or anyway to set it as such (though I guess creating a version with modified skills i.e. no modifiers or notes and see if those error out on his end is an option as well).

As for the deployed versions we have been testing the same version of the same export and starting new games each time. There doesn't seem to be anything in my project directory that should be causing an issue (such as the www folder), though I admit I lack the experience to know what those could be.

Thanks I'll just have to keep working at it.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,724
Reaction score
8,508
First Language
German
Primarily Uses
RMMV
a form of "Math.ceil(((a.atk*x)*a.atk/((a.atk+(b.def*y)))));
There is a reason why I asked for a screenshot, because a skill is more than just a damage formula.

that said, this formula does provide the clues to the error - and you are aware of it as your own words proof.
You'll get an infinity error if you divide by zero. Unless you have another, different cause for an infinity error elsewhere that means that in some skills, the divisor DOES become zero.
That is a fact, no matter how much you claim that there is no attack value zero on any actor.

The fact that the error only happens sometimes support this by telling us that it is a calculation that ends up with a zero divisor only sometimes.

So how can the part ((a.atk+(b.def*y)) become zero?
First - since it happens not with every skill every time, it is likely that only some skills contain the formula part that can become zero - you need to really check which skills are used and get their specific formulae instead of the general idea you gave here. It can for example be a typo or a wrong number of negative multiplicators or a few other things.

Second - you have to keep in mind that a.atk is NOT the actor attack value, it's the actor attack base value plus equipment plus state effects plus any modifications done with event commands.
And those modifications CAN be negative, reducing the total to zero.
The engine should have some ssafeguards to prevent it from getting to zero, but with plugins and the specific formulae I would not guarantee this.
 

Latest Threads

Latest Profile Posts

Playing Aroma Indosiar theme song.
Aroma is an Indonesian TV show about cooking. :)
Working on a characteeer! (Why is it so hard to color hair?) ;-;
Silly-Sketches.png
Just finished eventing a couple simple puzzles in RMMV, for my very first game "Sample Quest." Just messing around, throwing things together, and calling it a story XD On a non-RM note, got my hair cut today!
I feel the need to inform everyone on the forums NOT to go with Web Hosting Canada for your hosting needs. It is by far the worst customer service and just overall experience I have ever had with hosting and I am Canadian...
BCj
Got another eye surgery monday. Hope I'll recover quick and all's well. A bit tired of surgeries. On a happy note, working on the next chapter of Escalia so hope I can continue soon :)

Forum statistics

Threads
115,370
Messages
1,089,335
Members
150,059
Latest member
kurisuchia7
Top