Joined
Feb 24, 2021
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMZ
Pretty simple formula here. When I use the skill, the state is not applied and there is no effect on the enemy.

(a.addState(79)); ((a.atk * 4 - b.def * 2) * 1.2

I have tried it with and without the parenthesis. State #79 exists and has effects. When I take out the
(a.addState(79)); the formula works fine. What am I doing wrong here?
Thanks!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,723
Reaction score
8,508
First Language
German
Primarily Uses
RMMV
please give a screenshot of the skill with the damage formula.

"nothng happens" is usually the case if there is a typo in the formula or the formula returns no valid number or so.
and it wouldn't be the first time (or the hundreds time) that a typo in the original formula was autocorrected when the user retyped it here. But in the screenshot we can check that.
 
Joined
Feb 24, 2021
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMZ
Here are screenshots from the database. Looks fine to me but I'm not super experienced with this.
 

Attachments

  • DF1.PNG
    DF1.PNG
    16.8 KB · Views: 5
  • DF2.PNG
    DF2.PNG
    15.9 KB · Views: 5

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,771
Reaction score
2,122
First Language
EN
Primarily Uses
RMMZ
Mismatched brackets; you have a spare ( after the ;. Try this instead:
  • a.addState(79); (a.atk * 4 - b.def * 2) * 1.2
Also, note that the formula is evaluated by the default AI when deciding what move to use. So, if this skill can ever be used by an enemy (or an actor with the Autobattle trait) then I recommend using a different approach to apply the state, e.g. a common event or a plugin.

(Note: the "Always Attack" state restriction does not use AI.)
 
Joined
Feb 24, 2021
Messages
4
Reaction score
1
First Language
English
Primarily Uses
RMMZ
Mismatched brackets; you have a spare ( after the ;. Try this instead:
  • a.addState(79); (a.atk * 4 - b.def * 2) * 1.2
Also, note that the formula is evaluated by the default AI when deciding what move to use. So, if this skill can ever be used by an enemy (or an actor with the Autobattle trait) then I recommend using a different approach to apply the state, e.g. a common event or a plugin.

(Note: the "Always Attack" state restriction does not use AI.)
Works perfectly thank you so much!
 

Latest Threads

Latest Profile Posts

Lately I have been taking a break from game and resource making so I won't get burnt out. But I am also interested in the Game Jams this site periodically holds. It'd be great if I knew when the next one, if any, is planned.
elexy 1.2.pngSome bust art to be cropped and cleaned. May use in special decision moments. Depending on how it looks in game I may cut it.
Tiamat-86 wrote on ATT_Turan's profile.
apparently since its turning 15 years old this year the ps3 is considered "retro". now how old do you feel?
guess that means im an "antique" gamer since ill still play games as old as i am.
"you know your getting old when your childhood console changes ethnicity" lol it turned yellow
I'm making Toilet in Wonderland 2. and tell vinny about it lol

Forum statistics

Threads
115,346
Messages
1,089,175
Members
150,021
Latest member
Jackitrick
Top