Zeireth

Veteran
Veteran
Joined
Nov 2, 2013
Messages
69
Reaction score
48
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
69
Reaction score
48
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,511
Reaction score
2,872
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 Profile Posts

Thunderstorm approaching: *rumble rumble*

Me: "Hmph... so.. you've come..."

And ONLY me: (adapts fighting stance) "...now show me your TRUE POWER!!!"

*Thunderstorm fizzles out. Sunshine and rainbows.*

Seriously, ONLY ME: "No! Come back! I.. I didn't mean..."
The black rose maiden! :kaopride:
vmTLAk8.jpg

Character: Aki Izayoi from Yugioh 5Ds.
Took some trial and error, but I managed to create "visuals" for underground dig path regions.
Couldn't sleep at all so I started working on the topmost deck. I've had to make several deviations from the Imperator/Berengaria's deck-plans to accommodate MV's movement, but 100% accuracy was never my intention.
Still no name for the poor ship...:kaodes:
Screenshot-2022-06-25-053308.png

Forum statistics

Threads
123,036
Messages
1,153,609
Members
161,384
Latest member
zyl147258
Top