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,991
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,205
Reaction score
428
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 Posts

Latest Profile Posts

Yesterday I made my first step towards eating more healthily.
I saw candy on discount and did not buy it.
"They yearn for what they fear for."
I always told my DA fans how much I hate slot machines. They're fine in games as a risk-and-reward system. But when you're spending REAL MONEY in a Vegas casino to try and hit the jackpot (which very, very few people will), it can really hurt your budget. Gambling is a bad habit, and I don't like wasting my money on a slim chance. Go to Vegas for the experience, not the jackpot.
Took the kids to a corn maze. They gave us a map and had lights at certain points in the maze. Not overwhelming... or underwhelming... just... whelming.
Okay, vacuuming fruit flies out of the air is surprisingly effective.

Forum statistics

Threads
104,393
Messages
1,006,073
Members
135,927
Latest member
ecelebrithytrend
Top