Damage formulas producing 0 damage

tumsterfest

Veteran
Veteran
Joined
Aug 11, 2020
Messages
50
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
262
Reaction score
127
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,603
Reaction score
5,071
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
50
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,282
Reaction score
508
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

So I'm practicing ITC with a spirit box, and decide to try to contact my deceased soulmate. It actually gave me multiple identifiers. Me, still a bit skeptical, asked aloud "Fine but does he still love me?" and the box spoke and printed the word "Forever" at the same time. Been a mess of tears since. :kaocry:
Been scratching away at my game and making progress, but just had a revelation. I'm working in full screen and adjusting all my pictures accordingly, but will they resize if someone's screen is smaller?? I hope this doesn't turn out to be a problem later.
Why is there so much month left at the end of money? D=
Hello humans! How goes your day in this journey of living? I hope it is good, for I am human like you, and I am feeling great! Worship the altar.

Forum statistics

Threads
105,628
Messages
1,015,076
Members
137,288
Latest member
GmOcean
Top