Damage formulas producing 0 damage

tumsterfest

Veteran
Veteran
Joined
Aug 11, 2020
Messages
42
Reaction score
4
First Language
English
Primarily Uses
RMMZ
Hi,

I'm having trouble figuring out why a few attacks of mine aren't causing damage:

First one: a.hp + atk - b.def * 2
Second one: a.mat * 5.5 - tp - b.mdf

I'm pretty decent at math, so it's definitely not an issue with that. My suspicion is that my issue has something to do with including two stat values the actor (i.e., an attack that is influenced by both the caster's current HP and his attack power).

Is there something structurally wrong with these formulas? Would using parentheses help?

Thanks!
 

Ahuramazda

Veteran
Veteran
Joined
Nov 9, 2012
Messages
251
Reaction score
117
First Language
English
Primarily Uses
RMMZ
You need to put a. or b. in front of atk (in the 1st) or tp (in the 2nd) so it knows who to pull the data from to make the calc work properly.

First one: a.hp + a.atk - b.def * 2
Second one: a.mat * 5.5 - a.tp - b.mdf
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,536
Reaction score
4,989
First Language
English
Primarily Uses
RMVXA
0 damage (no matter what the battler's current stats are) usually indicates the formula has an error in it. @Ahuramazda identified the errors perfectly, so no need for me to repeat the solution.
 

tumsterfest

Veteran
Veteran
Joined
Aug 11, 2020
Messages
42
Reaction score
4
First Language
English
Primarily Uses
RMMZ
You need to put a. or b. in front of atk (in the 1st) or tp (in the 2nd) so it knows who to pull the data from to make the calc work properly.

First one: a.hp + a.atk - b.def * 2
Second one: a.mat * 5.5 - a.tp - b.mdf
This worked. Thanks!

An offshoot question: I wanted one of these abilities hit 8 times at random. An example would be Cloud's Meteorain ability in Final Fantasy VII, or various other Meteor attacks in the FF series. Is there a workaround to bypass the limit of 4 when you select the "Enemies > Random" target option?
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,202
Reaction score
426
First Language
indonesian
This worked. Thanks!

An offshoot question: I wanted one of these abilities hit 8 times at random. An example would be Cloud's Meteorain ability in Final Fantasy VII, or various other Meteor attacks in the FF series. Is there a workaround to bypass the limit of 4 when you select the "Enemies > Random" target option?
with or without plugins?

if without plugins maybe try linking it to another skill... call common event when using that skill that force action of the actor to use another skill... but it might not exactly what you want though...
 

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

Latest Threads

Latest Profile Posts

I worked a lot more today and I am thinking about Youtube videos to make to my channel, but I am still looking for some content :D

But I am happy to be back at work :D
Update... no scam calls all day. I think they learned their lesson. And I'm working on a fake anti-piracy video, featuring a fan game I'm making in MV. If I had the permission to make the game a licensed game that I could sell (rather than having it totally free like fan games are required to be), I'd use a really cool anti-piracy screen...
People2_1 added! ( with alternative hairstyle )

Hey there fellow makers!

just looking for an excuse to post this, really... :kaoslp:

Forum statistics

Threads
104,356
Messages
1,005,796
Members
135,868
Latest member
LuxRae
Top