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,602
Reaction score
5,066
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,266
Reaction score
498
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: 2)

Latest Threads

Latest Posts

Latest Profile Posts

rux
Just 80% of my motivation on game making lmao, anyone got tips on how to not be unmotivated?
I've signed up for a job training program for people with Asperger's Syndrome. I went to a "test run" today so they could see how well I did with simple jobs, and I amazed them. Most new people do it in 30+ minutes, while I finished in a mere 15 minutes. Gives me time to work on a screenplay for Studio MDHR...
People,I have seen that Someone from China/Chile and London is doing a Vaccine Against COVID-19.
Doing anything that yield good result in the long run is like sowing seeds. With proper care, they will grow and bear fruits. I'm excited for tomorrow. :D

Forum statistics

Threads
105,454
Messages
1,013,831
Members
137,104
Latest member
sasakureman
Top