Zeireth

Veteran
Veteran
Joined
Nov 2, 2013
Messages
75
Reaction score
53
First Language
English
Primarily Uses
RMMZ
I was copying and pasting from the damage formulas page lol
I think I get how it's all supposed to work, I just don't know what order to put it all in. Is this right?
a.equips()[1].params[3] a.addState(2); a.atk * 4 - b.def * 2
Your formula is incorrect. The result will be zero because of an error.

Use this instead a.addState(2); a.equips()[1].params[3] + a.atk * 4 - b.def * 2
 

itachi11115

Veteran
Veteran
Joined
Jun 12, 2018
Messages
59
Reaction score
22
First Language
English
Primarily Uses
RMMV
Your formula is incorrect. The result will be zero because of an error.

Use this instead a.addState(2); a.equips()[1].params[3] + a.atk * 4 - b.def * 2
Ahh, so close lol thank you. Is there a particular order of operations that the system prefers? Just in case I need to try and make something like this again
 

Zeireth

Veteran
Veteran
Joined
Nov 2, 2013
Messages
75
Reaction score
53
First Language
English
Primarily Uses
RMMZ
Ahh, so close lol thank you. Is there a particular order of operations that the system prefers? Just in case I need to try and make something like this again
From what I understand you want your damage number to be at the end. Technically you can keep on using ; before damage like this a.addState(2); a.addState(4); a.equips()[1].params[3] + a.atk * 4 - b.def * 2

What that formula will do is apply guard state to user, then apply poison state to user, then do math to get a value for damage. There is a lot of fun things you can do once you learn more.

Have fun with damage formulas, experiment, but always remember to make backup copies so in case you actually want it to go back to original, then you will have it.

I would highly suggest searching Javascript Math in your search engine. Pretty much all math functions and methods work in the damage formula for skills and items. I love mathematics lol

Also in your game folder called js, you will notice rpg_object.js

It has cool information, however I suggest you make a backup copy if you ever plan to mess around with it, or better yet you could write a script to overwrite functions or do whatever you like.

For instance when I read through rpg_object.js I discovered that I can put a.die() to make the user dead in a damage formula. die() is a function, same is true as addState(). You will find addState() function in rpg_object.js under Game_Battler function. Game_BattlerBase function is also a good one to look through. It is a superclass of Game_Battler.

I am available to chat with whenever you need some help. Send me a dm.

I assume that this thread can now be closed now. I believe your original request has been fullfilled.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,533
Reaction score
2,896
First Language
English
Primarily Uses
RMMV
Is there a particular order of operations that the system prefers?
How do you mean? If you mean the order of commands, then as Zeireth and the Damage Formula 101 thread said, the last command must always be a number because that's what the game uses for the actual damage.

If you mean order of operations mathematically, it's the exact same as you learned in math class.
I assume that this thread can now be closed now. I believe your original request has been fullfilled.
I know that you're just being very helpful in this thread; but for future etiquette, only the original author of a thread can request it to be closed.
 

itachi11115

Veteran
Veteran
Joined
Jun 12, 2018
Messages
59
Reaction score
22
First Language
English
Primarily Uses
RMMV
From what I understand you want your damage number to be at the end. Technically you can keep on using ; before damage like this a.addState(2); a.addState(4); a.equips()[1].params[3] + a.atk * 4 - b.def * 2

What that formula will do is apply guard state to user, then apply poison state to user, then do math to get a value for damage. There is a lot of fun things you can do once you learn more.

Have fun with damage formulas, experiment, but always remember to make backup copies so in case you actually want it to go back to original, then you will have it.

I would highly suggest searching Javascript Math in your search engine. Pretty much all math functions and methods work in the damage formula for skills and items. I love mathematics lol

Also in your game folder called js, you will notice rpg_object.js

It has cool information, however I suggest you make a backup copy if you ever plan to mess around with it, or better yet you could write a script to overwrite functions or do whatever you like.

For instance when I read through rpg_object.js I discovered that I can put a.die() to make the user dead in a damage formula. die() is a function, same is true as addState(). You will find addState() function in rpg_object.js under Game_Battler function. Game_BattlerBase function is also a good one to look through. It is a superclass of Game_Battler.

I am available to chat with whenever you need some help. Send me a dm.

I assume that this thread can now be closed now. I believe your original request has been fullfilled.

How do you mean? If you mean the order of commands, then as Zeireth and the Damage Formula 101 thread said, the last command must always be a number because that's what the game uses for the actual damage.

If you mean order of operations mathematically, it's the exact same as you learned in math class.

I know that you're just being very helpful in this thread; but for future etiquette, only the original author of a thread can request it to be closed.
You have both been incredibly helpful, looks like the skill is working as expected now. Thank you again!
 

Latest Threads

Latest Posts

Latest Profile Posts

Messing around with fragment shaders (filters). This thing is HUGE and I'm surprised almost no one makes good use of. Even the number of plugins that do this stuff are limited.
ScreenShot_6_28_2022_3_2_40.png

There's 7 main areas in the game that are all connected. This train get's you from an underground lab to the center of someone's subconscious. inside the train you can talk to some of the passengers. but going to the top of it, there's battles.
Speedrunning all character portraits just so they all have the same quality. Not sure if this was a good idea, but now I'm almost done.
We now have a gameplay video!
DrBuni wrote on Akiritas's profile.
That is a cute Link picture, reminds me of the Samurai Jack artstyle.

Forum statistics

Threads
123,146
Messages
1,154,385
Members
161,495
Latest member
dstroya
Top