Attack Formula Debugging Problems

BlissAuthority

Dang, it feels good to be a Princess
Veteran
Joined
Dec 26, 2013
Messages
143
Reaction score
51
First Language
English
Primarily Uses
RMVXA
I have an attack formula of

a.atk + 15 + (a.lv * 5) - (b.atk + b.def / 2)

with zero variance, for various interesting and diverting hysterical raisins.

Plug in 30 strength and 30 defense for a 6th level character (and give monsters levels and the same stats) and this should be

(30+15+30) = 75 -
(30 + 30) / 2 = 15
= 60 damage.

(This is also an unusually high Defense at that level!)

What actually happens is that this universally results in zero damage.

I'm using several Yanfly battle engine plugins, which I can post if it's relevant.

The same thing results from a fireball with a.mat + 15 + (a.lv*5) - (b.mat + b.mdf / 2) for the formula (that hits all foes, with zero variance).

What the hell am I doing wrong?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA

I've moved this thread to MV Support. Please be sure to post your threads in the correct forum next time. Thank you.



a.lv is undefined, so it is returning 0. Most places that define a level use a.level instead.
 

BlissAuthority

Dang, it feels good to be a Princess
Veteran
Joined
Dec 26, 2013
Messages
143
Reaction score
51
First Language
English
Primarily Uses
RMVXA
My mistake, thanks.

Consider this asked and answered.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
Also be aware that, unless you use a plugin that adds levels to enemies, this formula will still return 0 when an enemy uses the skill.
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top