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,720
Reaction score
8,503
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,769
Reaction score
2,120
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 Posts

Latest Profile Posts

Making his first game
This scene was suppose to be a test... but now, it's going in the game as official side/optional content. :kaosalute:


functionality(This is function demo not game demo)
1 The door of ABS map can open upon clearing all the monsters
2 Secret room/road arrow/lighting/whatever others can be shown upon clearing too
3 Boss HP bar and loot effect, loot jump and item name color as well as the pick-up animation effect
4 Back to town and "victory aftermath" screen for ABS maps/rooms
Playing one of the two RM2k3 games I was best known for back in the day, one I made in the Spring semester of my Freshmen year in college like 15 years ago, feeling all kinds of ways about it. I have not played this game in WELL over 10 years. I feel a million years old RN.
One of these days, I need to find/figure out how to replicate the Brave/Default system. Heheh...

Forum statistics

Threads
115,327
Messages
1,088,999
Members
149,983
Latest member
Frishu
Top