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,738
Reaction score
8,517
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,775
Reaction score
2,126
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

Steam page is now live!
1632768058957.png
just discovered thig game called Willowbrooke Post... beautiful artstyle if I do say so myself... does anyone know what this kind of style is called??
In one of my game projects, I am working on an arena where you can fight combatants or bet on monsters, and, man, it is taking so long, lmao. I do not think that it helps that I am using an evented combat system with a lot of things that I have to edit.
Time to take a little break from the project to work on another for Skyrim. Shouldn't take too long, as it's just fulfilling an easy to do request(more than likely I'll get beaten to the punch but...) this also gives me an excuse to play Skyrim again LOL.
Dawg.gifKhat.gif
I made two new friends today. I'm not sure which style I like the best..?

Forum statistics

Threads
115,413
Messages
1,089,678
Members
150,157
Latest member
riesco
Top